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 <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Jun 8, 2024
1 parent fd840c0 commit 7923ecd
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bin/generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
default: default
description: Set the tool to use to build, either "pip" (default for now) or "build"
oneOf:
- enum: [pip, build, default]
- enum: [pip, build, "build[uv]", default]
- type: string
pattern: '^pip; ?args:'
- type: string
Expand Down
1 change: 1 addition & 0 deletions cibuildwheel/resources/cibuildwheel.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
"enum": [
"pip",
"build",
"build[uv]",
"default"
]
},
Expand Down
4 changes: 2 additions & 2 deletions cibuildwheel/resources/constraints-pyodide312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ typer==0.12.3
# pyodide-cli
types-requests==2.32.0.20240602
# via pyodide-build
typing-extensions==4.12.1
typing-extensions==4.12.2
# via
# pydantic
# pydantic-core
# typer
unearth==0.15.3
unearth==0.15.4
# via pyodide-build
urllib3==2.2.1
# via
Expand Down
6 changes: 2 additions & 4 deletions cibuildwheel/resources/constraints-python310.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ pyproject-hooks==1.1.0
# via build
tomli==2.0.1
# via build
typing-extensions==4.12.1
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.1
zipp==3.19.2
# via importlib-metadata
4 changes: 1 addition & 3 deletions cibuildwheel/resources/constraints-python311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ platformdirs==4.2.2
# via virtualenv
pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.1
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
4 changes: 1 addition & 3 deletions cibuildwheel/resources/constraints-python312.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ platformdirs==4.2.2
# via virtualenv
pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.1
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
4 changes: 1 addition & 3 deletions cibuildwheel/resources/constraints-python313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ platformdirs==4.2.2
# via virtualenv
pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.1
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
6 changes: 2 additions & 4 deletions cibuildwheel/resources/constraints-python38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ pyproject-hooks==1.1.0
# via build
tomli==2.0.1
# via build
typing-extensions==4.12.1
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.1
zipp==3.19.2
# via importlib-metadata
6 changes: 2 additions & 4 deletions cibuildwheel/resources/constraints-python39.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ pyproject-hooks==1.1.0
# via build
tomli==2.0.1
# via build
typing-extensions==4.12.1
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.1
zipp==3.19.2
# via importlib-metadata
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
4 changes: 1 addition & 3 deletions cibuildwheel/resources/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ platformdirs==4.2.2
# via virtualenv
pyproject-hooks==1.1.0
# via build
typing-extensions==4.12.1
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 7923ecd

Please sign in to comment.