8000 CI: enable free-threaded wheel builds [wheel build] · numpy/numpy@4248f66 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4248f66

Browse files
committed
CI: enable free-threaded wheel builds [wheel build]
1 parent 9c3f0bb commit 4248f66

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.github/workflows/wheels.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
- [macos-14, macosx_arm64, accelerate] # always use accelerate
8686
- [windows-2019, win_amd64, ""]
8787
- [windows-2019, win32, ""]
88-
python: ["cp310", "cp311", "cp312", "pp310", "cp313"]
88+
python: ["cp310", "cp311", "cp312", "pp310", "cp313", "cp313t"]
8989
exclude:
9090
# Don't build PyPy 32-bit windows
9191
- buildplat: [windows-2019, win32, ""]
@@ -152,7 +152,9 @@ jobs:
152152
uses: pypa/cibuildwheel@ba8be0d98853f5744f24e7f902c8adef7ae2e7f3 # v2.18.1
153153
env:
154154
CIBW_PRERELEASE_PYTHONS: True
155+
CIBW_FREE_THREADED_SUPPORT: True
155156
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
157+
CIBW_SKIP: '*t-mac*'
156158

157159
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
158160
with:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
build-backend = "mesonpy"
33
requires = [
44
"meson-python>=0.15.0",
5-
"Cython>=3.0.6", # keep in sync with version check in meson.build
5+
"Cython>=3.0.6;python_version<'3.13'", # keep in sync with version check in meson.build
6+
"Cython @ git+https://github.com/cython/cython;python_version>='3.13'"
67
]
78

89
[project]

tools/wheels/cibw_before_build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,8 @@ if [[ $RUNNER_OS == "Windows" ]]; then
5252
# delvewheel is the equivalent of delocate/auditwheel for windows.
5353
python -m pip install delvewheel wheel
5454
fi
55+
56+
# TODO: remove once a release cython builds numpy with free-threaded python
57+
if [[ $(python -c"import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))") = "True" ]] ; then
58+
python -m pip install git+https://github.com/cython/cython
59+
fi

0 commit comments

Comments
 (0)
0