You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/options.md
+19-18Lines changed: 19 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ This option can also be set using the [command-line option](#command-line) `--pl
44
44
45
45
List of builds to build and skip. Each build has an identifier like `cp38-manylinux_x86_64` or `cp37-macosx_x86_64` - you can list specific ones to build and cibuildwheel will only build those, and/or list ones to skip and cibuildwheel won't try to build them.
46
46
47
-
When both options are specified, both conditions are applied and only builds with a tag that matches `CIBW_BUILD` and does not match `CIBW_SKIP` will be built.
47
+
When both options are specified, both conditions are applied and only builds with a tag that matches `build` and does not match `skip` will be built.
48
48
49
49
When setting the options, you can use shell-style globbing syntax, as per [fnmatch](https://docs.python.org/3/library/fnmatch.html) with the addition of curly bracket syntax `{option1,option2}`, provided by [bracex](https://pypi.org/project/bracex/). All the build identifiers supported by cibuildwheel are shown below:
50
50
@@ -68,7 +68,7 @@ The list of supported and currently selected build identifiers can also be retri
68
68
The format is `python_tag-platform_tag`, with tags similar to those in [PEP 425](https://www.python.org/dev/peps/pep-0425/#details).
69
69
70
70
Windows arm64 platform support is experimental.
71
-
Linux riscv64 platform support is experimental and requires an explicit opt-in through [CIBW_ENABLE](#enable).
71
+
Linux riscv64 platform support is experimental and requires an explicit opt-in through [`enable`](#enable).
72
72
73
73
For an experimental WebAssembly build with `--platform pyodide`,
74
74
`cp312-pyodide_wasm32` is the only platform identifier.
@@ -146,7 +146,7 @@ See the [cibuildwheel 2 documentation](https://cibuildwheel.pypa.io/en/2.x/) for
146
146
147
147
It is generally recommended to set `CIBW_BUILD` as an environment variable, though `skip`
148
148
tends to be useful in a config file; you can statically declare that you don't
149
-
support PyPy, for example.
149
+
support a specific build, for example.
150
150
151
151
<style>
152
152
.build-id-table-marker+table {
@@ -192,10 +192,10 @@ Options:
192
192
-`auto32`: Just the 32-bit auto archs
193
193
-`native`: the native arch of the build machine - Matches [`platform.machine()`](https://docs.python.org/3/library/platform.html#platform.machine).
194
194
-`all` : expands to all the architectures supported on this OS. You may want
195
-
to use [CIBW_BUILD](#build-skip) with this option to target specific
195
+
to use [`build`](#build-skip) with this option to target specific
196
196
architectures via build selectors.
197
197
198
-
Linux riscv64 platform support is experimental and requires an explicit opt-in through [CIBW_ENABLE](#enable).
198
+
Linux riscv64 platform support is experimental and requires an explicit opt-in through [`enable`](#enable).
199
199
200
200
Default: `auto`
201
201
@@ -207,7 +207,7 @@ Default: `auto`
207
207
| macOS / Intel |`x86_64`|`x86_64`|`x86_64`||
208
208
| macOS / Apple Silicon |`arm64`|`arm64`|`arm64`||
209
209
| iOS on macOS / Intel |`x86_64_iphonesimulator`|`x86_64_iphonesimulator`|`x86_64_iphonesimulator`||
210
-
| iOS on macOS / Apple Silicon |`arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`||
210
+
| iOS on macOS / Apple Silicon |`arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|
211
211
212
212
If not listed above, `auto` is the same as `native`.
213
213
@@ -307,7 +307,7 @@ the package is compatible with all versions of Python that it can build.
307
307
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
308
308
```
309
309
310
-
### `CIBW_ENABLE` {: #enable toml env-var}
310
+
### `enable` {: #enable toml env-var}
311
311
> Enable building with extra categories of selectors present.
312
312
313
313
This option lets you opt-in to non-default builds, like pre-releases and
@@ -349,7 +349,7 @@ This option doesn't support overrides or platform specific variants; it is
349
349
intended as a way to acknowledge that a project is aware that these extra
350
350
selectors exist. If you need to enable/disable it per platform or python
351
351
version, set this option to `true` and use
352
-
[`CIBW_BUILD`](#build-skip)/[`CIBW_SKIP`](#build-skip) options to filter the
352
+
[`build`](#build-skip)/[`skip`](#build-skip) options to filter the
353
353
builds.
354
354
355
355
Unlike all other cibuildwheel options, the environment variable setting will
@@ -673,7 +673,7 @@ This option is very useful for the Linux build, where builds take place in isola
673
673
674
674
The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by cibuildwheel.
675
675
676
-
On Windows and macOS, the version of Python available inside `CIBW_BEFORE_ALL` is whatever is available on the host machine. On Linux, a modern Python version is available on PATH.
676
+
On Windows and macOS, the version of Python available inside `before-all` is whatever is available on the host machine. On Linux, a modern Python version is available on PATH.
677
677
678
678
This option has special behavior in the overrides section in `pyproject.toml`.
679
679
On linux, overriding it triggers a new container launch. It cannot be overridden
@@ -684,7 +684,7 @@ Platform-specific environment variables also available:<br/>
684
684
685
685
!!! note
686
686
687
-
This command is executed in a different Python environment from the builds themselves. So you can't `pip install` a Python dependency in CIBW_BEFORE_ALL and use it in the build. Instead, look at [`CIBW_BEFORE_BUILD`](#before-build), or, if your project uses pyproject.toml, the [build-system.requires](https://peps.python.org/pep-0518/#build-system-table) field.
687
+
This command is executed in a different Python environment from the builds themselves. So you can't `pip install` a Python dependency in `before-all` and use it in the build. Instead, look at [`before-build`](#before-build), or, if your project uses pyproject.toml, the [build-system.requires](https://peps.python.org/pep-0518/#build-system-table) field.
688
688
689
689
#### Examples
690
690
@@ -731,7 +731,7 @@ Platform-specific environment variables also available:<br/>
731
731
732
732
Note that `manylinux_2_31` builds occur inside a Debian derivative docker
733
733
container, where `manylinux2014` builds occur inside a CentOS one. So for
734
-
`manylinux_2_31` the `CIBW_BEFORE_ALL_LINUX` command must use `apt-get -y`
734
+
`manylinux_2_31` the `before-all` command must use `apt-get -y`
735
735
instead.
736
736
737
737
### `before-build` {: #before-build env-var toml}
@@ -822,13 +822,13 @@ Platform-specific environment variables are also available:<br/>
822
822
823
823
When building in a cross-platform environment, it is sometimes necessary to isolate the ``PATH`` so that binaries from the build machine don't accidentally get linked into the cross-platform binary. However, this isolation process will also hide tools that might be required to build your wheel.
824
824
825
-
If there are binaries present on the `PATH` when you invoke cibuildwheel, and those binaries are required to build your wheels, those binaries can be explicitly included in the isolated cross-build environment using `CIBW_XBUILD_TOOLS`. The binaries listed in this setting will be linked into an isolated location, and that isolated location will be put on the `PATH` of the isolated environment. You do not need to provide the full path to the binary - only the executable name that would be found by the shell.
825
+
If there are binaries present on the `PATH` when you invoke cibuildwheel, and those binaries are required to build your wheels, those binaries can be explicitly included in the isolated cross-build environment using `xbuild-tools`. The binaries listed in this setting will be linked into an isolated location, and that isolated location will be put on the `PATH` of the isolated environment. You do not need to provide the full path to the binary - only the executable name that would be found by the shell.
826
826
827
827
If you declare a tool as a cross-build tool, and that tool cannot be found in the runtime environment, an error will be raised.
828
828
829
-
If you do not define `CIBW_XBUILD_TOOLS`, and you build for a platform that uses a cross-platform environment, a warning will be raised. If your project does not require any cross-build tools, you can set `CIBW_XBUILD_TOOLS` to an empty list to silence this warning.
829
+
If you do not define `xbuild-tools`, and you build for a platform that uses a cross-platform environment, a warning will be raised. If your project does not require any cross-build tools, you can set `xbuild-tools` to an empty list to silence this warning.
830
830
831
-
*Any* tool used by the build process must be included in the `CIBW_XBUILD_TOOLS` list, not just tools that cibuildwheel will invoke directly. For example, if your build invokes `cmake`, and the `cmake` script invokes `magick` to perform some image transformations, both `cmake` and `magick` must be included in your safe tools list.
831
+
*Any* tool used by the build process must be included in the `xbuild-tools` list, not just tools that cibuildwheel will invoke directly. For example, if your build invokes `cmake`, and the `cmake` script invokes `magick` to perform some image transformations, both `cmake` and `magick` must be included in your safe tools list.
832
832
833
833
Platform-specific environment variables are also available on platforms that use cross-platform environment isolation:<br/>
834
834
`CIBW_XBUILD_TOOLS_IOS`
@@ -1260,7 +1260,7 @@ Using `{package}` or `{project}` used to be required, but since cibuildwheel
1260
1260
use relative paths in your test command, and they will be relative to the
1261
1261
project root.
1262
1262
1263
-
Alternatively, you can use the [`test_sources`](#test-sources) setting to
1263
+
Alternatively, you can use the [`test-sources`](#test-sources) setting to
1264
1264
create a temporary folder populated with a specific subset of project files to
1265
1265
run your test suite.
1266
1266
@@ -1419,7 +1419,7 @@ Platform-specific environment variables are also available:<br/>
> Install Python dependencies before running the tests
1424
1424
1425
1425
Space-separated list of dependencies required for running the tests.
@@ -1432,7 +1432,7 @@ Platform-specific environment variables are also available:<br/>
1432
1432
!!! tab examples "pyproject.toml"
1433
1433
1434
1434
```toml
1435
-
# Install pytest before running CIBW_TEST_COMMAND
1435
+
# Install pytest before running test-command
1436
1436
[tool.cibuildwheel]
1437
1437
test-requires = "pytest"
1438
1438
@@ -1528,7 +1528,7 @@ Platform-specific environment variables are also available:<br/>
1528
1528
### `test-skip` {: #test-skip env-var toml}
1529
1529
> Skip running tests on some builds
1530
1530
1531
-
This will skip testing on any identifiers that match the given skip patterns (see [`CIBW_SKIP`](#build-skip)). This can be used to mask out tests for wheels that have missing dependencies upstream that are slow or hard to build, or to skip slow tests on emulated architectures.
1531
+
This will skip testing on any identifiers that match the given skip patterns (see [`skip`](#build-skip)). This can be used to mask out tests for wheels that have missing dependencies upstream that are slow or hard to build, or to skip slow tests on emulated architectures.
1532
1532
1533
1533
With macOS `universal2` wheels, you can also skip the individual archs inside the wheel using an `:arch` suffix. For example, `cp39-macosx_universal2:x86_64` or `cp39-macosx_universal2:arm64`.
1534
1534
@@ -1602,6 +1602,7 @@ Platform-specific environment variables are also available:<br/>
0 commit comments