From 216af108054f94c055ecbb49b5b19544cbec6a23 Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 16 May 2025 05:32:41 +0200 Subject: [PATCH] CI: clean up wheel build workarounds now that Cython 3.1.0 is out --- .gitattributes | 2 -- .github/workflows/wheels.yml | 4 ---- MANIFEST.in | 2 -- pyproject.toml | 4 ++-- scripts/cibw_before_build.sh | 8 -------- scripts/cibw_before_build_windows.sh | 13 ------------- 6 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 scripts/cibw_before_build_windows.sh diff --git a/.gitattributes b/.gitattributes index d94c19e7edb1f..bc7dec642df0f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -84,5 +84,3 @@ pandas/tests/io/parser/data export-ignore # Include cibw script in sdist since it's needed for building wheels scripts/cibw_before_build.sh -export-ignore -scripts/cibw_before_build_windows.sh -export-ignore -scripts/cibw_before_test_windows.sh -export-ignore diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 512db65e866b4..af9c48c57c535 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -102,10 +102,6 @@ jobs: # 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' # Build Pyodide wheels and upload them to Anaconda.org # NOTE: this job is similar to the one in unit-tests.yml except for the fact # that it uses cibuildwheel instead of a standard Pyodide xbuildenv setup. diff --git a/MANIFEST.in b/MANIFEST.in index c59151f340545..a7d7d7eb4e062 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -65,5 +65,3 @@ graft pandas/_libs/include # Include cibw script in sdist since it's needed for building wheels include scripts/cibw_before_build.sh -include scripts/cibw_before_build_windows.sh -include scripts/cibw_before_test_windows.sh diff --git a/pyproject.toml b/pyproject.toml index 527c656e9dec4..370bd0e0605cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -154,12 +154,12 @@ 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] environment = {} -before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build_windows.sh" +before-build = "pip install delvewheel" test-command = """ set PANDAS_CI='1' && \ python -c "import pandas as pd; \ diff --git a/scripts/cibw_before_build.sh b/scripts/cibw_before_build.sh index d326dd3637314..274848972bd7e 100644 --- a/scripts/cibw_before_build.sh +++ b/scripts/cibw_before_build.sh @@ -3,11 +3,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 - python -m pip install numpy ninja meson-python versioneer[toml] -fi diff --git a/scripts/cibw_before_build_windows.sh b/scripts/cibw_before_build_windows.sh deleted file mode 100644 index 8f001db566a1d..0000000000000 --- a/scripts/cibw_before_build_windows.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -# Add 3rd party licenses, like numpy does -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 - python -m pip install ninja meson-python versioneer[toml] numpy -fi