Skip to content
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

Kill off PEX_PYTHON #431

Closed
CMLivingston opened this issue Nov 30, 2017 · 3 comments · Fixed by #1427
Closed

Kill off PEX_PYTHON #431

CMLivingston opened this issue Nov 30, 2017 · 3 comments · Fixed by #1427

Comments

@CMLivingston
Copy link
Contributor

The pex runtime currently supports a configuration for a PEX_PYTHON variable in a pexrc file. This variable allows a user to define a Python Interpreter to override the default interpreter when executing the pex.

This has been replaced by a PEX_PYTHON_PATH variable, that allows the user to specify a colon-separated list of paths to Python interpreters with the aim of being able support interpreter selection against a list of interpreter override candidates.

The goal of this issue is to completely kill off PEX_PYTHON support in the pex codebase in favor of the new PEX_PYTHON_PATH pexrc variable.

@simeonf
Copy link

simeonf commented Mar 26, 2018

See #53 - isn't there sometimes a use case for "please use exactly this python"? Or is there an alternative way to get that functionality?

@CMLivingston
Copy link
Contributor Author

The idea here is that PEX_PYTHON_PATH is a graduated variant of PEX_PYTHON that says "Use user-supplied constraints and exec with the minimum compatible interpreter from this list of Python interpreters". As of right now, PEX_PYTHON_PATH with only one interpreter will effectively accomplish the same thing as PEX_PYTHON.

@jsirois
Copy link
Member

jsirois commented Aug 27, 2021

Although what @CMLivingston says is True, this is ingrained enough in scripts and a useful enough distinction to meet reasonable user expectations in practice (PATH variables don't normally support the full path to a binary, just to the parent dir), that I think its worth keeping.

@jsirois jsirois closed this as completed Aug 27, 2021
jsirois added a commit to jsirois/pex that referenced this issue Aug 29, 2021

Verified

This commit was signed with the committer’s verified signature.
jsirois John Sirois
Previously, requesting a PEX_PYTHON with an absolute path to an
interpreter might not fail if the interpreter was invalid or if it was
valid but not on a requested PEX_PYTHON_PATH. Fix up both behaviors and
close pex-tool#431 as no longer relevant or well guided.

Clarifies behaviors pex-tool#1422 should support in interpreter selection
effects on `--venv` mode venv directory hashes.
jsirois added a commit that referenced this issue Aug 30, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Previously, requesting a PEX_PYTHON with an absolute path to an
interpreter might not fail if the interpreter was invalid or if it was
valid but not on a requested PEX_PYTHON_PATH. Fix up both behaviors and
close #431 as no longer relevant or well guided.

Clarifies behaviors #1422 should support in interpreter selection
effects on `--venv` mode venv directory hashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants