Skip to content

Commit 1650425

Browse files
authored
Merge pull request #8673 from freakboy3742/zlib-ng-with-sip
Rewrite the install_name of the ZLIB-NG library on macOS
2 parents f8566b9 + 56a72a3 commit 1650425

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ function build_zlib_ng {
7272
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
7373
&& make -j4 \
7474
&& make install)
75+
76+
if [ -n "$IS_MACOS" ]; then
77+
# Ensure that on macOS, the library name is an absolute path, not an
78+
# @rpath, so that delocate picks up the right library (and doesn't need
79+
# DYLD_LIBRARY_PATH to be set). The default Makefile doesn't have an
80+
# option to control the install_name.
81+
install_name_tool -id $BUILD_PREFIX/lib/libz.1.dylib $BUILD_PREFIX/lib/libz.1.dylib
82+
fi
7583
touch zlib-stamp
7684
}
7785

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ test-extras = "tests"
104104

105105
[tool.cibuildwheel.macos.environment]
106106
PATH = "$(pwd)/build/deps/darwin/bin:$(dirname $(which python3)):/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin"
107-
DYLD_LIBRARY_PATH = "$(pwd)/build/deps/darwin/lib"
108107

109108
[tool.black]
110109
exclude = "wheels/multibuild"

0 commit comments

Comments
 (0)