diff --git a/bin/generate_schema.py b/bin/generate_schema.py
index a7d37162..ad830496 100755
--- a/bin/generate_schema.py
+++ b/bin/generate_schema.py
@@ -382,6 +382,7 @@ oses = {
for os_name, command in [
("linux", "auditwheel repair -w {dest_dir} {wheel}"),
+ ("windows", "delvewheel repair -w {dest_dir} -v {wheel}"),
("macos", "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"),
("android", "auditwheel repair --ldpaths {ldpaths} -w {dest_dir} {wheel}"),
]:
diff --git a/cibuildwheel/resources/cibuildwheel.schema.json b/cibuildwheel/resources/cibuildwheel.schema.json
index 707940d9..5795aa2b 100644
--- a/cibuildwheel/resources/cibuildwheel.schema.json
+++ b/cibuildwheel/resources/cibuildwheel.schema.json
@@ -1057,7 +1057,20 @@
"$ref": "#/properties/pyodide-version"
},
"repair-wheel-command": {
- "$ref": "#/properties/repair-wheel-command"
+ "description": "Execute a shell command to repair each built wheel.",
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ ],
+ "title": "CIBW_REPAIR_WHEEL_COMMAND",
+ "default": "delvewheel repair -w {dest_dir} -v {wheel}"
},
"test-command": {
"$ref": "#/properties/test-command"
diff --git a/docs/contributing.md b/docs/contributing.md
index cdc9bb1f..d812a297 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -27,7 +27,7 @@ Other notes:
### cibuildwheel's relationship with build errors
-cibuildwheel doesn't really do anything itself - it's always deferring to other tools (pip, wheel, auditwheel, delocate, docker). Without cibuildwheel, the process is really fragmented. Different tools, across different OSs need to be stitched together in just the right way to make it work.
+cibuildwheel doesn't really do anything itself - it's always deferring to other tools (pip, wheel, auditwheel, delocate, delvewheel, docker). Without cibuildwheel, the process is really fragmented. Different tools, across different OSs need to be stitched together in just the right way to make it work.
We're not responsible for errors in those tools, for fixing errors/crashes there. But cibuildwheel's job is providing users with an 'integrated' user experience across those tools. We provide an abstraction. The user says 'build me some wheels', not 'open the docker container, build a wheel with pip, fix up the symbols with auditwheel' etc. However, errors have a habit of breaking abstractions. And this is where users get confused, because the mechanism of cibuildwheel is laid bare, and they must understand a little bit how it works to debug.
diff --git a/docs/data/how-it-works.png b/docs/data/how-it-works.png
index 3011593b..7741a7c2 100644
Binary files a/docs/data/how-it-works.png and b/docs/data/how-it-works.png differ
diff --git a/docs/diagram.html b/docs/diagram.html
index ab492f07..03acb151 100644
--- a/docs/diagram.html
+++ b/docs/diagram.html
@@ -190,8 +190,19 @@
},
},
{
+ label: 'Repair using delvewheel',
href: 'options/#repair-wheel-command',
- platforms: ['windows', 'ios', 'pyodide'],
+ platforms: ['windows'],
+ style: 'block',
+ tooltip: {
+ title: 'CIBW_REPAIR_WHEEL_COMMAND',
+ tag: 'Customisable step',
+ description: 'Bundle shared libraries by running delvewheel on each built wheel.'
+ },
+ },
+ {
+ href: 'options/#repair-wheel-command',
+ platforms: ['ios', 'pyodide'],
style: 'dot',
tooltip: {
title: 'CIBW_REPAIR_WHEEL_COMMAND',
diff --git a/docs/options.md b/docs/options.md
index d53f33bf..7a8b84fb 100644
--- a/docs/options.md
+++ b/docs/options.md
@@ -959,6 +959,7 @@ Platform-specific environment variables are also available:
Default:
- on Linux: `'auditwheel repair -w {dest_dir} {wheel}'`
+- on Windows: `'delvewheel repair -w {dest_dir} -v {wheel}'`
- on macOS: `'delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'`
- on Android: `'auditwheel repair --ldpaths {ldpaths} -w {dest_dir} {wheel}'`
- on Pyodide: You can use `pyodide auditwheel repair --libdir /path/to/libraries --output-dir {dest_dir} {wheel}` command to repair the wheel.
@@ -984,24 +985,14 @@ The command is run in a shell, so you can run multiple commands like `cmd1 && cm
Platform-specific environment variables are also available:
`CIBW_REPAIR_WHEEL_COMMAND_MACOS` | `CIBW_REPAIR_WHEEL_COMMAND_WINDOWS` | `CIBW_REPAIR_WHEEL_COMMAND_LINUX` | `CIBW_REPAIR_WHEEL_COMMAND_ANDROID` | `CIBW_REPAIR_WHEEL_COMMAND_IOS` | `CIBW_REPAIR_WHEEL_COMMAND_PYODIDE`
-!!! tip
- cibuildwheel doesn't yet ship a default repair command for Windows.
-
- **If that's an issue for you, check out [delvewheel]** - a new package that aims to do the same as auditwheel or delocate for Windows.
-
- Because delvewheel is still relatively early-stage, cibuildwheel does not yet run it by default. However, we'd recommend giving it a try! See the examples below for usage.
-
- [Delvewheel]: https://github.com/adang1345/delvewheel
-
#### Examples
!!! tab examples "pyproject.toml"
```toml
- # Use delvewheel on windows
+ # Don't repair Windows wheels
[tool.cibuildwheel.windows]
- before-build = "pip install delvewheel"
- repair-wheel-command = "delvewheel repair -w {dest_dir} {wheel}"
+ repair-wheel-command = ""
# Don't repair macOS wheels
[tool.cibuildwheel.macos]
@@ -1029,9 +1020,8 @@ Platform-specific environment variables are also available:
!!! tab examples "Environment variables"
```yaml
- # Use delvewheel on windows
- CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
- CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel}"
+ # Don't repair Windows wheels
+ CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: ""
# Don't repair macOS wheels
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""