Skip to content

Add Python 3.15 to the build/test matrix (12.9.x backport)#2133

Open
leofang wants to merge 12 commits into
NVIDIA:12.9.xfrom
leofang:python-3.15
Open

Add Python 3.15 to the build/test matrix (12.9.x backport)#2133
leofang wants to merge 12 commits into
NVIDIA:12.9.xfrom
leofang:python-3.15

Conversation

@leofang
Copy link
Copy Markdown
Member

@leofang leofang commented May 22, 2026

Backport of #2108 to the 12.9.x branch so that cuda-bindings 12.9.x wheels are available for Python 3.15, which the main branch needs in order to build cuda-core.

Changes

  • Add 3.15 / 3.15t to the build matrix in build-wheel.yml
  • Upgrade cibuildwheel from v3.4.1 to v4.0.0rc1 (required for cpython-prerelease support)
  • Add cpython-prerelease to CIBW_ENABLE (v4.0 enables free-threading by default, so cpython-freethreading was dropped)
  • Drop 3.13t from build and test matrices (already removed on main)
  • Work around GNU link.exe (Git for Windows) shadowing MSVC link.exe — only affects pre-release Python on Windows where numpy must build from source
  • Add test entries for 3.15 / 3.15t on all platforms (linux amd64, linux arm64, win-64)
  • Add missing Windows pull-request entries for 3.10, 3.11, 3.14, 3.14t to sync with main
  • Pre-build numpy wheel for Python 3.15 via cibuildwheel (no pre-built wheel available yet). numpy 2.4.x's [tool.cibuildwheel] config is incompatible with cibuildwheel v4.0, so we strip it and build with -Dallow-noblas=true
  • Fix test_graphics_api_smoketest on py3.10/3.11 Windows: catch OSError (pyglet raises FileNotFoundError when opengl32.dll is missing on older Python)
  • Exclude Python 3.15 wheels from release publishing (release.yml) and release upload (ci/tools/download-wheels) — 3.15 is pre-release and not ready for PyPI

Adaptation notes

The following changes from #2108 were not needed on 12.9.x:

  • test-wheel-linux.yml — already has allow-prereleases: true
  • cuda_bindings/pyproject.tomlmatplotlib was already absent from test deps
  • cuda_core/pyproject.tomlcffi was already absent from test deps
  • CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "" — not needed because 12.9.x already sets an explicit delvewheel command that overrides the v4.0 default

Backport of NVIDIA#2108 to the 12.9.x branch so that cuda-bindings 12.9.x
wheels are available for Python 3.15, which the main branch needs in
order to build cuda-core.

- Add 3.15 / 3.15t to the build matrix
- Upgrade cibuildwheel to v4.0.0rc1 (required for cpython-prerelease)
- Enable cpython-prerelease in CIBW_ENABLE
- Add amd64-only test entries for 3.15 / 3.15t (CUDA 12.9.1)
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot Bot commented May 22, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label May 22, 2026
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 22, 2026

/ok to test a79f6c6

@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 22, 2026

/ok to test 2598994

- Remove 3.13t from build matrix and all test matrices (already
  dropped on main).
- Work around Meson finding GNU link.exe (from Git for Windows)
  instead of MSVC link.exe when building numpy from source for
  pre-release Python on Windows.
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 22, 2026

/ok to test d64eefd

Comment on lines +253 to +258
- name: Hide GNU link.exe so Meson finds MSVC link.exe
if: ${{ startsWith(inputs.host-platform, 'win') }}
run: |
if [ -f "/c/Program Files/Git/usr/bin/link.exe" ]; then
mv "/c/Program Files/Git/usr/bin/link.exe" "/c/Program Files/Git/usr/bin/link.exe.bak"
fi
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note: Adding this workaround because it choked Meson:

      ..\meson.build:1:0: ERROR: Found GNU link.exe instead of MSVC link.exe in C:\Program Files\Git\usr\bin\link.EXE.
      This link.exe is not a linker.
      You may need to reorder entries to your %PATH% variable to resolve this.

https://github.com/NVIDIA/cuda-python/actions/runs/26313382675/job/77467388926?pr=2133#step:29:111

@leofang leofang self-assigned this May 22, 2026
@leofang leofang added packaging Anything related to wheels or Conda packages cuda.bindings Everything related to the cuda.bindings module P1 Medium priority - Should do labels May 22, 2026
@leofang leofang added this to the cuda.bindings next milestone May 22, 2026
leofang added 2 commits May 22, 2026 22:59
- Add arm64 entries for 3.15 / 3.15t (linux pull-request)
- Add Windows pull-request entries for 3.10, 3.11, 3.14, 3.14t,
  3.15, 3.15t to keep in sync with main
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 22, 2026

/ok to test 8a2c9c3

NumPy does not ship pre-built wheels for Python 3.15 yet. Build
the wheel from source during the build stage (where compilers are
available), upload it as an artifact, and download/install it in
the test stage before running cuda.bindings tests.
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 22, 2026

/ok to test a7692b4

Linux: build numpy via cibuildwheel inside the manylinux_2_28 container
so the wheel is compatible with the ubuntu:22.04 test container (glibc
2.35). Previously, pip wheel on the host produced a linux_x86_64 wheel
linked against glibc 2.38+, causing ImportError at test time.

Windows: add explicit bash shell to the numpy install step in the test
workflow — PowerShell does not expand *.whl globs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test ee8db04

- Patch numpy 2.4.x pyproject.toml to remove the "cpython-freethreading"
  enable group, which is invalid in cibuildwheel v4.0 (fixed on numpy
  main but not yet released).
- Consolidate Linux/Windows numpy builds into a single cibuildwheel step,
  matching how cuda.core and cuda.bindings are built.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test 3f1f3c0

numpy 2.4.x ships [tool.cibuildwheel] config (OpenBLAS scripts,
cpython-freethreading, ILP64 settings) incompatible with cibuildwheel
v4.0. Strip the entire section from the sdist and build with
-Dallow-noblas=true — we only need numpy for testing, not optimized
linear algebra.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test b808899

The previous regex stripped everything from [tool.cibuildwheel] to EOF,
which also removed [tool.meson-python] with its vendored meson path.
Use a line-by-line approach to only remove cibuildwheel sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test bd3e990

On py3.10/3.11, pyglet raises FileNotFoundError (an OSError subclass)
when opengl32.dll is missing, rather than AttributeError as on py3.12+.
Add OSError to the except clause so the test skips gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test 4898bde

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leofang
Copy link
Copy Markdown
Member Author

leofang commented May 30, 2026

/ok to test fe6d2bb

@leofang leofang marked this pull request as ready for review May 30, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module P1 Medium priority - Should do packaging Anything related to wheels or Conda packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant