-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
PEX_INHERIT_PATH (and maybe other vars) ignored when venv used from cache #1343
Comments
Where would you expect the PEX to inherit from? It's running in a venv after all. |
Good point from an implementation perspective. But from the user perspective: I've been handed a .pex file (I neither know nor care that it was created with I think that user would expect the PEX to inherit from the venv they think they're in (that is, the venv active in their current shell), and/or from their PYTHONPATH. But if we can't make the feature work sensibly, and you make a good argument for that, then we should probably error out on any attempt to use it? |
Yeah, it's a tough feature generally. Venv aside it almost makes no sense since Pex will pick a compatible interpreter at runtime and maybe that one was not the one you were expecting / doesn't have the extra distributions you wanted. Afaict the feature is only for experimenting unless you either:
I'd prefer to fail fast for unsupported Pex env vars in venv mode until someone can come up with an easy to understand algorithm for picking which env to inherit the path from for a venv pex. I'd like even more to drop the feature! |
Remind me why we have the feature? AFAICT we don't use it in Pants. |
Pretty sure Twitter. You can imagine having a blessed interpreter on a host with puppet installed numerical computing distributions in its site-packages and avoiding shipping those dists over the network in N PEXes. I need to do some research though to confirm this. |
Oh right, that makes sense. Well we should probably keep the feature, I can see how it might be handy. |
Previously you could not ask a `--venv` PEX to run in unzip mode. This regularizes all PEX files so that they can be asked to operate in unzip mode or venv mode whenever possible (venv mode requires the PEX was built with `--include-tools` or `--venv`). Work towards pex-tool#1343.
Previously you could not ask a `--venv` PEX to run in unzip mode. This regularizes all PEX files so that they can be asked to operate in unzip mode or venv mode whenever possible (venv mode requires the PEX was built with `--include-tools` or `--venv`). Work towards #1343.
Previously these were silently ignored which was confusing at best. Fixes pex-tool#1343
Previously these were silently ignored which was confusing at best. Fixes #1343
To reproduce:
expected behavior:
Invalid value for PEX_INHERIT_PATH
error.actual behavior: pex runs from cached venv
Expected behavior can be triggered by:
Obviously the
invalid_val
thing is just an easy way to show whetherPEX_INHERIT_PATH
is being inspected. My real goal is to use it with a valid value and have that value take effect...The text was updated successfully, but these errors were encountered: