-
Notifications
You must be signed in to change notification settings - Fork 336
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
Make rez pip useful #612
Comments
We haven't addressed them yet due to our current size and complexity, but those are great points and issues that I definitely support. There was a point where I noticed it could be an issue e.g. upgrading from even just
One thing I'll mention, though not sure how relevant it is, is we run our Having worked in bigger companies, I definitely see the benefits your PR and it would help tidy up and prepare our packages for whenever python 3 comes around (now that's another can of delicious worms). Compared with what I'm use to, we're very flexible when it comes to changing our package setups and releases so trying out any improvements are always welcome |
I think the proposal sounds great. A couple other points that I think would be useful. 1. Don't implement rez pip using cmake.It's a pain to get working on windows, and has a number of dependencies that aren't necessary for doing python installs. Ideally, 2. Make sure you can generate variants separately.One issue to look out for whenever you're generating With a normal If you're only generating variants dynamically one-at-a-time, you'll need to look at the existing install/release to get the other variants when generating the |
Thank you gentlemen, the implementation for this is currently a PR and has been working well so far (~80 pip packages tested so far); both with explicitly defining variants, auto-detecting them, and installing from other sources like off of disk and straight from GitHub. Take it for a spin and let me know if you encounter any issues. |
In order to be useful, I think rez-pip needs to be pessimistic - ie, it is
better to be overly specific wrt requirements than it is to get them wrong,
or to depend on the user to know them. The more the user needs to know
stuff, the less the'll want to use it.
I agree that there needs to be some way to override the requirements
yourself however.
There is also more to consider beyond what you mention here - we haven't
taken varianting into consideration. Ie, should the resultant rez package
be varianted on python, or not? That's a more complex topic than I want to
cover here as it starts touching on a lot of stuff.
A
…On Wed, Apr 24, 2019 at 7:52 PM Marcus Ottosson ***@***.***> wrote:
Goal
Make pip great again. Or rather, make pip actually useful.
Motivation
rez pip --install currently creates a Rez package from a Python package
on PyPI, which is great. However it also embeds overly specific
requirements for the package.
Consider the following example.
$ rez pip --install Qt.py
The resulting package is..
~/packages/Qt.py/1.1.0/platform-windows/arch-AMD64/os-windows-10.0.17763/python-3.6/
Meaning that in order to use this package, you'll need:
- A Windows OS
- Of the exact version 10.0.17763
- Python 3.6
- A 64-bit machine
Even though Qt.py works on..
- Any OS
- Any version of Windows (and Linux, and MacOS)
- Any arch
- Any Python
The same is true for any package, including compiled ones. A compiled
PyQt5 would require an exact arch, an exact platform and Python
distribution, but not the exact version of OS.
Some packages require Python 2 or 3, but not necessarily the minor
version; thus python-3 is sufficient to support all 3.x versions.
Proposal
Ditch rez pip as it exists today, and make this the new default.
$ rez pip --install Qt.py# Installed using wheels, as per #602
Resulting in:
~/packages/Qt.py/1.1.0/package.py
With options for:
$ rez pip --install Qt.py --require platform-windows --require python-3.6
For wheels specific to a particular OS or interpreter, like PySide, it
could then look towards a provided --require python-X to determine which
Python to build/download for.
That's assuming you, the one installing a package from pip, knows full
well what a package requires and aren't dependent on the information being
inferred from its metadata.
However, for when you don't and the information is there:
$ rez pip --install UnfamiliarPackage --auto-require
Which could look at whatever sources is available to a package on pip to
figure out the requirements needed.
Thoughts?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#612>, or mute the thread
<https:/notifications/unsubscribe-auth/AAMOUSXB3Q57DYRWJKGWA6TPSAUWZANCNFSM4HICHTQQ>
.
|
The current wheel format should tell you this. It has metadata that indicates it it works for both py2/3 or just a specific versions of python. |
@bpabel is right, have a look at the PR for this, it continues along these lines and takes variants like the ones you mention into account. |
Closing this in favour of #614 |
Goal
Make pip great again. Or rather, make pip actually useful.
Motivation
rez pip --install
currently creates a Rez package from a Python package on PyPI, which is great. However it also embeds overly specific requirements for the package.Consider the following example.
The resulting package is..
Meaning that in order to use this package, you'll need:
10.0.17763
Even though Qt.py works on..
The same is true for any package, including compiled ones. A compiled PyQt5 would require an exact arch, an exact platform and Python distribution, but not the exact version of OS.
Some packages require Python 2 or 3, but not necessarily the minor version; thus
python-3
is sufficient to support all 3.x versions.Proposal
Ditch
rez pip
as it exists today, and make this the new default.$ rez pip --install Qt.py # Installed using wheels, as per #602
Resulting in:
With options for:
For wheels specific to a particular OS or interpreter, like PySide, it could then look towards a provided
--variant python-X
to determine which Python to build/download for.That's assuming you, the one installing a package from pip, knows full well what a package requires and aren't dependent on the information being inferred from its metadata.
However, for when you don't and the information is there:
Which could look at whatever sources is available to a package on pip to figure out which variants to package it under.
Thoughts?
The text was updated successfully, but these errors were encountered: