Add docs for CIBW_ARCHS
This commit is contained in:
+38
-16
@@ -64,7 +64,7 @@ Default: `auto`
|
|||||||
|
|
||||||
For `linux` you need Docker running, on macOS or Linux. For `macos`, you need a Mac machine, and note that this script is going to automatically install MacPython on your system, so don't run on your development machine. For `windows`, you need to run in Windows, and `cibuildwheel` will install required versions of Python to `C:\cibw\python` using NuGet.
|
For `linux` you need Docker running, on macOS or Linux. For `macos`, you need a Mac machine, and note that this script is going to automatically install MacPython on your system, so don't run on your development machine. For `windows`, you need to run in Windows, and `cibuildwheel` will install required versions of Python to `C:\cibw\python` using NuGet.
|
||||||
|
|
||||||
This option can also be set using the command-line option `--platform`.
|
This option can also be set using the [command-line option](#command-line) `--platform`.
|
||||||
|
|
||||||
|
|
||||||
### `CIBW_BUILD`, `CIBW_SKIP` {: #build-skip}
|
### `CIBW_BUILD`, `CIBW_SKIP` {: #build-skip}
|
||||||
@@ -155,24 +155,36 @@ CIBW_SKIP: pp*
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
### `CIBW_ARCHS_LINUX` {: #archs}
|
### `CIBW_ARCHS` {: #archs}
|
||||||
> Build non-native architectures
|
> Change the architectures built on your machine by default.
|
||||||
|
|
||||||
A space-separated list of architectures to build. Use this in conjunction with
|
A space-separated list of architectures to build.
|
||||||
emulation, such as that provided by [docker/setup-qemu-action][setup-qemu-action]
|
|
||||||
or [tonistiigi/binfmt][binfmt], to build architectures other than those your
|
|
||||||
machine natively supports.
|
|
||||||
|
|
||||||
Options: `auto` `native` `all` `x86_64` `i686` `aarch64` `ppc64le` `s390x`
|
On macOS, this option can be used to cross-compile between `x86_64`,
|
||||||
|
`universal2` and `arm64` for Apple Silicon support.
|
||||||
|
|
||||||
Default: `auto`, meaning the native archs supported on the build machine. For
|
On Linux, this option can be used to build non-native architectures under emulation, such as that
|
||||||
example, on an `x86_64` machine, `auto` expands to `x86_64` and `i686`.
|
provided by [docker/setup-qemu-action][setup-qemu-action]
|
||||||
|
or [tonistiigi/binfmt][binfmt]. See [this guide](faq.md#automatic-updates) for more information.
|
||||||
|
|
||||||
`native` will only build on the exact architecture you currently are on; it will
|
Options:
|
||||||
not add `i686` for `x86_64`.
|
- Linux: `x86_64` `i686` `aarch64` `ppc64le` `s390x`
|
||||||
|
- macOS: `x86_64` `arm64` `universal2`
|
||||||
|
- Windows: `x86` `AMD64`
|
||||||
|
- `auto`: The default archs for your machine - see the table below.
|
||||||
|
- `native`: the native arch of the build machine - Matches [`platform.machine()`](https://docs.python.org/3/library/platform.html#platform.machine).
|
||||||
|
- `all` : expands to all the architectures supported on this OS. You may want
|
||||||
|
to use [CIBW_BUILD](#build-skip) with this option to target specific
|
||||||
|
architectures via build selectors.
|
||||||
|
|
||||||
`all` will expand to all known architectures; remember to use build selectors
|
Default: `auto`
|
||||||
to limit builds for each job; this list could grow in the future.
|
|
||||||
|
| Runner | `native` | `auto`
|
||||||
|
|---|---|---|---
|
||||||
|
| macOS / Intel | `x86_64` | `x86_64`
|
||||||
|
| macOS / Apple Silicon | `arm64` | `arm64`, `universal2`
|
||||||
|
| Linux / Intel | `x86_64` | `x86_64`, `i686`
|
||||||
|
| Windows / Intel | `AMD64` | `AMD64`, `x86`
|
||||||
|
|
||||||
[setup-qemu-action]: https://github.com/docker/setup-qemu-action
|
[setup-qemu-action]: https://github.com/docker/setup-qemu-action
|
||||||
[binfmt]: https://hub.docker.com/r/tonistiigi/binfmt
|
[binfmt]: https://hub.docker.com/r/tonistiigi/binfmt
|
||||||
@@ -180,10 +192,20 @@ to limit builds for each job; this list could grow in the future.
|
|||||||
#### Examples
|
#### Examples
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# On an intel runner with qemu installed, build Intel and ARM wheels
|
# Build `universal2` and `arm64` wheels on an Intel runner.
|
||||||
|
# Note that the `arm64` wheel and the `arm64` part of the `universal2` wheel
|
||||||
|
# cannot be tested in this configuration.
|
||||||
|
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
|
||||||
|
|
||||||
|
# On an Linux Intel runner with qemu installed, build Intel and ARM wheels
|
||||||
CIBW_ARCHS_LINUX: "auto aarch64"
|
CIBW_ARCHS_LINUX: "auto aarch64"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Platform-specific variants also available:<br/>
|
||||||
|
`CIBW_ARCHS_MACOS` | `CIBW_ARCHS_WINDOWS` | `CIBW_ARCHS_LINUX`
|
||||||
|
|
||||||
|
This option can also be set using the [command-line option](#command-line) `--archs`.
|
||||||
|
|
||||||
## Build customization
|
## Build customization
|
||||||
|
|
||||||
### `CIBW_ENVIRONMENT` {: #environment}
|
### `CIBW_ENVIRONMENT` {: #environment}
|
||||||
@@ -548,7 +570,7 @@ CIBW_BUILD_VERBOSITY: 1
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Command line options
|
## Command line options {: #command-line}
|
||||||
|
|
||||||
```text
|
```text
|
||||||
usage: cibuildwheel [-h] [--platform {auto,linux,macos,windows}]
|
usage: cibuildwheel [-h] [--platform {auto,linux,macos,windows}]
|
||||||
|
|||||||
Reference in New Issue
Block a user