Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target 'rules_python_wheel_entry_point_hjson' not declared in package #602

Closed
kriswuollett opened this issue Jan 10, 2022 · 5 comments
Closed

Comments

@kriswuollett
Copy link

🐞 bug report

The entry_point for package hjson does not work with v0.6.0.

Is entry_point not fully available for use yet? I don't see any mention of it on the top level README.md.

Affected Rule

entry_point method

Is this a regression?

Not sure. First time I've tried using this feature of rules_python. Perhaps this package is a different case of an invalid entry points config?

Description

The rules_python_wheel_entry_point_hjson not generated for requirement hjson==3.0.2:

🔬 Minimal Reproduction

🔥 Exception or Error

bazel run //:hjson                  
INFO: Invocation ID: 1389b1ea-dff0-4c15-8cc2-1d0a248ceb3c
ERROR: /Users/kris/workspace/github.com/kriswuollett/rules_python/examples/entrypoint/BUILD:3:6: no such target '@pip_deps_hjson//:rules_python_wheel_entry_point_hjson': target 'rules_python_wheel_entry_point_hjson' not declared in package '' defined by /private/var/tmp/_bazel_kris/0e05fb82d063bbe0995a0b2b910a0be4/external/pip_deps_hjson/BUILD.bazel and referenced by '//:hjson'
ERROR: Analysis of target '//:hjson' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.114s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

🌍 Your Environment

Operating System:

  
macOS 12.1
  

Output of bazel version:

  
Bazelisk version: development
Build label: 4.2.2
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 2 18:28:52 2021 (1638469732)
Build timestamp: 1638469732
Build timestamp as int: 1638469732
  

Rules_python version:

  
http_archive(
    name = "rules_python",
    sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502",
    strip_prefix = "rules_python-0.6.0",
    url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
)

  
@UebelAndre
Copy link
Contributor

UebelAndre commented Jan 19, 2022

This issue is caused by the hjson executable coming from setup.py, and not being a console script (entry point) defined in the wheel.

https://github.com/hjson/hjson-py/blob/master/setup.py#L75

This could potentially be "fixed" (I'd call this more of a feature-request fulfillment) by #575

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!

@github-actions github-actions bot added the Can Close? Will close in 30 days if there is no new activity label Jul 18, 2022
@UebelAndre
Copy link
Contributor

Cc @groodt
This would be fixed by having support for setup.py scripts. Perhaps this can be collapsed or covered to a ticket tracking that specific feature?

@groodt
Copy link
Collaborator

groodt commented Jul 19, 2022

Agreed. I think I'll create an "umbrella" tracking issue for "legacy scripts support".

fwiw, it seems that perhaps hsjon will switch to entrypoints (or at least are being encouraged by conda to do so) hjson/hjson-py#29

@github-actions github-actions bot removed the Can Close? Will close in 30 days if there is no new activity label Jul 19, 2022
@groodt
Copy link
Collaborator

groodt commented Aug 13, 2022

This particular issue with hjson is fixed in hjson==3.1.0.

Tested against the minimal reproduction and it works.

❯ ../../bazel-5.2.0-darwin-x86_64 run //:hjson -- --help
INFO: Analyzed target //:hjson (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @pip_deps_hjson//:rules_python_wheel_entry_point_hjson up-to-date:
  bazel-bin/external/pip_deps_hjson/rules_python_wheel_entry_point_hjson
INFO: Elapsed time: 0.201s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Hjson, a user interface for JSON

Usage:
  hjson [options]
  hjson [options] <input>
  hjson (-h | --help)
  hjson (-V | --version)

Options:
  -h --help     Show this screen.
  -j            Output as formatted JSON.
  -c            Output as JSON.
  -V --version  Show version.

Hjson, a user interface for JSON

Usage:
  hjson [options]
  hjson [options] <input>
  hjson (-h | --help)
  hjson (-V | --version)

Options:
  -h --help     Show this screen.
  -j            Output as formatted JSON.
  -c            Output as JSON.
  -V --version  Show version.

Closing.

@groodt groodt closed this as completed Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants