From 6864d7958c2f4d4e2163bf289830f5584095efae Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 16 May 2025 17:54:59 +0200 Subject: [PATCH 1/3] CI: clean up wheel build workarounds now that Cython 3.1.0 is out (#61446) --- .github/workflows/wheels.yml | 5 ----- pyproject.toml | 4 ++-- scripts/cibw_before_build.sh | 10 ---------- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e5d13307973e0..c0e117a5b67aa 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -101,11 +101,6 @@ jobs: - [windows-2022, win_amd64] # TODO: support PyPy? python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]] - include: - # TODO: Remove this plus installing build deps in cibw_before_build.sh - # after pandas can be built with a released NumPy/Cython - - python: ["cp313t", "3.13"] - cibw_build_frontend: 'pip; args: --no-build-isolation' # TODO: Build free-threaded wheels for Windows exclude: - buildplat: [windows-2022, win_amd64] diff --git a/pyproject.toml b/pyproject.toml index 80f02b64cd329..899bcfca35939 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,11 +161,11 @@ test-command = """ pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db", "-n 2", "--no-strict-data-files"]); \ pd.test(extra_args=["-m not clipboard and single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \ """ -free-threaded-support = true +enable = ["cpython-freethreading"] before-build = "PACKAGE_DIR={package} bash {package}/scripts/cibw_before_build.sh" [tool.cibuildwheel.windows] -before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build.sh" +before-build = "pip install delvewheel" repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}" [[tool.cibuildwheel.overrides]] diff --git a/scripts/cibw_before_build.sh b/scripts/cibw_before_build.sh index 04333f446a7ff..e110bed4ea9ab 100644 --- a/scripts/cibw_before_build.sh +++ b/scripts/cibw_before_build.sh @@ -2,13 +2,3 @@ for file in $PACKAGE_DIR/LICENSES/*; do cat $file >> $PACKAGE_DIR/LICENSE done - -# TODO: Delete when there's a PyPI Cython release that supports free-threaded Python 3.13. -FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))")" -if [[ $FREE_THREADED_BUILD == "True" ]]; then - python -m pip install -U pip - # python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython - # TODO: Remove below and uncomment above once https://github.com/cython/cython/pull/6717 no longer breaks tests - python -m pip install git+https://github.com/cython/cython.git@3276b588720a053c78488e5de788605950f4b136 - python -m pip install ninja meson-python versioneer[toml] numpy -fi From 8d9ff0d9f602f28dccee8811d34d56c8e1d82a31 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 1 Jul 2025 14:05:42 +0200 Subject: [PATCH 2/3] Bump pypa/cibuildwheel to 2.23.3 --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c0e117a5b67aa..f707311e7873e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -146,7 +146,7 @@ jobs: run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV" - name: Build wheels - uses: pypa/cibuildwheel@v2.21.3 + uses: pypa/cibuildwheel@v2.23.3 with: package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }} env: From f28067e7828eaecdb97723acd1a02d93e8d3d71b Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 3 Jul 2025 09:32:49 +0200 Subject: [PATCH 3/3] remove prerelease flag --- .github/workflows/wheels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 1d9381b864b87..6f86f36139a94 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -151,7 +151,6 @@ jobs: with: package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }} env: - CIBW_PRERELEASE_PYTHONS: True CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}