Skip to content

Commit

Permalink
chore: docs and remove uv pinning as it's not installed
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Jun 8, 2024
1 parent 2ea1c04 commit 09bd9ba
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 23 deletions.
8 changes: 5 additions & 3 deletions bin/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,21 @@
type: string_array
build-frontend:
default: default
description: Set the tool to use to build, either "pip" (default for now) or "build"
description: Set the tool to use to build, either "pip" (default for now), "build", or "build[uv]"
oneOf:
- enum: [pip, build, default]
- enum: [pip, build, "build[uv]", default]
- type: string
pattern: '^pip; ?args:'
- type: string
pattern: '^build; ?args:'
- type: string
pattern: '^build\[uv\]; ?args:'
- type: object
additionalProperties: false
required: [name]
properties:
name:
enum: [pip, build]
enum: [pip, build, "build[uv]"]
args:
type: array
items:
Expand Down
10 changes: 8 additions & 2 deletions cibuildwheel/resources/cibuildwheel.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,13 @@
},
"build-frontend": {
"default": "default",
"description": "Set the tool to use to build, either \"pip\" (default for now) or \"build\"",
"description": "Set the tool to use to build, either \"pip\" (default for now), \"build\", or \"build[uv]\"",
"oneOf": [
{
"enum": [
"pip",
"build",
"build[uv]",
"default"
]
},
Expand All @@ -113,6 +114,10 @@
"type": "string",
"pattern": "^build; ?args:"
},
{
"type": "string",
"pattern": "^build\\[uv\\]; ?args:"
},
{
"type": "object",
"additionalProperties": false,
Expand All @@ -123,7 +128,8 @@
"name": {
"enum": [
"pip",
"build"
"build",
"build[uv]"
]
},
"args": {
Expand Down
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ tomli==2.0.1
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
zipp==3.19.2
Expand Down
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ tomli==2.0.1
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
zipp==3.19.2
Expand Down
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints-python39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ tomli==2.0.1
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
zipp==3.19.2
Expand Down
1 change: 0 additions & 1 deletion cibuildwheel/resources/constraints.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ pip>=24.1b1 ; python_version >= '3.13'
pip ; python_version < '3.13'
build
delocate
uv; python_version >= '3.8'
virtualenv
2 changes: 0 additions & 2 deletions cibuildwheel/resources/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.2
# via delocate
uv==0.2.8
# via -r cibuildwheel/resources/constraints.in
virtualenv==20.26.2
# via -r cibuildwheel/resources/constraints.in
31 changes: 28 additions & 3 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ This option can also be set using the [command-line option](#command-line) `--pr
## Build customization

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

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

You can also use "build[uv]", which will use an external [uv][] everywhere
possible, both through `--installer=uv` passed to build, as well as when making
all build and test environments. This will generally speed up cibuildwheel.
Make sure you have an external uv on Windows and macOS, either by
pre-installing it, or installing cibuildwheel with the uv extra,
`cibuildwheel[uv]`. `uv` will not be used for Python 3.6 or Python 3.7. You
cannot use uv currently on Windows for ARM or for musllinux on s390x as
binaries are not provided by uv. Legacy dependencies like setuptools on Python
< 3.12 and pip are not installed if using uv.

Pyodide ignores this setting, as only "build" is supported.

You can specify extra arguments to pass to `pip wheel` or `build` using the
optional `args` option.

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

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

#### Examples

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

# supply an extra argument to 'pip wheel'
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"

# Use uv and build
CIBW_BUILD_FRONTEND: "build[uv]"

# Use uv and build with an argument
CIBW_BUILD_FRONTEND: "build[uv]; args: --no-isolation"
```

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

# supply an extra argument to 'pip wheel'
build-frontend = { name = "pip", args = ["--no-build-isolation"] }

# Use uv and build
build-frontend = "build[uv]"

# Use uv and build with an argument
build-frontend = { name = "build[uv]", args = ["--no-isolation"] }
```

### `CIBW_CONFIG_SETTINGS` {: #config-settings}
Expand Down

0 comments on commit 09bd9ba

Please sign in to comment.