Skip to content

Commit 0bd98fe

Browse files
jorisvandenbosschedependabot[bot]lysnikolaouEwoutHlithomas1
authored
Backport PR #59136 on branch 2.2.x (Upload 3.13 & free-threaded nightly wheels) (#59835)
* Bump pypa/cibuildwheel from 2.19.1 to 2.19.2 (#59208) Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.19.1 to 2.19.2. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@v2.19.1...v2.19.2) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit ad09dc6) * Upload 3.13 & free-threaded nightly wheels (#59136) * Upload free-threaded nightly wheels on Linux and macOS * Consolidate jobs into one * Install build dependencies in before-build and pass --no-build-isolation * Fix {project} placeholder in cibuildwheel config * Correctly quote echo CIBW_BUILD_FRONTEND command * Run echo -e * Add {package} to before-build * Include cibw script in sdist & add matrix value for build frontend * Change manifest and gitattributes * Change gitattributes * Install verioneer in before-build * Add cibw_before_test to install nightly NumPy * Expand before-test to musl * Better comments plus always run before-build/before-test on 3.13 * Add --no-build-isolation in 3.13 as well * Install nightly numpy before windows tests * Address feedback; add todo for NumPy nightly and move default outside matrix * Set build_frontend to 'build' in pyodide build --------- Co-authored-by: Matthew Roeschke <[email protected]> (cherry picked from commit 7c0ee27) * CI: Update to cibuildwheel 2.20.0 (#59401) cibuildwheel 2.20.0 uses the ABI stable Python 3.13.0rc1 and build Python 3.13 wheels by default, which allows removing the `CIBW_PRERELEASE_PYTHONS` flag. Co-authored-by: Matthew Roeschke <[email protected]> (cherry picked from commit 70bb855) * Update wheels.yml * BLD/RLS: build wheels with released numpy/cython for Python 3.13 (#59819) (cherry picked from commit 2237217) * enable prerelease again --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lysandros Nikolaou <[email protected]> Co-authored-by: Ewout ter Hoeven <[email protected]> Co-authored-by: Thomas Li <[email protected]>
1 parent 8d67e77 commit 0bd98fe

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
name: Build aarch64 wheels
7373
no_output_timeout: 30m # Sometimes the tests won't generate any output, make sure the job doesn't get killed by that
7474
command: |
75-
pip3 install cibuildwheel==2.15.0
75+
pip3 install cibuildwheel==2.20.0
7676
cibuildwheel --prerelease-pythons --output-dir wheelhouse
7777
7878
environment:

.gitattributes

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ci export-ignore
6868
doc export-ignore
6969
gitpod export-ignore
7070
MANIFEST.in export-ignore
71-
scripts export-ignore
71+
scripts/** export-ignore
7272
typings export-ignore
7373
web export-ignore
7474
CITATION.cff export-ignore
@@ -82,3 +82,6 @@ setup.py export-ignore
8282
# csv_dir_path fixture checks the existence of the directory
8383
# exclude the whole directory to avoid running related tests in sdist
8484
pandas/tests/io/parser/data export-ignore
85+
86+
# Include cibw script in sdist since it's needed for building wheels
87+
scripts/cibw_before_build.sh -export-ignore

.github/workflows/wheels.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,17 @@ jobs:
9999
- [macos-14, macosx_arm64]
100100
- [windows-2022, win_amd64]
101101
# TODO: support PyPy?
102-
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
102+
python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"], ["cp313t", "3.13"]]
103+
include:
104+
# TODO: Remove this plus installing build deps in cibw_before_build.sh
105+
# after pandas can be built with a released NumPy/Cython
106+
- python: ["cp313t", "3.13"]
107+
cibw_build_frontend: 'pip; args: --no-build-isolation'
108+
# TODO: Build free-threaded wheels for Windows
109+
exclude:
110+
- buildplat: [windows-2022, win_amd64]
111+
python: ["cp313t", "3.13"]
112+
103113
env:
104114
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
105115
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -140,12 +150,13 @@ jobs:
140150
run: echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
141151

142152
- name: Build wheels
143-
uses: pypa/cibuildwheel@v2.17.0
153+
uses: pypa/cibuildwheel@v2.20.0
144154
with:
145155
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
146156
env:
147157
CIBW_PRERELEASE_PYTHONS: True
148158
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
159+
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend || 'pip' }}
149160

150161
- name: Set up Python
151162
uses: mamba-org/setup-micromamba@v1

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,6 @@ prune pandas/tests/io/parser/data
6262
# Selectively re-add *.cxx files that were excluded above
6363
graft pandas/_libs/src
6464
graft pandas/_libs/include
65+
66+
# Include cibw script in sdist since it's needed for building wheels
67+
include scripts/cibw_before_build.sh

pyproject.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,11 @@ test-command = """
160160
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"]); \
161161
pd.test(extra_args=["-m not clipboard and single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \
162162
"""
163+
free-threaded-support = true
164+
before-build = "bash {package}/scripts/cibw_before_build.sh"
163165

164166
[tool.cibuildwheel.windows]
165-
before-build = "pip install delvewheel"
167+
before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build.sh"
166168
repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
167169

168170
[[tool.cibuildwheel.overrides]]

scripts/cibw_before_build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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
4+
python -m pip install -U pip
5+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
6+
python -m pip install ninja meson-python versioneer[toml]
7+
fi

0 commit comments

Comments
 (0)