Allow the --isolated pip flag to be optionally unset#512
Allow the --isolated pip flag to be optionally unset#512hrfuller merged 5 commits intobazel-contrib:mainfrom UebelAndre:isolated
--isolated pip flag to be optionally unset#512Conversation
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
--isolated flag to be optionally unset--isolated pip flag to be optionally unset
|
Another option for fixing this without a change to the repo would be #335 but for me this is undesirable since since it requires an infra change for something that seems like inconsistent behavior in pip(?) |
Co-authored-by: Henry Fuller <hrofuller@gmail.com>
|
@hrfuller Hey, anything more I need to do for this PR? |
|
@hrfuller Hey, sorry to ping again but it'd be really great if this were to be merged 🙏 😅 |
|
LGTM. Merging. Thanks @UebelAndre |
PR Checklist
Please check if your PR fulfills the following requirements:
.parfiles. See CONTRIBUTING.md for infoPR Type
What kind of change does this PR introduce?
What is the current behavior?
In adopting a wider use of
pip_parseI've run into an issue where the pip config file which defines the cert location for my index_url is not being parsed, leading to failures when attempting to download packages.Issue Number: N/A
What is the new behavior?
This PR introduces flags for optionally disabling the use of the --isolated flag that's currently always passed when invoking pip commands. Users can set
isolated = Falseon uses of pip_parse and pip_install. Additionally, the environment variableRULES_PYTHON_PIP_ISOLATEDcan be set to a falsey value ("0","False") to accomplish the same. The environment variable is intended to allow for this kind of configuration in.bazelrcfiles where users could definecommon --repo_env=RULES_PYTHON_PIP_ISOLATEDto allow for this behavior in specific cases (like on CI machines).I'm not sure if making
--isolatedoptional is the best approach, but I do want to be able to rely on the machine's pip config to determine how to download things. The first alternative I reached for was to useextra_pip_argsto pass --cert but next ran into an issue where--certwas different on different machines. I'm happy to hear some other alternatives though.Does this PR introduce a breaking change?
Other information