Add tests for rez_pip and drop support for installing Python 2 packages #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add tests for rez_pip and drop support for installing Python 2 packages.
We had to drop support for installing Python 2 packages because when running pip with
--python-version
and all the other flags (--platform
, etc), pip doesn't evaluate the markers on the dependencies based on the information provided. It uses the current interpreter's values... In other words, if we run<sys.executable> pip.pyz install <package> --python-version 2.7
wheresys.executable
is a Python 3 executable, we will get the dependencies for Python 3 and not 2! See pypa/pip#11664 for more details.We could potentially hack a solution together, for example by creating a
sitecustomize
orusercustomize
file, or maybe even a.pth
file that would override thesys
andos
values used by markers... But that would be quite fragile.Lastly, the version of pip we need isn't compatible with Python 2.
This means that dropping support for installing Python 2 packages is our only option right now.