Skip to content

Commit fbf44b7

Browse files
authored
Switch cibuildwheel to the uv build frontend (#12595)
1 parent 1a7de6f commit fbf44b7

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,12 @@ jobs:
627627
make cythonize
628628
- name: Build wheels
629629
uses: pypa/cibuildwheel@v3.4.1
630+
with:
631+
# `build-frontend = "build[uv]"` (pyproject.toml) requires uv to be
632+
# available on the runner for Windows and macOS. Installing
633+
# cibuildwheel with the `uv` extra bundles uv with it; Linux
634+
# already has uv inside the manylinux/musllinux container.
635+
extras: uv
630636
env:
631637
CIBW_SKIP: pp* ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
632638
CIBW_ARCHS_MACOS: x86_64 arm64 universal2

CHANGES/12595.contrib.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Switched the ``cibuildwheel`` build frontend to ``build[uv]`` so
2+
that ``uv`` provisions every build-isolation virtual environment
3+
in the wheel matrix, replacing the per-ABI ``pip`` resolve with a
4+
roughly sub-second ``uv`` resolve
5+
-- by :user:`bdraco`.

docs/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
abc
2+
ABI
23
addons
34
aiodns
45
aioes

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ include = [
159159

160160

161161
[tool.cibuildwheel]
162+
# `build[uv]` makes cibuildwheel use `uv` for every venv it provisions,
163+
# both on the build side (passed to `python -m build` as `--installer=uv`)
164+
# and when materializing the build isolation environment. uv resolves and
165+
# installs the build requirements in roughly a second; the previous
166+
# pip-based path took noticeably longer per ABI and ran once per matrix
167+
# cell.
168+
build-frontend = "build[uv]"
162169
test-command = ""
163170
# don't build PyPy wheels, install from source instead
164171
skip = "pp*"

0 commit comments

Comments
 (0)