From 38df4a3028c3978d3a7f7521d8276c363ea78414 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 15 Oct 2024 17:46:55 +0200 Subject: [PATCH 1/2] MAINT: some cleanups for Python 3.13 support, no pre-releases needed anymore --- .github/workflows/wheel_tests_and_release.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index 8227a29b0..8674ea377 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -46,7 +46,7 @@ jobs: python-version: "3.10" - name: Install build deps; set CIBW environment variables - if: ${{ matrix.cibw_python }} == "cp313" || ${{ matrix.cibw_python }} == "cp313t" + if: ${{ matrix.cibw_python }} == "cp313t" run: | PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" CIBW_DEPS="pip install --upgrade pip build &&\ @@ -146,7 +146,7 @@ jobs: python-version: "3.12" - name: Install build deps; set CIBW environment variables - if: ${{ matrix.cibw_python }} == "cp313" || ${{ matrix.cibw_python }} == "cp313t" + if: ${{ matrix.cibw_python }} == "cp313t" run: | PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" CIBW_DEPS="pip install --upgrade pip build &&\ diff --git a/pyproject.toml b/pyproject.toml index 4326ffa9d..3c1a6ecb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ requires = [ # redistributors can do this by installing the numpy version they like and # disabling build isolation. "numpy>=2.0.0; python_version<'3.13'", - "numpy>=2.1.0.rc1; python_version>='3.13'", + "numpy>=2.1.0; python_version>='3.13'", ] [project] From ffec299d17953da84f7f8f9ccc13d38b0dca4a5a Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Tue, 15 Oct 2024 17:49:35 +0200 Subject: [PATCH 2/2] CI: build free-threaded Windows wheels Note: we don't add scipy dependency on Windows, because it's not needed and there won't be win32 scipy wheels (and cp313t for amd64 is not yet available either). --- .github/workflows/wheel_tests_and_release.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheel_tests_and_release.yml b/.github/workflows/wheel_tests_and_release.yml index 8674ea377..776604cf6 100644 --- a/.github/workflows/wheel_tests_and_release.yml +++ b/.github/workflows/wheel_tests_and_release.yml @@ -190,7 +190,7 @@ jobs: matrix: os: [windows-latest] cibw_arch: ["AMD64", "x86"] - cibw_python: ["cp310", "cp311", "cp312", "cp313"] + cibw_python: ["cp310", "cp311", "cp312", "cp313", "cp313t"] steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -213,6 +213,19 @@ jobs: with: architecture: x64 + - name: Install build deps; set CIBW environment variables + if: ${{ matrix.cibw_python }} == "cp313t" + shell: bash -el {0} + run: | + PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" + CIBW_DEPS="pip install --upgrade pip build &&\ + pip install --pre -i $PYPI_URL cython numpy &&\ + pip install pytest meson-python ninja" + NO_BUILD_ISOLATION="pip; args: --no-build-isolation" + echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV" + echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV" + echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV" + - name: Build Windows wheels for CPython uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1 with: @@ -220,6 +233,7 @@ jobs: env: CIBW_BUILD: ${{ matrix.cibw_python }}-* CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_arch }} + CIBW_FREE_THREADED_SUPPORT: True - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: