Skip to content

Commit 09bd9ba

Browse files
committed
chore: docs and remove uv pinning as it's not installed
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 2ea1c04 commit 09bd9ba

11 files changed

+41
-23
lines changed

bin/generate_schema.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,21 @@
4848
type: string_array
4949
build-frontend:
5050
default: default
51-
description: Set the tool to use to build, either "pip" (default for now) or "build"
51+
description: Set the tool to use to build, either "pip" (default for now), "build", or "build[uv]"
5252
oneOf:
53-
- enum: [pip, build, default]
53+
- enum: [pip, build, "build[uv]", default]
5454
- type: string
5555
pattern: '^pip; ?args:'
5656
- type: string
5757
pattern: '^build; ?args:'
58+
- type: string
59+
pattern: '^build\[uv\]; ?args:'
5860
- type: object
5961
additionalProperties: false
6062
required: [name]
6163
properties:
6264
name:
63-
enum: [pip, build]
65+
enum: [pip, build, "build[uv]"]
6466
args:
6567
type: array
6668
items:

cibuildwheel/resources/cibuildwheel.schema.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,13 @@
9696
},
9797
"build-frontend": {
9898
"default": "default",
99-
"description": "Set the tool to use to build, either \"pip\" (default for now) or \"build\"",
99+
"description": "Set the tool to use to build, either \"pip\" (default for now), \"build\", or \"build[uv]\"",
100100
"oneOf": [
101101
{
102102
"enum": [
103103
"pip",
104104
"build",
105+
"build[uv]",
105106
"default"
106107
]
107108
},
@@ -113,6 +114,10 @@
113114
"type": "string",
114115
"pattern": "^build; ?args:"
115116
},
117+
{
118+
"type": "string",
119+
"pattern": "^build\\[uv\\]; ?args:"
120+
},
116121
{
117122
"type": "object",
118123
"additionalProperties": false,
@@ -123,7 +128,8 @@
123128
"name": {
124129
"enum": [
125130
"pip",
126-
"build"
131+
"build",
132+
"build[uv]"
127133
]
128134
},
129135
"args": {

cibuildwheel/resources/constraints-python310.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ tomli==2.0.1
2828
# via build
2929
typing-extensions==4.12.2
3030
# via delocate
31-
uv==0.2.8
32-
# via -r cibuildwheel/resources/constraints.in
3331
virtualenv==20.26.2
3432
# via -r cibuildwheel/resources/constraints.in
3533
zipp==3.19.2

cibuildwheel/resources/constraints-python311.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
2424
# via build
2525
typing-extensions==4.12.2
2626
# via delocate
27-
uv==0.2.8
28-
# via -r cibuildwheel/resources/constraints.in
2927
virtualenv==20.26.2
3028
# via -r cibuildwheel/resources/constraints.in

cibuildwheel/resources/constraints-python312.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
2424
# via build
2525
typing-extensions==4.12.2
2626
# via delocate
27-
uv==0.2.8
28-
# via -r cibuildwheel/resources/constraints.in
2927
virtualenv==20.26.2
3028
# via -r cibuildwheel/resources/constraints.in

cibuildwheel/resources/constraints-python313.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
2424
# via build
2525
typing-extensions==4.12.2
2626
# via delocate
27-
uv==0.2.8
28-
# via -r cibuildwheel/resources/constraints.in
2927
virtualenv==20.26.2
3028
# via -r cibuildwheel/resources/constraints.in

cibuildwheel/resources/constraints-python38.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ tomli==2.0.1
2828
# via build
2929
typing-extensions==4.12.2
3030
# via delocate
31-
uv==0.2.8
32-
# via -r cibuildwheel/resources/constraints.in
3331
virtualenv==20.26.2
3432
# via -r cibuildwheel/resources/constraints.in
3533
zipp==3.19.2

cibuildwheel/resources/constraints-python39.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ tomli==2.0.1
2828
# via build
2929
typing-extensions==4.12.2
3030
# via delocate
31-
uv==0.2.8
32-
# via -r cibuildwheel/resources/constraints.in
3331
virtualenv==20.26.2
3432
# via -r cibuildwheel/resources/constraints.in
3533
zipp==3.19.2

cibuildwheel/resources/constraints.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ pip>=24.1b1 ; python_version >= '3.13'
22
pip ; python_version < '3.13'
33
build
44
delocate
5-
uv; python_version >= '3.8'
65
virtualenv

cibuildwheel/resources/constraints.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
2424
# via build
2525
typing-extensions==4.12.2
2626
# via delocate
27-
uv==0.2.8
28-
# via -r cibuildwheel/resources/constraints.in
2927
virtualenv==20.26.2
3028
# via -r cibuildwheel/resources/constraints.in

docs/options.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ This option can also be set using the [command-line option](#command-line) `--pr
624624
## Build customization
625625

626626
### `CIBW_BUILD_FRONTEND` {: #build-frontend}
627-
> Set the tool to use to build, either "pip" (default for now) or "build"
627+
> Set the tool to use to build, either "pip" (default for now), "build", or "build[uv]"
628628
629629
Options:
630630

@@ -636,17 +636,30 @@ Default: `pip`
636636
Choose which build frontend to use. Can either be "pip", which will run
637637
`python -m pip wheel`, or "build", which will run `python -m build --wheel`.
638638

639+
You can also use "build[uv]", which will use an external [uv][] everywhere
640+
possible, both through `--installer=uv` passed to build, as well as when making
641+
all build and test environments. This will generally speed up cibuildwheel.
642+
Make sure you have an external uv on Windows and macOS, either by
643+
pre-installing it, or installing cibuildwheel with the uv extra,
644+
`cibuildwheel[uv]`. `uv` will not be used for Python 3.6 or Python 3.7. You
645+
cannot use uv currently on Windows for ARM or for musllinux on s390x as
646+
binaries are not provided by uv. Legacy dependencies like setuptools on Python
647+
< 3.12 and pip are not installed if using uv.
648+
649+
Pyodide ignores this setting, as only "build" is supported.
650+
639651
You can specify extra arguments to pass to `pip wheel` or `build` using the
640652
optional `args` option.
641653

642654
!!! tip
643-
Until v2.0.0, [pip] was the only way to build wheels, and is still the
655+
Until v2.0.0, [pip][] was the only way to build wheels, and is still the
644656
default. However, we expect that at some point in the future, cibuildwheel
645-
will change the default to [build], in line with the PyPA's recommendation.
657+
will change the default to [build][], in line with the PyPA's recommendation.
646658
If you want to try `build` before this, you can use this option.
647659

648660
[pip]: https://pip.pypa.io/en/stable/cli/pip_wheel/
649661
[build]: https://github.com/pypa/build/
662+
[uv]: https://github.com/astral-sh/uv
650663

651664
#### Examples
652665

@@ -661,6 +674,12 @@ optional `args` option.
661674

662675
# supply an extra argument to 'pip wheel'
663676
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
677+
678+
# Use uv and build
679+
CIBW_BUILD_FRONTEND: "build[uv]"
680+
681+
# Use uv and build with an argument
682+
CIBW_BUILD_FRONTEND: "build[uv]; args: --no-isolation"
664683
```
665684

666685
!!! tab examples "pyproject.toml"
@@ -675,6 +694,12 @@ optional `args` option.
675694

676695
# supply an extra argument to 'pip wheel'
677696
build-frontend = { name = "pip", args = ["--no-build-isolation"] }
697+
698+
# Use uv and build
699+
build-frontend = "build[uv]"
700+
701+
# Use uv and build with an argument
702+
build-frontend = { name = "build[uv]", args = ["--no-isolation"] }
678703
```
679704

680705
### `CIBW_CONFIG_SETTINGS` {: #config-settings}

0 commit comments

Comments
 (0)