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.
Based on https:/lambdaclan/rez/commits/feature/pip-install-modern.
Specific to Windows, but also affects Linux, see below.
Problem
Some packages - like
lxml
,numpy
andPySide
- have wheels that avoid a need to compile, solving primarily for Windows users - whom may not have the necessary compilers installed for building those.The cost however is that this approach couldn't separate the source, header and lib files, like a vanilla
rez-pip
would.Solution
Add
rez pip --use-wheel
to recommendpip
to use wheels when possible, and fall back to building otherwise (default pip behavior). Backwards compatibility is maintained by having the argument be optional.Test
Confirmed to work with these, both wheel and non-wheels alike.
Moving forward
--use-wheel
doesn't actually enforce the use of wheel; it merely callspip install
without additional arguments, which just so happens to default to using wheels. The question is whether--use-wheel
should force a wheel, and fail if none is found. Or if--use-wheel
is the best name for this argument.I also removed the ability to pick a
pip
version; not because it isn't important, but because it simplified the implementation and I honestly couldn't see a need to separate between both Python and Pip versions; whicheverpip
is available as a package duringrez pip
would get picked up by this approach - which in a nutshell ispython -m pip
. I'm probably missing something though, so something to look out for.