Skip to content

Commit

Permalink
BLD/RLS: build wheels with released numpy/cython for Python 3.13 (pan…
Browse files Browse the repository at this point in the history
…das-dev#59819)

(cherry picked from commit 2237217)
  • Loading branch information
jorisvandenbossche committed Sep 18, 2024
1 parent 8e6e744 commit 584b7e8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ jobs:
python: [["cp39", "3.9"], ["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
# and test deps in cibw_before_test.sh after pandas can be built with a released NumPy/Cython
- python: ["cp313", "3.13"]
cibw_build_frontend: 'pip; args: --no-build-isolation'
# 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
Expand Down Expand Up @@ -180,11 +178,9 @@ jobs:
- name: Test Windows Wheels
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
shell: pwsh
# TODO: Remove NumPy nightly install when there's a 3.13 wheel on PyPI
run: |
$TST_CMD = @"
python -m pip install hypothesis>=6.46.1 pytest>=7.3.2 pytest-xdist>=2.2.0 pytz<2024.2;
${{ matrix.python[1] == '3.13' && 'python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy;' }}
python -m pip install `$(Get-Item pandas\wheelhouse\*.whl);
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`\"])`';
"@
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +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_test.sh
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ test-command = """
"""
free-threaded-support = true
before-build = "bash {package}/scripts/cibw_before_build.sh"
before-test = "bash {package}/scripts/cibw_before_test.sh"

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

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

[[tool.cibuildwheel.overrides]]
select = "*-win*"
Expand Down
8 changes: 3 additions & 5 deletions scripts/cibw_before_build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# TODO: Delete when there's PyPI NumPy/Cython releases the support Python 3.13.
# If free-threading support is not included in those releases, this script will have
# to whether this runs for a free-threaded build instead.
PYTHON_VERSION="$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")"
if [[ $PYTHON_VERSION == "313" ]]; then
# 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 numpy cython
python -m pip install ninja meson-python versioneer[toml]
Expand Down
8 changes: 0 additions & 8 deletions scripts/cibw_before_test.sh

This file was deleted.

0 comments on commit 584b7e8

Please sign in to comment.