Skip to content

BUG: Pin numpy <2.5 for manylinux2014 python test venv - #2659

Merged
blowekamp merged 1 commit into
SimpleITK:releasefrom
blowekamp:fix/manylinux-numpy-cp314t-gcc-pin
Jul 29, 2026
Merged

blowekamp merged 1 commit into
SimpleITK:releasefrom
blowekamp:fix/manylinux-numpy-cp314t-gcc-pin

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Problem

The Package.yml package-docker job (manylinux2014, both x86_64 and aarch64) fails when building the cp314-cp314t (free-threaded Python 3.14) leg:

../meson.build:25:4: ERROR: Problem encountered: NumPy requires GCC >= 10.3

manylinux2014 (CentOS 7) is fixed at devtoolset-10 (GCC 10.2.1), which is the newest toolchain that image ships. NumPy publishes wheels for cp314t only tagged manylinux_2_27/manylinux_2_28, so pip falls back to building numpy 2.5.x from source on manylinux2014 aarch64/x86_64, which now hard-requires GCC >= 10.3 and aborts the whole make step (this happens while creating the local python virtualenv used for CI testing, per Wrapping/Python/LegacyPackaging.cmake, before the wheel is even packaged).

Fix

NumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPyleNumPy 2.4.x already supports Python 3NumPy 2.4.x already supposfully NumPy 2.4.x already jNumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Python 3NumPylePythNumPyrsNumPy 2.4.x already supports Python 3NumPy 2.4.x already supports Pytg/Python/LegacyPackaging.cmake`) — it does not change the distributed wheel's build or runtime requirements.

Follow-up

Long-term, manylinux2014's toolchain will keep falling further behind newer numpy/Python releases. Worth tracking whether to move newer Python ABI legs (e.g. free-threaded builds) to a manylinux_2_28-based image.

@blowekamp
blowekamp marked this pull request as ready for review July 28, 2026 20:18
Numpy 2.5.x requires GCC >= 10.3, but manylinux2014's devtoolset-10
is 10.2.1. Cap numpy at <2.5 for building cp314t from source, and
add VERBATIM so CMake escapes '<' in the pip install command.
@blowekamp
blowekamp force-pushed the fix/manylinux-numpy-cp314t-gcc-pin branch from 29fb840 to 0863690 Compare July 29, 2026 10:40
@blowekamp
blowekamp requested review from Copilot, dave3d and zivy July 29, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the legacy Python packaging/test virtualenv bootstrap to avoid NumPy 2.5+ source builds that fail on manylinux2014 (CentOS 7 / GCC 10.2) for Python ABIs that lack manylinux2014-tagged NumPy wheels (e.g., free-threaded cp314t).

Changes:

  • Pin NumPy to <2.5 during CI test-venv creation to avoid GCC >= 10.3 build requirements on manylinux2014.
  • Add explanatory comments for the pin rationale.
  • Add VERBATIM to the add_custom_command invocation for safer argument escaping.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Wrapping/Python/LegacyPackaging.cmake
@blowekamp
blowekamp merged commit 8b4f14e into SimpleITK:release Jul 29, 2026
8 checks passed
@blowekamp
blowekamp deleted the fix/manylinux-numpy-cp314t-gcc-pin branch September 9, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants