Repository navigation
manylinux: stop at glibc 2.17 on every arch except x86_64 and i686 - #92
Conversation
…heelgap#79) pip (packaging._manylinux.platform_tags) generates manylinux floors down to glibc 2.5 only on x86_64 and i686 (`too_old_glibc2 = (2, 4)`); every other arch's first manylinux was 2.17 (manylinux2014), and it yields no floors below 2.17 (`too_old_glibc2 = (2, 16)`). wheelgap generated them all the way down for every arch, so `manylinux_2_12_aarch64` counted as accepted on `linux-aarch64` though pip would refuse it. `manylinux_platforms` now stops at minor 17 unless the arch is x86_64 or i686; a target whose `--glibc` is itself below the arch floor takes only plain `linux_<arch>` wheels, as pip does. armv7l is not in packaging's host-ELF `_ALLOWED_ARCHS` but is detected by `_is_linux_armhf` and gets the same 2.17 floor; `musllinux_platforms` is untouched (PEP 656 has no such arch floors). The legacy-alias gating is untouched: `manylinux2014_<arch>` still appears at 2.17, and `manylinux2010`/`manylinux1` stay x86-only. Closes wheelgap#79
|
Thanks @shounakjoshi88-a11y, this is a really careful fix! The new floor lines up exactly with
Prompt for your AI assistant (if you use one)(Review assisted by Claude.) |
|
@shounakjoshi88-a11y, a few additions to the review above, from a second pass. The two points there still stand: keep the floor to glibc major 2, and fix the i686 wording. On top of those:
Prompt for your AI assistant (if you use one): covers both reviews(Review assisted by Claude.) |
e709bcc to
fc7e0a0
Compare
|
Pushed fc7e0a0 covering both reviews:
Gates: |
|
Thanks @shounakjoshi88-a11y, this covers everything from both reviews, and the exact-list tests at the 2.16/2.17 boundary are exactly what was needed. The One thing is blocking it: the branch now has a merge conflict in
Once that's pushed, CI will run, and if it's green this can go in. (Review assisted by Claude.) |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…in case Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged, thanks @shounakjoshi88-a11y, and welcome! Your update covered both reviews well. We moved the CHANGELOG line back under Unreleased after merging main, and added one more |
|
Merged - thanks for the two thorough review rounds; the boundary-list pinning suggestions made the fix much stronger. Happy to help with the follow-ups here anytime. |
Closes #79
What this changes
manylinux_platforms()insrc/wheelgap/targets.pyenumeratedmanylinux_2_*floors from the target's glibc down to 2.5 (plus legacy aliases) for every architecture. pip only accepts floors down to 2.5 on x86_64/i686: inpackaging._manylinux.platform_tagsthe oldest floor is(2, 4)-exclusive on x86 and(2, 16)-exclusive everywhere else, whose range bottoms out at minor 17 — those arches had no manylinux before manylinux2014 (PEP 599). So wheelgap counted e.g.manylinux_2_12_aarch64as accepted onlinux-aarch64when pip would refuse it.The function now stops at minor 17 unless the arch is
x86_64/i686:A target whose
--glibcis itself below its arch floor (e.g.linux-aarch64 --glibc 2.12) now enumerates no manylinux tags at all, just plainlinux_<arch>— which is exactly what pip takes on such a host. Legacy-alias gating (_LEGACY_ARCHES) is untouched:manylinux2014_<arch>still appears at 2.17 andmanylinux2010/manylinux1aliases stay x86-only.musllinux_platformsis untouched (PEP 656 has no arch floors).New tests in
tests/test_targets.py(the issue's two named cases plus the rest of the glibc arches):test_manylinux_below_2_17_is_rejected_outside_x86_arches[aarch64/armv7l/ppc64le/s390x/riscv64]—manylinux_2_12_<arch>rejected on each of the five arches' targets.test_manylinux_2_12_is_still_accepted_on_x86_64test_manylinux_stops_at_2_17_outside_x86_and_i686— 2.17 present / 2.12 absent on all five;manylinux2014_aarch64still in; x86_64/i686 still carry 2.5.test_manylinux_target_below_the_arch_floor_takes_only_plain_linux—linux-aarch64withglibc=(2, 8)→["linux_aarch64"].What I ran:
uv run --group dev pytest/ruff format ./ruff check ./mypyall clean — 332 passed, 1 skipped (324 before + these 8 test items); the new tests fail on the unfixed code (verified by stashingtargets.pyand re-running). As a user:uv run wheelgap numpy -t all→ wheel for all 8 targets;uv run wheelgap numpy -t linux-aarch64→ wheel accepted;uv run wheelgap numpy -t linux-aarch64 --glibc 2.12→ correctly a gap ("1 will build from source"), since numpy's 2.28-floor aarch64 wheel can't run on a 2.12 target. Floor cross-checked against the installedpackaging(26.3) source (platform_tags'stoo_old_glibc2and range bottoms). Windows box, soplatform_tagscouldn't run as a live host; the constants and range semantics are read from the module and mirrored.armv7lisn't in packaging's_ALLOWED_ARCHShost-ELF set but is detected through_is_linux_armhf; it gets the same 2.17 floor. No CHANGELOG-adjacent README change is needed (no new flag, target or input format).Checklist
fake_pypior a fixture)uv run --group dev ruff format .anduv run --group dev ruff check .passuv run --group dev pytestpassesCHANGELOG.mdhas a line under## Unreleased(if users would notice the change)