-
-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harden PythonInterpreter against pyenv shims. (#860)
Previously, Pex encounered hard to diagnose errors when selected interpreters were pyenv shims. These shim files can represent a different interpreter on different executions which broke Pex's assumption that a given binary always corresponded to a given python version. Since we already shell out to an interpreter to gather its `PythonIdentity`, we now include collecting the real final interpeter path from `sys.executable` there. This allows pex to see through a shim to the underlying `$PYENV_ROOT/versions/<version>/bin/python*` interpreter which conforms to the expectation of a given binary corresponding to a given python version. See: pyenv/pyenv#1112 Debugged working #856 which hit otherwise un-explainable errors in `tests/test_pex_bootstrapper.py`. Work towards #782.
- Loading branch information
Showing
2 changed files
with
60 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters