-
-
Notifications
You must be signed in to change notification settings - Fork 594
Add python_interpreter attr to pip rules #252
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
Conversation
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. |
I can't tell from this but is there a way to use this with your custom defined python toolchains that already encode the specific paths to interpreters? Or would this work by duplicating those paths? |
It doesn't look like it. |
This won't interact with toolchains at all because the pip rules run at This has the downside that a given repo definition has no way to run different Python commands on different systems. |
Note that 2571dcf is a rebased and slightly modified (by me) version of @acumon's 3e1f35c. The googlebot doesn't detect this because the email address on the commit metadata doesn't match, but it's the same email as on the original PR #158. Overriding the googlebot check since consent to contribute was already established in #158. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
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. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
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.
The code looks reasonable. But, honestly, it is impossible to tell if attribute doc specs are formatted correctly. But that is not your problem.
This commit also added --python_interpreter argument to piptool.py to support this attribute. Example usage: pip_import( name = 'pip_deps', requirements = '//:requirements.txt', python_interpreter = 'python3.7', )
This required some bootstrapping using a partially reverted version of the previous commit. The regeneration needs to happen after piptool.py is modified to accept the flag, but before pip.bzl is modified to pass it.
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. |
Force-pushed a rebase now that #251 is merged. Overriding the CLA for the same reasons, hopefully for the last time on this PR. |
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
This is a rebase of @acumon's #158. It adds a
python_interpreter
attribute topip_import
andwhl_library
to allow customizing the command used to launch the Python interpreter. We'll follow this up with creatingpip2_import
andpip3_import
as wrappers around this feature.Diffbased against #251, which fixes documentation for these rules.
Work toward #249. Closes #158.