Skip to content

Commit 584b7e8

Browse files
BLD/RLS: build wheels with released numpy/cython for Python 3.13 (pandas-dev#59819)
(cherry picked from commit 2237217)
1 parent 8e6e744 commit 584b7e8

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

.github/workflows/wheels.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ jobs:
102102
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
103103
include:
104104
# TODO: Remove this plus installing build deps in cibw_before_build.sh
105-
# and test deps in cibw_before_test.sh after pandas can be built with a released NumPy/Cython
106-
- python: ["cp313", "3.13"]
107-
cibw_build_frontend: 'pip; args: --no-build-isolation'
105+
# after pandas can be built with a released NumPy/Cython
108106
- python: ["cp313t", "3.13"]
109107
cibw_build_frontend: 'pip; args: --no-build-isolation'
110108
# TODO: Build free-threaded wheels for Windows
@@ -180,11 +178,9 @@ jobs:
180178
- name: Test Windows Wheels
181179
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
182180
shell: pwsh
183-
# TODO: Remove NumPy nightly install when there's a 3.13 wheel on PyPI
184181
run: |
185182
$TST_CMD = @"
186183
python -m pip install hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytz<2024.2;
187-
${{ matrix.python[1] == '3.13' && 'python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy;' }}
188184
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
189185
python -c `'import pandas as pd; pd.test(extra_args=[`\"--no-strict-data-files`\", `\"-m not clipboard and not single_cpu and not slow and not network and not db`\"])`';
190186
"@

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@ graft pandas/_libs/include
6565

6666
# Include cibw script in sdist since it's needed for building wheels
6767
include scripts/cibw_before_build.sh
68-
include scripts/cibw_before_test.sh

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ test-command = """
162162
"""
163163
free-threaded-support = true
164164
before-build = "bash {package}/scripts/cibw_before_build.sh"
165-
before-test = "bash {package}/scripts/cibw_before_test.sh"
166165

167166
[tool.cibuildwheel.windows]
168167
before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build.sh"
@@ -178,7 +177,7 @@ test-command = """
178177

179178
[[tool.cibuildwheel.overrides]]
180179
select = "*-musllinux*"
181-
before-test = "apk update && apk add musl-locales && bash {package}/scripts/cibw_before_test.sh"
180+
before-test = "apk update && apk add musl-locales"
182181

183182
[[tool.cibuildwheel.overrides]]
184183
select = "*-win*"

scripts/cibw_before_build.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# TODO: Delete when there's PyPI NumPy/Cython releases the support Python 3.13.
2-
# If free-threading support is not included in those releases, this script will have
3-
# to whether this runs for a free-threaded build instead.
4-
PYTHON_VERSION="$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
5-
if [[ $PYTHON_VERSION == "313" ]]; then
1+
# TODO: Delete when there's a PyPI Cython release that supports free-threaded Python 3.13.
2+
FREE_THREADED_BUILD="$(python -c"import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))")"
3+
if [[ $FREE_THREADED_BUILD == "True" ]]; then
64
python -m pip install -U pip
75
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
86
python -m pip install ninja meson-python versioneer[toml]

scripts/cibw_before_test.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)