@@ -624,7 +624,7 @@ This option can also be set using the [command-line option](#command-line) `--pr
624
624
## Build customization
625
625
626
626
### ` 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 ] "
628
628
629
629
Options:
630
630
@@ -636,17 +636,30 @@ Default: `pip`
636
636
Choose which build frontend to use. Can either be "pip", which will run
637
637
` python -m pip wheel ` , or "build", which will run ` python -m build --wheel ` .
638
638
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
+
639
651
You can specify extra arguments to pass to ` pip wheel ` or ` build ` using the
640
652
optional ` args ` option.
641
653
642
654
!!! 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
644
656
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.
646
658
If you want to try ` build ` before this, you can use this option.
647
659
648
660
[ pip ] : https://pip.pypa.io/en/stable/cli/pip_wheel/
649
661
[ build ] : https://github.com/pypa/build/
662
+ [ uv ] : https://github.com/astral-sh/uv
650
663
651
664
#### Examples
652
665
@@ -661,6 +674,12 @@ optional `args` option.
661
674
662
675
# supply an extra argument to 'pip wheel'
663
676
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"
664
683
```
665
684
666
685
!!! tab examples "pyproject.toml"
@@ -675,6 +694,12 @@ optional `args` option.
675
694
676
695
# supply an extra argument to 'pip wheel'
677
696
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"] }
678
703
```
679
704
680
705
### ` CIBW_CONFIG_SETTINGS ` {: #config-settings}
0 commit comments