Skip to content

Switch cibuildwheel to the uv build frontend#1699

Merged
bdraco merged 1 commit into
aio-libs:masterfrom
bdraco:cibuildwheel-uv-frontend
May 17, 2026
Merged

Switch cibuildwheel to the uv build frontend#1699
bdraco merged 1 commit into
aio-libs:masterfrom
bdraco:cibuildwheel-uv-frontend

Conversation

@bdraco

@bdraco bdraco commented May 17, 2026

Copy link
Copy Markdown
Member

What do these changes do?

Set build-frontend = "build[uv]" in [tool.cibuildwheel]
so that uv provisions every virtual environment cibuildwheel
creates, both on the build side (passed to python -m build
as --installer=uv) and when materializing the per-ABI test
environment. The previous build-frontend = "build" left
every test env doing a multi-second pip resolve of
requirements/test-cibuildwheel.txt per ABI; uv resolves
and installs the same set in roughly a second, which compounds
across the wheel matrix.

Passes extras: uv to the pypa/cibuildwheel action so the
uv binary is bundled with cibuildwheel on the macOS and
Windows runners; on Linux the manylinux/musllinux containers
already ship uv. Drops the now-unneeded PyYAML pre-cache
before-test hook and the empty [tool.cibuildwheel.windows]
override that paired with it. Also adds frontend to
docs/spelling_wordlist.txt so the news fragment passes the
docs spell check.

Are there changes in behavior for the user?

No, contributor tooling only.

Is it a substantial burden for the maintainers to support this?

No, it removes config rather than adding it; the wheel matrix on
this PR is the verification path.

Related issue number

N/A

Checklist

  • I think the code is well written
  • Unit tests for the changes exist: N/A (CI-only change; the wheel-matrix run on this PR is the verification path)
  • Documentation reflects the changes: N/A (no user-visible API change)
  • If you provide code modification, please add yourself to CONTRIBUTORS.txt: N/A (no such file in this repo)
  • Add a new news fragment into the CHANGES/ folder (CHANGES/1699.contrib.rst; rename if the PR lands at a different number)

Drafted with Claude Code (Opus 4.7); reviewed by @bdraco.

Agent run details (optional, for reviewers)

Local validation:

```
$ make doc-spelling
7 pre-existing misspellings only (quoter, subdirectory, Deprecations, recode, unobvious in CHANGES.rst and CHANGES/README.rst); CHANGES/1699.contrib.rst is clean after adding frontend to the wordlist.
```

Not verified locally: the actual cibuildwheel + uv interaction
inside the build container; that requires running cibuildwheel
which is impractical without pushing. The live CI run on this
branch is the verification.

Existing PIP_CONSTRAINT = "requirements/cython.txt" under
[tool.cibuildwheel.environment] is left in place; uv
ignores it (uv reads UV_CONSTRAINT /
UV_BUILD_CONSTRAINT). If the wheel build ends up needing
the Cython pin to apply during uv-driven build dependency
resolution, a follow-up can add a parallel
UV_BUILD_CONSTRAINT entry.

This change mirrors the propcache change in
aio-libs/propcache#234.

Set build-frontend = "build[uv]" in [tool.cibuildwheel] so uv
provisions every virtual environment cibuildwheel creates, both
on the build side (passed to python -m build as --installer=uv)
and when materializing the per-ABI test environment. The previous
build-frontend = "build" left every test env doing a multi-second
pip resolve of requirements/test-cibuildwheel.txt per ABI; uv
resolves and installs the same set in roughly a second, which
compounds across the wheel matrix.

Adds extras: uv to the pypa/cibuildwheel action invocation so the
uv binary is bundled with cibuildwheel on the macOS and Windows
runners; on Linux the manylinux/musllinux containers already
ship uv. Drops the now-unneeded PyYAML pre-cache before-test hook
and the empty [tool.cibuildwheel.windows] override that paired
with it. Also adds frontend to docs/spelling_wordlist.txt so the
news fragment passes the docs spell check.
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided There is a change note present in this PR label May 17, 2026
@codspeed-hq

codspeed-hq Bot commented May 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 99 untouched benchmarks


Comparing bdraco:cibuildwheel-uv-frontend (db63911) with master (6625629)

Open in CodSpeed

@bdraco bdraco marked this pull request as ready for review May 17, 2026 20:29
@bdraco bdraco merged commit 16b7628 into aio-libs:master May 17, 2026
43 checks passed
@codecov

codecov Bot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.80%. Comparing base (e5acb97) to head (db63911).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1699   +/-   ##
=======================================
  Coverage   99.80%   99.80%           
=======================================
  Files          21       21           
  Lines        4152     4167   +15     
  Branches      243      244    +1     
=======================================
+ Hits         4144     4159   +15     
  Misses          5        5           
  Partials        3        3           
Flag Coverage Δ
CI-GHA 99.73% <ø> (+<0.01%) ⬆️
OS-Linux 99.73% <ø> (+<0.01%) ⬆️
OS-Windows 98.48% <ø> (+<0.01%) ⬆️
OS-macOS 98.63% <ø> (+<0.01%) ⬆️
Py-3.10.11 98.46% <ø> (+<0.01%) ⬆️
Py-3.10.20 99.68% <ø> (+<0.01%) ⬆️
Py-3.11.15 99.68% <ø> (+<0.01%) ⬆️
Py-3.11.9 98.46% <ø> (+<0.01%) ⬆️
Py-3.12.10 98.46% <ø> (+<0.01%) ⬆️
Py-3.12.13 99.68% <ø> (+<0.01%) ⬆️
Py-3.13.13 99.68% <ø> (+<0.01%) ⬆️
Py-3.14.4 98.61% <ø> (+<0.01%) ⬆️
Py-3.14.5 99.68% <ø> (+<0.01%) ⬆️
Py-3.14.5t 99.68% <ø> (+<0.01%) ⬆️
Py-pypy3.11.15-7.3.22 99.35% <ø> (+<0.01%) ⬆️
VM-macos-latest 98.63% <ø> (+<0.01%) ⬆️
VM-ubuntu-latest 99.73% <ø> (+<0.01%) ⬆️
VM-windows-latest 98.48% <ø> (+<0.01%) ⬆️
pytest 99.73% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant