-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
easy_install: add support for installing from wheels #1200
Conversation
I forgot to mention the rational for this PR: with development of PEP 517/518 support in hiatus, it might be a while before there's an alternative for setuptools' setup_requires. But some Python packages are not installable from source (and don't provide eggs), yet can be used for building other packages: for example PyQt5 is only installable from wheel, and provide some tools needed for generating UI files (pyrcc5, pyuic5). |
Since headers are not correctly supported, this patch could introduce some issues for users that still rely easy_install instead of pip, maybe the main easy_install module/script should be removed? Alternatively, wheels could be opt-in when using easy_install directly (but always enabled when internally used by setuptools). |
I wonder if it makes sense to extract those modules into packages that could then be vendored and shared by both codebases. Otherwise, we'll inevitably end up dealing with the divergence of these two modules (which has already happened). At the very least, I'd like for each module to have a header describing where it's canonical source resides and keep a log of changes against that source). It's a little ironic that Setuptools has been waiting for pip to drop Python 2.6 support but now that it's potentially adopting pip modules, it has to restore Python 2.6 support. :( I think that's a sign that we should just merge and release the drop-py26 branch. I'll do that. |
As part of packaging maybe? See pypa/packaging#83
👍 |
Yes, that sounds like the right solution. I'm okay with vendoring the modules here until they're released with packaging, especially if there's a comment reminding us that that's what's happening. Also, Python 2.6 support is now dropped. |
Note: wheels are installed as eggs, so each install is self-contained and multiple versions of the same package can be installed at the same time. Limitations: - headers are not supported - resulting egg metadata requirements have their markers stripped
c089487
to
118edbb
Compare
I removed the changes for Python 2.6 support, and updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Do you mind adding the changelog entry and cutting the release (per https://github.com/pypa/setuptools/blob/master/docs/releases.txt)?
OK, minor or major? I think this is a pretty big change considering the impact on easy_install's behavior. |
If it’s backward incompatible, meaning that some users might not be able to use setuptools as they did before without intervention, then a major bump is indicated. If it’s only a bug fix for existing behavior, then it’s a patch bump. Otherwise, it’s a minor bump. The Semver bump doesn’t consider the size of the change, only the scope of the change. |
Well, I was concerned by the fact that headers are not completely supported (not installed to include directory), but a quick test shows that building an egg with |
Wheels are installed as eggs, so each install is self-contained and multiple versions of the same package can be installed at the same time.
Limitations:
- headers are not supported: since they are extracted to the self-contained egg directory, and not copied to the system includes directory
- resulting egg metadata requirements have their markers stripped: in practice, since eggs' name include the Python version (so using
python2 setup.py ...
followed bypython3 setup.py ...
will work if one of setup_requires' requirement has one or more Python 3 specific dependencies).Note:
glib.c
andpep425tags.py
were copied from pip (not wheel, for manylinux support), and modified for Python 2.6 compatibility.