You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I designed packaging tags to come in order of "most specific to this machine" to "least specific to this machine". Unfortunately pip has interpreted this as meaning "most specified", putting "manylinux1" before "linux_x86_64", even though any "linux_x86_64" wheels visible to pip should have been compiled on exactly the machine you're in.
When a particular manylinux wheel is broken, you should be able to compile a linux_x86_64 wheel, add it to pip's search path, and pip would prefer the wheel you compiled. With manylinux1 first the option of having a folder of known-good-and-preferred wheels is not available, instead you have to use no-binary or avoid specific packages.
It would also be helpful if a packaging tool could just pick the first tag from the list, instead of skipping all the manylinux tags, when choosing a tag for a new binary wheel.
Five years later and the 'local' tag hasn't gone anywhere. There's another impact of this that has hurt several backends: this is wrong if the linux tag isn't "higher" priority than the manylinux tags: next(packaging.tags.sys_tags(), which was used by (at least) scikit-build-core, hatchling, and probably others. Fixing this bug has caused people to complain because they "were producing manylinux" wheels already without auditwheel (in tag only). I would have expected linux tag to be above generalized redistributable tags, and I'd expect if someone built an sdist into a wheel, that would be preferred over a generalized "manylinux" wheel with bundled dependencies.
IMO, linux should come before many/musl even if #239 was added; the argument was that it supported macOS and Windows too, but on linux there's already a "native/redistributable" distinction due to many/musllinux while those don't have a "redistributiable/non-redistributable" distinction yet. "local" tags could still be first; I'd assume most/all build backends would still produce the linux tag first, and you'd have to opt into or retag for local.
Reacted by Daniel Holth, Ofek Lev, Vyas Ramasubramani, Matthieu Darbois and Guilhem Saurel
After thinking about this a bit this weekend, I think I'm up for this change happening. I don't think the breakage would be large, and logically it makes sense.
I used to have a deployment scenario where I collected wheels in linux CI with pip wheel, to be deployed on target linux machines which had a different linux flavor. In that scenario, I was happy to get the manylinux wheels and not the wheels specific to the CI platform.
I suspect this scenario will now break.
I don't know if that is a common practice and I'm certainly not mentioning it to prevent this change, but I wanted to report it just in case.
Activity
Make 'linux' tags take precedence over manylinux ones
brettcannon commentedon Oct 21, 2019
There's disagreement over whether this should occur in the pip issue tracker at pypa/pip#6523, so this is on hold until that's resolved.
xavfernandez commentedon Oct 21, 2019
I think an agreement was found to add a new
local/localhostplatform tag that would always be considered as the most specific platform.This would need an update on PEP-425 (or a new one) to make it official though.
(cf pypa/pip#6565 (comment))
brettcannon commentedon Oct 21, 2019
@xavfernandez I'm waiting for someone to state that without using the word "I think". 😉
xavfernandez commentedon Oct 21, 2019
Well, Daniel seemed to be in favor since he's the author of pypa/pip#6565.
And nobody has objected yet.
It might be interesting to have @dstufft opinion on the
localplatform tag since he was opposed to the first version.pradyunsg commentedon Oct 22, 2019
IMO,
localhost/localtag makes sense. If @dstufft isn't opposed, we should move ahead.dstufft commentedon Nov 16, 2019
I don't have any problems with some sort of explicit "local" tag.
pradyunsg commentedon Nov 16, 2019
Closing in favor of #239 then. :)
henryiii commentedon Apr 29, 2024
Five years later and the 'local' tag hasn't gone anywhere. There's another impact of this that has hurt several backends: this is wrong if the linux tag isn't "higher" priority than the manylinux tags:
next(packaging.tags.sys_tags(), which was used by (at least) scikit-build-core, hatchling, and probably others. Fixing this bug has caused people to complain because they "were producing manylinux" wheels already without auditwheel (in tag only). I would have expectedlinuxtag to be above generalized redistributable tags, and I'd expect if someone built an sdist into a wheel, that would be preferred over a generalized "manylinux" wheel with bundled dependencies.The fix for backends is:
IMO,
linuxshould come before many/musl even if #239 was added; the argument was that it supported macOS and Windows too, but on linux there's already a "native/redistributable" distinction due to many/musllinux while those don't have a "redistributiable/non-redistributable" distinction yet. "local" tags could still be first; I'd assume most/all build backends would still produce thelinuxtag first, and you'd have to opt into or retag for local.brettcannon commentedon Jun 14, 2024
I've reopened the issue.
Update tests for hatchling 1.25
1 remaining item
brettcannon commentedon Jul 8, 2024
After thinking about this a bit this weekend, I think I'm up for this change happening. I don't think the breakage would be large, and logically it makes sense.
brettcannon commentedon May 19, 2026
Looks like we have a PR for this now. Do we want to go through with this breaking change?
henryiii commentedon May 27, 2026
I think it's a good idea, hopefully not too breaking?
brettcannon commentedon May 27, 2026
🤞
sbidoul commentedon May 28, 2026
I used to have a deployment scenario where I collected wheels in linux CI with
pip wheel, to be deployed on target linux machines which had a different linux flavor. In that scenario, I was happy to get the manylinux wheels and not the wheels specific to the CI platform.I suspect this scenario will now break.
I don't know if that is a common practice and I'm certainly not mentioning it to prevent this change, but I wanted to report it just in case.
docs(tags): add `.. versionchanged:: 26.3` for native linux_* tag ord…
docs(tags): add `.. versionchanged:: 26.3` for native linux_* tag ord…
Beef up documentation on tag test. (#139)
[python_system.bzl] Skip initial "local" tag on Linux.
[python_system.bzl] Skip initial "local" tag on Linux.
[python_system.bzl] Skip initial "local" tag on Linux.