Skip to content

Commit 2498208

Browse files
committed
fix wheel.py-api arg
1 parent 7691bbd commit 2498208

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ build-verbosity = "1"
146146
free-threaded-support = true
147147
test-requires = ["pytest>=6", "importlib_metadata"]
148148
test-command = "pytest -vsx {package}/tools/test_wheel.py"
149+
build-frontend = "build"
149150

150151
[tool.cibuildwheel.linux]
151152
before-all = "bash tools/install_libzmq.sh"
@@ -163,7 +164,7 @@ CXXFLAGS = "-Wl,-strip-all"
163164

164165
[tool.cibuildwheel.macos]
165166
before-all = "bash tools/install_libzmq.sh"
166-
repair-wheel-command = "delocate-wheel --sanitize-rpaths --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
167+
repair-wheel-command = "delocate-wheel --sanitize-rpaths --require-archs {delocate_archs} -w {dest_dir} -v {wheel}; abi3audit -s {wheel}"
167168

168169
[tool.cibuildwheel.macos.environment]
169170
# note: everything here needs to also be duplicated in overrides below
@@ -204,12 +205,12 @@ manylinux-i686-image = "manylinux2010"
204205

205206
# build limited-api wheels for 3.7, 3.12
206207
[[tool.cibuildwheel.overrides]]
207-
config-settings = { wheel = { py-api = "cp312" } }
208208
select = "cp312-*"
209+
config-settings = { "wheel.py-api" = "cp312" }
209210

210211
[[tool.cibuildwheel.overrides]]
211-
config-settings = { wheel = { py-api = "cp37" } }
212212
select = "cp37-*"
213+
config-settings = { "wheel.py-api" = "cp37" }
213214

214215
# note: manylinux_2_28 builds are added
215216
# in .github/workflows/wheels.yml

tools/install_libzmq.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ LIBZMQ_VERSION=$(python buildutils/bundle.py)
66
PYZMQ_DIR="$PWD"
77
LICENSE_DIR="$PYZMQ_DIR/licenses"
88
test -d "$LICENSE_DIR" || mkdir "$LICENSE_DIR"
9-
9+
SHLIB_EXT="so"
1010
if [[ "$(uname)" == "Darwin" ]]; then
11+
SHLIB_EXT="dylib"
1112
# need LT_MULTI_MODULE or libtool will strip out
1213
# all multi-arch symbols at the last step
1314
export LT_MULTI_MODULE=1
@@ -41,6 +42,12 @@ if [[ "$(uname)" == "Darwin" ]]; then
4142
fi
4243

4344
PREFIX="${ZMQ_PREFIX:-/usr/local}"
45+
46+
if [ -f "$PREFIX/lib/libzmq.${SHLIB_EXT}" ]; then
47+
echo "using $PREFIX/lib/libzmq.${SHLIB_EXT}"
48+
exit 0
49+
fi
50+
4451
# add rpath so auditwheel patches it
4552
export LDFLAGS="${LDFLAGS} -Wl,-rpath,$PREFIX/lib"
4653

tools/wheel-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
abi3audit
12
cibuildwheel==2.20.*
23
delvewheel==1.7.2; sys_platform == 'win32'

0 commit comments

Comments
 (0)