Skip to content

Commit

Permalink
Merge pull request #1322 from ankith26/update-delocate-default
Browse files Browse the repository at this point in the history
Tweak default mac repair cmd: use delocate-wheel verbose flag instead of extra listdeps command
  • Loading branch information
joerick authored Oct 26, 2022
2 parents 89a8cac + 03396fd commit b1b8ab5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 1 addition & 4 deletions cibuildwheel/resources/defaults.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ musllinux-s390x-image = "musllinux_1_1"
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
repair-wheel-command = [
"delocate-listdeps {wheel}",
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}",
]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"

[tool.cibuildwheel.windows]
11 changes: 5 additions & 6 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,17 @@ To work around this, use a different environment variable such as `REPAIR_LIBRAR

```yaml
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel} &&
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
```

!!! tab examples "pyproject.toml"

```toml
[tool.cibuildwheel.macos]
repair-wheel-command = [
"DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-listdeps {wheel}",
"DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
]
repair-wheel-command = """\
DYLD_LIBRARY_PATH=$REPAIR_LIBRARY_PATH delocate-wheel \
--require-archs {delocate_archs} -w {dest_dir} -v {wheel}\
"""
```

See [#816](https://github.com/pypa/cibuildwheel/issues/816), thanks to @phoerious for reporting.
Expand Down
2 changes: 1 addition & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ Platform-specific environment variables are also available:<br/>
Default:

- on Linux: `'auditwheel repair -w {dest_dir} {wheel}'`
- on macOS: `'delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}'`
- on macOS: `'delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}'`
- on Windows: `''`

A shell command to repair a built wheel by copying external library dependencies into the wheel tree and relinking them.
Expand Down
2 changes: 1 addition & 1 deletion unit_test/main_tests/main_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_default_repair_command(platform):
if platform == "linux":
return "auditwheel repair -w {dest_dir} {wheel}"
elif platform == "macos":
return "delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
return "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
elif platform == "windows":
return ""
else:
Expand Down

0 comments on commit b1b8ab5

Please sign in to comment.