Skip to content

Commit

Permalink
fix wheel.py-api arg
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Dec 3, 2024
1 parent 7691bbd commit 2498208
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ build-verbosity = "1"
free-threaded-support = true
test-requires = ["pytest>=6", "importlib_metadata"]
test-command = "pytest -vsx {package}/tools/test_wheel.py"
build-frontend = "build"

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

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

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

# build limited-api wheels for 3.7, 3.12
[[tool.cibuildwheel.overrides]]
config-settings = { wheel = { py-api = "cp312" } }
select = "cp312-*"
config-settings = { "wheel.py-api" = "cp312" }

[[tool.cibuildwheel.overrides]]
config-settings = { wheel = { py-api = "cp37" } }
select = "cp37-*"
config-settings = { "wheel.py-api" = "cp37" }

# note: manylinux_2_28 builds are added
# in .github/workflows/wheels.yml
Expand Down
9 changes: 8 additions & 1 deletion tools/install_libzmq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ LIBZMQ_VERSION=$(python buildutils/bundle.py)
PYZMQ_DIR="$PWD"
LICENSE_DIR="$PYZMQ_DIR/licenses"
test -d "$LICENSE_DIR" || mkdir "$LICENSE_DIR"

SHLIB_EXT="so"
if [[ "$(uname)" == "Darwin" ]]; then
SHLIB_EXT="dylib"
# need LT_MULTI_MODULE or libtool will strip out
# all multi-arch symbols at the last step
export LT_MULTI_MODULE=1
Expand Down Expand Up @@ -41,6 +42,12 @@ if [[ "$(uname)" == "Darwin" ]]; then
fi

PREFIX="${ZMQ_PREFIX:-/usr/local}"

if [ -f "$PREFIX/lib/libzmq.${SHLIB_EXT}" ]; then
echo "using $PREFIX/lib/libzmq.${SHLIB_EXT}"
exit 0
fi

# add rpath so auditwheel patches it
export LDFLAGS="${LDFLAGS} -Wl,-rpath,$PREFIX/lib"

Expand Down
1 change: 1 addition & 0 deletions tools/wheel-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
abi3audit
cibuildwheel==2.20.*
delvewheel==1.7.2; sys_platform == 'win32'

0 comments on commit 2498208

Please sign in to comment.