forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pin the PEX_PYTHON{,_PATH} running the pytest pex to avoid using inco…
…mpatible pytest requirements (pantsbuild#7563) ### Problem `PytestPrep` will generate a pex merging python sources and 3rdparty requirements. This pex will have all of the unique python interpreter constraints from all targets applied to the pex before being built. When executing that pex, it appears that the wrong python interpreter may be selected when the interpreter constraint set is intersecting -- see the added test `test_succeeds_for_intersecting_unique_constraints()`. This ends up looking like: ``` Failed to execute PEX file, missing macosx_10_14_x86_64-cp-27-cp27m compatible dependencies for: more-itertools pytest funcsigs pytest-cov coverage ``` ### Solution - Force the selected interpreter used to create the pytest pex to be used when running it by setting `PEX_PYTHON` and `PEX_PYTHON_PATH`. - Add testing for the case of targets with intersecting interpreter constraints (such as `['CPython>=2.7,<4', 'CPython>=3.6']`). ### Result Running python tests targets with overlapping interpreter constraints should work!
- Loading branch information
1 parent
64a389b
commit 823ae84
Showing
6 changed files
with
151 additions
and
63 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
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
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
Oops, something went wrong.