Skip to content

Commit ad709a5

Browse files
art049claude
andauthored
build: enable free-threaded wheels in cibuildwheel (#121)
* build: enable free-threaded wheels in cibuildwheel cibuildwheel does not build free-threaded CPython wheels by default, even when the build pattern matches cp*. As a result, users on 3.13t/3.14t/3.15t installed pure-Python wheels with no native extension and saw: Failed to load instrument hooks library: cannot import name 'dist_instrument_hooks' from 'pytest_codspeed.instruments.hooks' Opt in via `enable = ["cpython-freethreading"]` so the cp31{3,4,5}t wheels ship the compiled dist_instrument_hooks extension. Co-Authored-By: Claude <noreply@anthropic.com> * ci: bump pypa/cibuildwheel from v3.2.1 to v3.4.1 v3.2.1 predates CPython 3.14/3.15 support in cibuildwheel. Bumping unlocks free-threaded 3.14t/3.15t wheel builds (which no longer need the cpython-freethreading enable flag — only 3.13t does). Co-Authored-By: Claude <noreply@anthropic.com> * build: enable cpython-prerelease wheels in cibuildwheel CPython 3.15 is still in beta, so cibuildwheel will not build cp315 / cp315t wheels without the cpython-prerelease opt-in. Add it alongside cpython-freethreading so prerelease wheels (regular + free-threaded) ship for users testing on 3.15. Co-Authored-By: Claude <noreply@anthropic.com> * chore: advertise Python 3.15 support in classifiers Add the trove classifier for 3.15 now that cibuildwheel ships cp315 / cp315t wheels. Co-Authored-By: Claude <noreply@anthropic.com> * ci: pin cibuildwheel to a main commit with CPython 3.15 support v3.4.1 does not yet include cp315 in its bundled build-platforms.toml, so the cpython-prerelease enable flag has nothing to act on. Pin to commit ec0977e (post-#2833 "add CPython 3.15 beta 1") to unblock cp315 / cp315t wheel builds. Drop the pin back to a tagged release once cibuildwheel ships 3.15 metadata. Co-Authored-By: Claude <noreply@anthropic.com> * build: drop cpython-freethreading enable group The cibuildwheel commit we pin (post-#2684) no longer recognizes cpython-freethreading: 3.13t support was dropped and free-threading is the default for 3.14+. Keeping the value triggers: cibuildwheel: Failed to parse enable group. Unknown enable group: cpython-freethreading. Only cpython-prerelease is still needed (for cp315 / cp315t while 3.15 is in beta). Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 080d620 commit ad709a5

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
with:
2929
submodules: true
3030
- name: Build wheels
31-
uses: pypa/cibuildwheel@v3.2.1
31+
# Pinned to main past v3.4.1 for CPython 3.15 beta support (PR #2833).
32+
# Revisit once the next tagged release ships 3.15 metadata.
33+
uses: pypa/cibuildwheel@ec0977e5f64e2ec8c1276eea62083c103613b756
3234
env:
3335
CIBW_ARCHS: ${{ matrix.platform.arch }}
3436
with:

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3.12",
2626
"Programming Language :: Python :: 3.13",
2727
"Programming Language :: Python :: 3.14",
28+
"Programming Language :: Python :: 3.15",
2829
"Topic :: Software Development :: Testing",
2930
"Topic :: System :: Benchmark",
3031
"Topic :: Utilities",
@@ -103,6 +104,7 @@ push = false
103104

104105
[tool.cibuildwheel]
105106
build = "cp*{manylinux,macosx}*"
107+
enable = ["cpython-prerelease"]
106108
test-extras = ["build", "test", "compat"]
107109
test-command = "pytest -v --ignore={project}/tests/benchmarks {project}/tests"
108110

0 commit comments

Comments
 (0)