-
Notifications
You must be signed in to change notification settings - Fork 774
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
[bazel] Add PYTHONUSERBASE to list of non-hermetic env vars #18689
Conversation
@HU90m am I misremembering that you were working on bringing the python modules into the Bazel environment? If that work's ongoing, it can replace this. |
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.
Haha LGTM
Does it need a comment? I guess it's pretty self explanatory so people can look it up.
I was considering trying to make it a little more hermetic, but there are bigger fish to fry so I doubt I'll ever get round to it. |
f57ef74
to
c3b48d0
Compare
Sure, added a comment |
c3b48d0
to
5263e5e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
We use python modules from outside of Bazel's "hermetic seal". Without allowing this variable through we always assume they're in the default location. Signed-off-by: James Wainwright <[email protected]>
5263e5e
to
4e3ae7c
Compare
CI failures were an upstream problem. Rebased on the fix and it's passing now. |
The "real fix" would probably be to eliminate system Python use in the build. I'm not sure how big of a problem that is, though. Some work needs to be done with our fusesoc generators so they use the bazel-provided Python, for example. Edit: ...I tried just passing the interpreter around by modifying the PATH in a shim Stuffing in |
@a-will do you have any objection to landing this as a stop gap between having python managed by Bazel? |
Nope, I've been going fine for a while without this env var propagated. Thanks @a-will. |
We use python modules from outside of Bazel's "hermetic seal".
Without allowing this variable through we always assume they're in the default location.
For environments which set
PYTHONUSERBASE
, this leads to confusing behaviour where modules are installed and work outside of Bazel, but not inside.