-
-
Notifications
You must be signed in to change notification settings - Fork 597
Add py_import rule #174
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
Add py_import rule #174
Conversation
How might I attract a reviewer's attention? :) cc @brandjon |
Can you sync and merge to bring this up to date. It looks pretty reasonable to me. |
Sure. Thanks for looking. |
Apologies for all of the push spam. The project had changed a bit since I last amended this PR. |
🚗 🔫 This looks like it could come in handy. Can this be updated at some stage to support unpacking wheels in future as well? It doesn't even need to resolve additional dependencies, that can be left for the developer, only check that appropriately named wheels exist in Should this PR at least be verifying that you've got a valid There's not much to validate, but at least check the mandatory fields of PKG-INFO? |
This Pull Request 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. |
This change adds adds a `py_import` rule to import Python eggs like `java_import` imports Java jars. py_import.egg generated using `zipper`[1]: ```console $ third_party/ijar/zipper Cc examples/py_import/py_import.egg examples/py_import/helloworld.py=examples/helloworld/helloworld.py examples/__init__.py= examples/py_import/__init__.py= ``` Partially addresses bazelbuild/bazel#7312. Addresses #222. [1]: https://github.com/bazelbuild/bazel/tree/master/third_party/ijar Testing Done: ```console $ bazelisk test --override_repository=rules_python=$PWD/../.. ... //:py_import_test PASSED in 0.6s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @beasleyr-vmw !!
you mention |
Good q. The .egg's internal |
I just found that as well, trying to get the new integration test to pass, thanks! |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
This change adds adds a
py_import
rule to import Python eggs likejava_import
imports Java jars.py_import.egg generated using
zipper
1:$ third_party/ijar/zipper Cc examples/py_import/py_import.egg examples/py_import/helloworld.py=examples/helloworld/helloworld.py examples/__init__.py= examples/py_import/__init__.py=
Partially addresses bazelbuild/bazel#7312.
Addresses #222 .
Testing Done: