diff --git a/cibuildwheel/resources/cibuildwheel.schema.json b/cibuildwheel/resources/cibuildwheel.schema.json index c5a27ea8..a82518f4 100644 --- a/cibuildwheel/resources/cibuildwheel.schema.json +++ b/cibuildwheel/resources/cibuildwheel.schema.json @@ -107,13 +107,14 @@ }, "build-frontend": { "default": "default", - "description": "Set the tool to use to build, either \"build\" (default), \"build[uv]\", or \"pip\"", + "description": "Set the tool to use to build, either \"build\" (default), \"build[uv]\", \"uv\", or \"pip\"", "oneOf": [ { "enum": [ "pip", "build", "build[uv]", + "uv", "default" ] }, @@ -129,6 +130,10 @@ "type": "string", "pattern": "^build\\[uv\\]; ?args:" }, + { + "type": "string", + "pattern": "^uv; ?args:" + }, { "type": "object", "additionalProperties": false, @@ -140,7 +145,8 @@ "enum": [ "pip", "build", - "build[uv]" + "build[uv]", + "uv" ] }, "args": { diff --git a/docs/options.md b/docs/options.md index c94cb042..ce09a8ec 100644 --- a/docs/options.md +++ b/docs/options.md @@ -465,6 +465,7 @@ Options: - `build[;args: ...]` - `build[uv][;args: ...]` - `pip[;args: ...]` +- `uv[;args: ...]` Default: `build` @@ -478,6 +479,8 @@ pre-installing it, or installing cibuildwheel with the `uv` extra, which is possible by manually passing `cibuildwheel[uv]` to installers or by using the `extras` option in the [cibuildwheel action](ci-services.md#github-actions). uv currently does not support iOS or musllinux on s390x, ppc64le and riscv64. +You can also use the `uv` backend directly; though currently multiple output +files (from workspaces) are not supported. On Android and Pyodide, the "pip" frontend is not supported. @@ -511,6 +514,9 @@ optional `args` option. # Use uv and build with an argument build-frontend = { name = "build[uv]", args = ["--no-isolation"] } + + # Use uv directly + build-frontend = "uv" ``` !!! tab examples "Environment variables" @@ -527,6 +533,9 @@ optional `args` option. # Use uv and build with an argument CIBW_BUILD_FRONTEND: "build[uv]; args: --no-isolation" + + # Use uv directly + CIBW_BUILD_FRONTEND: "uv" ``` diff --git a/docs/platforms.md b/docs/platforms.md index 6e46ec95..b166bc39 100644 --- a/docs/platforms.md +++ b/docs/platforms.md @@ -185,7 +185,7 @@ Currently, it's recommended to run tests using a `python -m` entrypoint, rather ### Prerequisites cibuildwheel can build Android wheels on any POSIX platform supported by the Android -development tools, which currently means Linux x86_64, macOS ARM64 or macOS x86_64. Any +development tools, which currently means Linux `x86_64`, macOS `ARM64` or macOS `x86_64`. Any of these platforms can be used to build wheels for any Android architecture supported by Python. However, *testing* wheels has additional requirements: see the section below. @@ -221,10 +221,8 @@ Python 3.13. ### Build frontend support -Android builds only support the `build` frontend. In principle, support for the -`build[uv]` frontend should be possible, but `uv` [doesn't currently have support for -cross-platform builds](https://github.com/astral-sh/uv/issues/7957), and [doesn't have -support for iOS or Android wheel tags](https://github.com/astral-sh/uv/issues/8029). +Android builds do not support the `pip` frontend. The `build`, `build[uv]`, and +`uv` frontends work. ### Tests @@ -238,7 +236,7 @@ Any arguments specified using [`test-runtime`](options.md#test-runtime) will be Running an emulator requires the build machine to either be bare-metal or support nested virtualization. CI platforms known to meet this requirement are: -* GitHub Actions Linux x86_64 +* GitHub Actions Linux `x86_64` On Linux, the emulator needs access to the KVM virtualization interface. This may require adding your user to a group, or changing your udev rules. On GitHub @@ -308,7 +306,7 @@ iOS builds are *cross platform builds*, as it not possible to run compilers and ### Build frontend support -iOS builds support both the `pip` and `build` build frontends. In principle, support for `uv` with the `build[uv]` frontend should be possible, but `uv` [doesn't currently have support for cross-platform builds](https://github.com/astral-sh/uv/issues/7957), and [doesn't have support for iOS (or Android) tags](https://github.com/astral-sh/uv/issues/8029). +iOS builds support both the `pip` and `build` build frontends. In principle, support for `uv` and `build[uv]` frontends should be possible, but `uv` [doesn't support iOS fully yet](https://github.com/astral-sh/uv/issues/16724). ### Build environment