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

WIP Feature/pip wheels windows #599

Conversation

mottosso
Copy link
Contributor

@mottosso mottosso commented Apr 18, 2019

Based on https://github.com/lambdaclan/rez/commits/feature/pip-install-modern.

Specific to Windows, but also affects Linux, see below.

Problem

Some packages - like lxml, numpy and PySide - 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

$ rez pip --install lxml --use-wheel

Add rez pip --use-wheel to recommend pip 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.

$ rez pip --install --release --use-wheel ^
    Cython ^
    Jinja2 ^
    MarkupSafe ^
    Pillow ^
    PySide ^
    Qt.py ^
    blockdiag ^
    certifi ^
    excel ^
    funcparserlib ^
    lockfile ^
    lxml ^
    ordereddict ^
    pyblish-base ^
    pyblish-lite ^
    pyblish-maya ^
    pythonnet ^
    pywin32 ^
    setuptools ^
    urllib3 ^
    webcolors ^
    xlrd ^
    six

Moving forward

--use-wheel doesn't actually enforce the use of wheel; it merely calls pip 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; whichever pip is available as a package during rez pip would get picked up by this approach - which in a nutshell is python -m pip. I'm probably missing something though, so something to look out for.

@mottosso mottosso changed the title Feature/pip wheels windows WIP Feature/pip wheels windows Apr 18, 2019
@lambdaclan lambdaclan mentioned this pull request Apr 19, 2019
11 tasks
@mottosso
Copy link
Contributor Author

Superseded by #614

@mottosso mottosso closed this May 27, 2019
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 this pull request may close these issues.

1 participant