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
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ This option can also be set using the [command-line option](#command-line) `--pl
46
46
47
47
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.
48
48
49
-
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.
49
+
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.
50
50
51
51
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:
52
52
@@ -69,7 +69,7 @@ The list of supported and currently selected build identifiers can also be retri
69
69
The format is `python_tag-platform_tag`, with tags similar to those in [PEP 425](https://www.python.org/dev/peps/pep-0425/#details).
70
70
71
71
Windows arm64 platform support is experimental.
72
-
Linux riscv64 platform support is experimental and requires an explicit opt-in through [CIBW_ENABLE](#enable).
72
+
Linux riscv64 platform support is experimental and requires an explicit opt-in through [`enable`](#enable).
73
73
74
74
See the [cibuildwheel 2 documentation](https://cibuildwheel.pypa.io/en/2.x/) for past end-of-life versions of Python.
75
75
@@ -144,7 +144,7 @@ See the [cibuildwheel 2 documentation](https://cibuildwheel.pypa.io/en/2.x/) for
144
144
145
145
It is generally recommended to set `CIBW_BUILD` as an environment variable, though `skip`
146
146
tends to be useful in a config file; you can statically declare that you don't
147
-
support PyPy, for example.
147
+
support a specific build, for example.
148
148
149
149
<style>
150
150
.build-id-table-marker+table {
@@ -190,10 +190,10 @@ Options:
190
190
-`auto32`: Just the 32-bit auto archs
191
191
-`native`: the native arch of the build machine - Matches [`platform.machine()`](https://docs.python.org/3/library/platform.html#platform.machine).
192
192
-`all` : expands to all the architectures supported on this OS. You may want
193
-
to use [CIBW_BUILD](#build-skip) with this option to target specific
193
+
to use [`build`](#build-skip) with this option to target specific
194
194
architectures via build selectors.
195
195
196
-
Linux riscv64 platform support is experimental and requires an explicit opt-in through [CIBW_ENABLE](#enable).
196
+
Linux riscv64 platform support is experimental and requires an explicit opt-in through [`enable`](#enable).
197
197
198
198
Default: `auto`
199
199
@@ -205,7 +205,7 @@ Default: `auto`
205
205
| macOS / Intel |`x86_64`|`x86_64`|`x86_64`||
206
206
| macOS / Apple Silicon |`arm64`|`arm64`|`arm64`||
207
207
| iOS on macOS / Intel |`x86_64_iphonesimulator`|`x86_64_iphonesimulator`|`x86_64_iphonesimulator`||
208
-
| iOS on macOS / Apple Silicon |`arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`||
208
+
| iOS on macOS / Apple Silicon |`arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|`arm64_iphoneos``arm64_iphonesimulator`|
209
209
210
210
If not listed above, `auto` is the same as `native`.
211
211
@@ -305,7 +305,7 @@ the package is compatible with all versions of Python that it can build.
305
305
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
306
306
```
307
307
308
-
### `CIBW_ENABLE` {: #enable toml env-var}
308
+
### `enable` {: #enable toml env-var}
309
309
> Enable building with extra categories of selectors present.
310
310
311
311
This option lets you opt-in to non-default builds, like pre-releases and
@@ -347,7 +347,7 @@ This option doesn't support overrides or platform specific variants; it is
347
347
intended as a way to acknowledge that a project is aware that these extra
348
348
selectors exist. If you need to enable/disable it per platform or python
349
349
version, set this option to `true` and use
350
-
[`CIBW_BUILD`](#build-skip)/[`CIBW_SKIP`](#build-skip) options to filter the
350
+
[`build`](#build-skip)/[`skip`](#build-skip) options to filter the
351
351
builds.
352
352
353
353
Unlike all other cibuildwheel options, the environment variable setting will
@@ -671,7 +671,7 @@ This option is very useful for the Linux build, where builds take place in isola
671
671
672
672
The placeholder `{package}` can be used here; it will be replaced by the path to the package being built by cibuildwheel.
673
673
674
-
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.
674
+
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.
675
675
676
676
This option has special behavior in the overrides section in `pyproject.toml`.
677
677
On linux, overriding it triggers a new container launch. It cannot be overridden
@@ -682,7 +682,7 @@ Platform-specific environment variables also available:<br/>
682
682
683
683
!!! note
684
684
685
-
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.
685
+
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.
686
686
687
687
#### Examples
688
688
@@ -729,7 +729,7 @@ Platform-specific environment variables also available:<br/>
729
729
730
730
Note that `manylinux_2_31` builds occur inside a Debian derivative docker
731
731
container, where `manylinux2014` builds occur inside a CentOS one. So for
732
-
`manylinux_2_31` the `CIBW_BEFORE_ALL_LINUX` command must use `apt-get -y`
732
+
`manylinux_2_31` the `before-all` command must use `apt-get -y`
733
733
instead.
734
734
735
735
### `before-build` {: #before-build env-var toml}
@@ -820,13 +820,13 @@ Platform-specific environment variables are also available:<br/>
820
820
821
821
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.
822
822
823
-
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.
823
+
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.
824
824
825
825
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.
826
826
827
-
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.
827
+
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.
828
828
829
-
*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.
829
+
*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.
830
830
831
831
Platform-specific environment variables are also available on platforms that use cross-platform environment isolation:<br/>
832
832
`CIBW_XBUILD_TOOLS_IOS`
@@ -1297,7 +1297,7 @@ Using `{package}` or `{project}` used to be required, but since cibuildwheel
1297
1297
use relative paths in your test command, and they will be relative to the
1298
1298
project root.
1299
1299
1300
-
Alternatively, you can use the [`test_sources`](#test-sources) setting to
1300
+
Alternatively, you can use the [`test-sources`](#test-sources) setting to
1301
1301
create a temporary folder populated with a specific subset of project files to
1302
1302
run your test suite.
1303
1303
@@ -1456,7 +1456,7 @@ Platform-specific environment variables are also available:<br/>
> Install Python dependencies before running the tests
1461
1461
1462
1462
Space-separated list of dependencies required for running the tests.
@@ -1469,7 +1469,7 @@ Platform-specific environment variables are also available:<br/>
1469
1469
!!! tab examples "pyproject.toml"
1470
1470
1471
1471
```toml
1472
-
# Install pytest before running CIBW_TEST_COMMAND
1472
+
# Install pytest before running test-command
1473
1473
[tool.cibuildwheel]
1474
1474
test-requires = "pytest"
1475
1475
@@ -1565,7 +1565,7 @@ Platform-specific environment variables are also available:<br/>
1565
1565
### `test-skip` {: #test-skip env-var toml}
1566
1566
> Skip running tests on some builds
1567
1567
1568
-
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.
1568
+
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.
1569
1569
1570
1570
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`.
1571
1571
@@ -1639,6 +1639,7 @@ Platform-specific environment variables are also available:<br/>
0 commit comments