-
Notifications
You must be signed in to change notification settings - Fork 3k
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
place manylinux1 after linux tag #3921
Conversation
PEP 425 tags are designed to score 'the one most specific to the installation environment' above more general tags. Although linux_x86_64 does not mean much *globally*, within the confines of a given machine it means *compiled for this machine*. Placing linux above manylinux1 lets you compile a wheel on your local machine, for your local machine and have it get picked above the manylinux1 wheel from pypi, without disabling manylinux1 completely.
Theory of operation linux_x86_64 wheels only work on your machine but compatibility information is out of band so you can't really share them. This is how Linux ABI compatibility has traditionally worked - only point RHEL7 at the RHEL7 repository. If you like manylinux1 but have problems with the occasional package, as I recently did with a database driver, point pip at a local wheel cache ~/wheelhouse and pypi, and recompile the recalcitrant package into ~/wheelhouse. Pip automatically and unambiguously prefers the ~/wheelhouse linux_x86_64 wheel to the pypi version. Any linux_x86_64 wheel visible to a given invocation of pip is more likely to work correctly on that machine than the manylinux1 alternative. |
The problem is, that pip has not traditionally worked with compatability out of band. The meaning of a This tag is less specific than the manylinux tags, and it should not be preferred over them. This use case should be supported by the ability to define a custom platform tag, something like |
To be clear, I am -1 on merging this. |
Enumerated failure states with workarounds Assume pip is looking at a local repository of your wheels in ~/wheels, plus pypi, and you are making lots of virtualenvs. Current situation with manylinux1 on the top:
If manylinux1 comes after linux_x86_64:
If an environment variable sets the tag:
If the platform tag is a cryptographic hash of the os release plus all installed shared libraries, or all libraries linked to by the wheel: near-zero chance that any system will support the same platform tag. The meaning of linux_x86_64 has not changed. It means "it might be compatible with your 64-bit linux system, and that's all we know". They are super useful for local caching and controlled sharing between identical systems. They are not useful for publishing to pypi or otherwise sharing with strangers. When manylinux1 is on the top, if I want to install a particular database driver that has a broken manylinux1 wheel, I have to either disable manylinux1 entirely, or manually install just that one locally compiled wheel to make my virtualenv work. Here is the very specific situation I see where having manylinux1 first is a win:
|
I agree with Donald on this. |
Is there anyone who would mind this? |
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
So, does moving forward with a machine-specific tag added at the first index sounds like a reasonable way forward for everyone here? note-to-self: |
Note that using some machine ID would not work. On HPC clusters, those would likely be different, yet the environment is the same and the local wheel should still be preferred. Letting one specify a preferred tag in the pip config would be best. |
I consider the linux_x86_64 tag to be analogous non-routeable ip addresses e.g. 192.168.x.y. They may overlap globally but are useful within a controlled set of systems. |
Closing in favor of #6523. |
PEP 425 tags are designed to score 'the one most specific to the
installation environment' above more general tags. Although linux_x86_64
does not mean much globally, within the confines of a given machine
it means compiled for this machine.
Placing linux above manylinux1 lets you compile a wheel on your local
machine, for your local machine, and have it get picked above the
manylinux1 wheel from pypi without disabling manylinux1 completely.