From 19451021245361a05aa2e16feec40f59eedcfed2 Mon Sep 17 00:00:00 2001 From: tirthpatel90 Date: Thu, 23 Jul 2026 21:50:27 +0530 Subject: [PATCH 1/3] ci: drop custom NumPy builds for Python 3.15 Signed-off-by: tirthpatel90 --- .github/workflows/build-wheel.yml | 60 +----------------------- .github/workflows/test-wheel-linux.yml | 12 ----- .github/workflows/test-wheel-windows.yml | 13 ----- 3 files changed, 1 insertion(+), 84 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 4dac9c8eca9..5e943e163c3 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -366,65 +366,7 @@ jobs: 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 - - # TODO: remove the numpy pre-build steps once 3.15 is officially supported - # (numpy will publish pre-built 3.15 wheels at that point) - - name: Download and patch numpy sdist (pre-release Python) - if: ${{ startsWith(matrix.python-version, '3.15') }} - run: | - pip download --no-binary numpy --no-deps "numpy>=1.21.1" -d numpy-sdist/ - cd numpy-sdist && tar xf numpy-*.tar.gz && rm numpy-*.tar.gz - # WAR: numpy 2.4.x ships [tool.cibuildwheel] config that is - # incompatible with cibuildwheel v4.0 (cpython-freethreading enable - # group, OpenBLAS before-build scripts, etc.). Strip the cibuildwheel - # sections but preserve [tool.meson-python] (vendored meson path). - python -c " - import glob - for f in glob.glob('numpy-*/pyproject.toml'): - lines, skip = open(f).readlines(), False - out = [] - for line in lines: - hdr = line.strip() - if hdr.startswith('[tool.cibuildwheel') or hdr.startswith('[[tool.cibuildwheel'): - skip = True - continue - if skip and hdr.startswith('[') and 'cibuildwheel' not in hdr: - skip = False - if not skip: - out.append(line) - open(f, 'w').writelines(out) - " - echo "NUMPY_SRC_DIR=$(pwd)/$(ls -d numpy-*/)" >> $GITHUB_ENV - - - name: Build numpy wheel (pre-release Python) - if: ${{ startsWith(matrix.python-version, '3.15') }} - uses: pypa/cibuildwheel@294735312765b09d24a2fbec22660ce817587d55 # v4.1.0 - env: - CIBW_BUILD: ${{ env.CIBW_BUILD }} - CIBW_SKIP: "*-musllinux* *-win32" - CIBW_ARCHS_LINUX: "native" - CIBW_BUILD_VERBOSITY: 1 - CIBW_CONFIG_SETTINGS: "setup-args=-Dallow-noblas=true" - CIBW_CONFIG_SETTINGS_WINDOWS: "setup-args=--vsenv setup-args=-Dallow-noblas=true" - CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel" - CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}" - CIBW_ENABLE: "cpython-prerelease" - with: - package-dir: ${{ env.NUMPY_SRC_DIR }} - output-dir: numpy-wheel/ - - - name: Upload numpy wheel - if: ${{ startsWith(matrix.python-version, '3.15') }} - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }} - path: numpy-wheel/*.whl - if-no-files-found: error - - - name: Install numpy wheel - if: ${{ startsWith(matrix.python-version, '3.15') }} - run: pip install numpy-wheel/*.whl - + - name: Build cuda.bindings Cython tests run: | pip install ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl --group ./cuda_bindings/pyproject.toml:test diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 4971d56f832..c925109fde1 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -311,18 +311,6 @@ jobs: host-platform: ${{ inputs.host-platform }} cuda-version: ${{ matrix.CUDA_VER }} - # TODO: remove the numpy wheel steps once 3.15 is officially supported - - name: Download numpy wheel (pre-release Python) - if: ${{ startsWith(matrix.PY_VER, '3.15') }} - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }} - path: numpy-wheel - - - name: Install numpy wheel (pre-release Python) - if: ${{ startsWith(matrix.PY_VER, '3.15') }} - run: pip install numpy-wheel/*.whl - - name: Set up latest cuda_sanitizer_api if: ${{ env.SETUP_SANITIZER == '1' }} uses: ./.github/actions/fetch_ctk diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index e2ff59f39e5..e63cdd7043a 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -295,19 +295,6 @@ jobs: host-platform: ${{ inputs.host-platform }} cuda-version: ${{ matrix.CUDA_VER }} - # TODO: remove the numpy wheel steps once 3.15 is officially supported - - name: Download numpy wheel (pre-release Python) - if: ${{ startsWith(matrix.PY_VER, '3.15') }} - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: numpy-python${{ env.PYTHON_VERSION_FORMATTED }}-${{ inputs.host-platform }} - path: numpy-wheel - - - name: Install numpy wheel (pre-release Python) - if: ${{ startsWith(matrix.PY_VER, '3.15') }} - shell: bash --noprofile --norc -xeuo pipefail {0} - run: pip install numpy-wheel/*.whl - - name: Set up test repetition on nightly runs shell: bash --noprofile --norc -xeuo pipefail {0} run: echo "PYTEST_ADDOPTS=\"--count=${{ inputs.nruns }}\"" >> "$GITHUB_ENV" From 79a5267393bb8c6d83b9ab2701579a0f76d36438 Mon Sep 17 00:00:00 2001 From: tirthpatel90 Date: Fri, 31 Jul 2026 14:00:11 +0530 Subject: [PATCH 2/3] ci: enable scientific-python-nightly-wheels index for Python 3.15 Signed-off-by: tirthpatel90 --- .github/workflows/build-wheel.yml | 4 ++++ .github/workflows/test-wheel-linux.yml | 4 ++++ .github/workflows/test-wheel-windows.yml | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 5e943e163c3..a97a2266374 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -342,6 +342,10 @@ jobs: # TODO: remove allow-prereleases once 3.15 is officially supported allow-prereleases: ${{ startsWith(matrix.python-version, '3.15') }} + - name: Enable Scientific Python Nightly Wheels for Python 3.15 + if: ${{ startsWith(matrix.python-version, '3.15') }} + run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + - name: verify free-threaded build if: endsWith(matrix.python-version, 't') run: python -c 'import sys; assert not sys._is_gil_enabled()' diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index c925109fde1..df039d5fce1 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -303,6 +303,10 @@ jobs: # we use self-hosted runners on which setup-python behaves weirdly (Python include can't be found)... AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache" + - name: Enable Scientific Python Nightly Wheels for Python 3.15 + if: ${{ startsWith(matrix.PY_VER, '3.15') }} + run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + - name: Set up mini CTK if: ${{ matrix.LOCAL_CTK == '1' }} uses: ./.github/actions/fetch_ctk diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index e63cdd7043a..f0dc403a08e 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -278,6 +278,11 @@ jobs: with: python-version: ${{ matrix.PY_VER }} + - name: Enable Scientific Python Nightly Wheels for Python 3.15 + if: ${{ startsWith(matrix.PY_VER, '3.15') }} + shell: bash --noprofile --norc -xeuo pipefail {0} + run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + - name: Verify LongPathsEnabled run: | $val = (Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled').LongPathsEnabled From af0c73a4ad90de520c8af4f14d09e64332b59a64 Mon Sep 17 00:00:00 2001 From: tirthpatel90 Date: Fri, 31 Jul 2026 17:46:17 +0530 Subject: [PATCH 3/3] ci: set PIP_ONLY_BINARY and relax numpy version pin for Python 3.15 Signed-off-by: tirthpatel90 --- .github/workflows/build-wheel.yml | 5 ++++- .github/workflows/test-wheel-linux.yml | 5 ++++- .github/workflows/test-wheel-windows.yml | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 37edfef537a..470d60243b4 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -347,7 +347,10 @@ jobs: - name: Enable Scientific Python Nightly Wheels for Python 3.15 if: ${{ startsWith(matrix.python-version, '3.15') }} - run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + run: | + echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV" + echo "NUMPY_VERSION=<=2.6.0.dev0" >> "$GITHUB_ENV" - name: verify free-threaded build if: endsWith(matrix.python-version, 't') diff --git a/.github/workflows/test-wheel-linux.yml b/.github/workflows/test-wheel-linux.yml index 32dfe2ec2ec..6fdb6e4fe0d 100644 --- a/.github/workflows/test-wheel-linux.yml +++ b/.github/workflows/test-wheel-linux.yml @@ -308,7 +308,10 @@ jobs: - name: Enable Scientific Python Nightly Wheels for Python 3.15 if: ${{ startsWith(matrix.PY_VER, '3.15') }} - run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + run: | + echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV" + echo "NUMPY_VERSION=<=2.6.0.dev0" >> "$GITHUB_ENV" - name: Set up mini CTK if: ${{ matrix.LOCAL_CTK == '1' }} diff --git a/.github/workflows/test-wheel-windows.yml b/.github/workflows/test-wheel-windows.yml index 0959b74027d..b40c6366fb8 100644 --- a/.github/workflows/test-wheel-windows.yml +++ b/.github/workflows/test-wheel-windows.yml @@ -286,7 +286,10 @@ jobs: - name: Enable Scientific Python Nightly Wheels for Python 3.15 if: ${{ startsWith(matrix.PY_VER, '3.15') }} shell: bash --noprofile --norc -xeuo pipefail {0} - run: echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + run: | + echo "PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" >> "$GITHUB_ENV" + echo "PIP_ONLY_BINARY=numpy" >> "$GITHUB_ENV" + echo "NUMPY_VERSION=<=2.6.0.dev0" >> "$GITHUB_ENV" - name: Verify LongPathsEnabled run: |