From c09359e9afb5ef84f98acb8b88ba1388e8e312bc Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Fri, 21 Oct 2022 14:14:13 +0530 Subject: [PATCH 1/2] Tweak default mac repair cmd: delocate verbose --- cibuildwheel/resources/defaults.toml | 8 ++++---- docs/faq.md | 11 +++++------ docs/options.md | 2 +- unit_test/main_tests/main_options_test.py | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cibuildwheel/resources/defaults.toml b/cibuildwheel/resources/defaults.toml index 2b5708c7a..af7c45b87 100644 --- a/cibuildwheel/resources/defaults.toml +++ b/cibuildwheel/resources/defaults.toml @@ -42,9 +42,9 @@ 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] diff --git a/docs/faq.md b/docs/faq.md index 44c9bab4e..3c51f1c39 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -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. diff --git a/docs/options.md b/docs/options.md index 55352159b..f2a5c142d 100644 --- a/docs/options.md +++ b/docs/options.md @@ -851,7 +851,7 @@ Platform-specific environment variables are also available:
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. diff --git a/unit_test/main_tests/main_options_test.py b/unit_test/main_tests/main_options_test.py index 2a34ad0b0..be2d94583 100644 --- a/unit_test/main_tests/main_options_test.py +++ b/unit_test/main_tests/main_options_test.py @@ -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: From 03396fdbb2af33cf8e19d766573169413b772b74 Mon Sep 17 00:00:00 2001 From: Ankith <46915066+ankith26@users.noreply.github.com> Date: Fri, 21 Oct 2022 18:38:36 +0530 Subject: [PATCH 2/2] delocate command is fine on a single line Co-authored-by: Joe Rickerby --- cibuildwheel/resources/defaults.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cibuildwheel/resources/defaults.toml b/cibuildwheel/resources/defaults.toml index af7c45b87..d16a31471 100644 --- a/cibuildwheel/resources/defaults.toml +++ b/cibuildwheel/resources/defaults.toml @@ -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-wheel --require-archs {delocate_archs} \ - -w {dest_dir} -v {wheel}\ - """ +repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" [tool.cibuildwheel.windows]