From 7691bbd09f459183611c40a928d44978f3304577 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 2 Dec 2024 16:01:50 +0100 Subject: [PATCH 1/9] wip: limited api wheels --- .github/workflows/wheels.yml | 2 +- CMakeLists.txt | 14 ++++++++++++-- pyproject.toml | 15 ++++++++++++--- zmq/backend/cython/_cpython.pxd | 10 ++++++++++ zmq/backend/cython/_zmq.py | 23 +++++++++++++++++------ zmq/utils/mutex.h | 2 ++ 6 files changed, 54 insertions(+), 12 deletions(-) create mode 100644 zmq/backend/cython/_cpython.pxd diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 59fc5a642..ede2fca0d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -64,7 +64,7 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "10.9" CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" - CIBW_SKIP: "${{ matrix.cibw.skip || '' }}" + CIBW_SKIP: "cp38-* cp39-* cp310-* cp311-* cp313-* ${{ matrix.cibw.skip || '' }}" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}" diff --git a/CMakeLists.txt b/CMakeLists.txt index bc02c21b8..595ded455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,13 +5,13 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package( Python - COMPONENTS Interpreter Development.Module + COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT} REQUIRED) # Python_SOABI isn't always right when cross-compiling # SKBUILD_SOABI seems to be if (DEFINED SKBUILD_SOABI AND NOT "${SKBUILD_SOABI}" STREQUAL "${Python_SOABI}") - message(WARNING "SKBUILD_SOABI=${SKBUILD_SOABI} != Python_SOABI=${Python_SOABI}; likely cross-compiling, using SOABI=${SKBUILD_SOABI} from scikit-build") + message(WARNING "SKBUILD_SOABI=${SKBUILD_SOABI} != Python_SOABI=${Python_SOABI}; likely cross-compiling or Limited API, using SOABI=${SKBUILD_SOABI} from scikit-build") set(Python_SOABI "${SKBUILD_SOABI}") endif() @@ -404,9 +404,19 @@ endif() file(MAKE_DIRECTORY ${ZMQ_BACKEND_DEST}) +if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") + # set stable API + # assume we are targeting >= current Python version + # this isn't required, but we can't seem to get `wheel.py-api + message("SKBUILD_LIMITED_API=${SKBUILD_LIMITED_API}") + set(SABI_ARG "USE_SABI;${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}") + message("Building with stable API ${SABI_ARG} for ${Python_SOABI}") +endif() + python_add_library( ${ZMQ_EXT_NAME} MODULE WITH_SOABI + ${SABI_ARG} ${ZMQ_C} ) diff --git a/pyproject.toml b/pyproject.toml index 5bbc5cc91..8b84260d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,9 @@ [build-system] requires = [ "cffi; implementation_name == 'pypy'", - "cython>=3.0.0; implementation_name != 'pypy'", + "cython>=3.1.0a1; implementation_name != 'pypy'", "packaging", - "scikit-build-core", + "scikit-build-core>=0.10", ] build-backend = "scikit_build_core.build" @@ -56,7 +56,7 @@ wheel.license-files = ["licenses/LICENSE*"] # 3.15 is required by scikit-build-core cmake.version = ">=3.15" # only build/install the pyzmq component -cmake.targets = ["pyzmq"] +build.targets = ["pyzmq"] install.components = ["pyzmq"] [tool.ruff] @@ -202,6 +202,15 @@ select = "cp3{7,8,9}-* pp3{7,8}-*" manylinux-x86_64-image = "manylinux2010" manylinux-i686-image = "manylinux2010" +# build limited-api wheels for 3.7, 3.12 +[[tool.cibuildwheel.overrides]] +config-settings = { wheel = { py-api = "cp312" } } +select = "cp312-*" + +[[tool.cibuildwheel.overrides]] +config-settings = { wheel = { py-api = "cp37" } } +select = "cp37-*" + # note: manylinux_2_28 builds are added # in .github/workflows/wheels.yml diff --git a/zmq/backend/cython/_cpython.pxd b/zmq/backend/cython/_cpython.pxd new file mode 100644 index 000000000..b37f4645d --- /dev/null +++ b/zmq/backend/cython/_cpython.pxd @@ -0,0 +1,10 @@ +# These should be cimported from cpython.bytes +# but that has a transitive import of cpython.type +# which currently conflicts with limited API +cdef extern from "Python.h": + # cpython.bytes + char* PyBytes_AsString(object string) except NULL + bytes PyBytes_FromStringAndSize(char *v, Py_ssize_t len) + Py_ssize_t PyBytes_Size(object string) except -1 + # cpython.exc + int PyErr_CheckSignals() except -1 diff --git a/zmq/backend/cython/_zmq.py b/zmq/backend/cython/_zmq.py index 8cac83bee..c85ff703b 100644 --- a/zmq/backend/cython/_zmq.py +++ b/zmq/backend/cython/_zmq.py @@ -56,12 +56,15 @@ size_t, sizeof, ) -from cython.cimports.cpython import ( - PyBytes_AsString, - PyBytes_FromStringAndSize, - PyBytes_Size, - PyErr_CheckSignals, -) + +# Cannot cimport these with Limited API yet +# see https://github.com/cython/cython/issues/5634 +# from cython.cimports.cpython.bytes import ( +# PyBytes_AsString, +# PyBytes_FromStringAndSize, +# PyBytes_Size, +# ) +# from cython.cimports.cpython.exc import PyErr_CheckSignals from cython.cimports.libc.errno import EAGAIN, EINTR, ENAMETOOLONG, ENOENT, ENOTSOCK # cimports require Cython 3 @@ -70,6 +73,14 @@ from cython.cimports.libc.stdio import stderr as cstderr from cython.cimports.libc.stdlib import free, malloc from cython.cimports.libc.string import memcpy + +# these should be from cython.cimports.cpython +from cython.cimports.zmq.backend.cython._cpython import ( + PyBytes_AsString, + PyBytes_FromStringAndSize, + PyBytes_Size, + PyErr_CheckSignals, +) from cython.cimports.zmq.backend.cython._externs import ( get_ipc_path_max_len, getpid, diff --git a/zmq/utils/mutex.h b/zmq/utils/mutex.h index 2191d08d1..b6275ea28 100644 --- a/zmq/utils/mutex.h +++ b/zmq/utils/mutex.h @@ -9,6 +9,8 @@ #pragma once +#include + #if defined(_WIN32) # include #else From 24982085e625c1f688c85dc7df5a65e93f244b26 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Dec 2024 12:54:48 +0100 Subject: [PATCH 2/9] fix wheel.py-api arg --- pyproject.toml | 7 ++++--- tools/install_libzmq.sh | 9 ++++++++- tools/wheel-requirements.txt | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8b84260d0..f9d0cb9a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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 @@ -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 diff --git a/tools/install_libzmq.sh b/tools/install_libzmq.sh index 1e23723a6..2a95a1ba2 100644 --- a/tools/install_libzmq.sh +++ b/tools/install_libzmq.sh @@ -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 @@ -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" diff --git a/tools/wheel-requirements.txt b/tools/wheel-requirements.txt index 39b7e4f51..477f9f062 100644 --- a/tools/wheel-requirements.txt +++ b/tools/wheel-requirements.txt @@ -1,2 +1,3 @@ +abi3audit cibuildwheel==2.20.* delvewheel==1.7.2; sys_platform == 'win32' From e95632d077b260649c99c4b3a73ff989bdc9a4ac Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Dec 2024 12:59:00 +0100 Subject: [PATCH 3/9] need 3.8 for cython 3.1 --- .circleci/config.yml | 2 +- .github/workflows/wheels.yml | 2 +- pyproject.toml | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 29779d031..1fe028eed 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: resource_class: arm.medium environment: - CIBW_SKIP: "<< parameters.skip >>" + CIBW_SKIP: "cp39-* cp310-* cp311-* cp313-* << parameters.skip >>" CIBW_BUILD: "<< parameters.build >>" CIBW_PRERELEASE_PYTHONS: "1" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ede2fca0d..9798fa48b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -64,7 +64,7 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "10.9" CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" - CIBW_SKIP: "cp38-* cp39-* cp310-* cp311-* cp313-* ${{ matrix.cibw.skip || '' }}" + CIBW_SKIP: "cp39-* cp310-* cp311-* cp313-* ${{ matrix.cibw.skip || '' }}" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}" diff --git a/pyproject.toml b/pyproject.toml index f9d0cb9a0..80af4f7ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ authors = [ { name = "Min Ragan-Kelley" }, ] license = { file = "LICENSE.md" } -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -32,7 +32,6 @@ classifiers = [ "Topic :: System :: Networking", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -203,14 +202,14 @@ select = "cp3{7,8,9}-* pp3{7,8}-*" manylinux-x86_64-image = "manylinux2010" manylinux-i686-image = "manylinux2010" -# build limited-api wheels for 3.7, 3.12 +# build limited-api wheels for 3.8, 3.12 [[tool.cibuildwheel.overrides]] select = "cp312-*" config-settings = { "wheel.py-api" = "cp312" } [[tool.cibuildwheel.overrides]] -select = "cp37-*" -config-settings = { "wheel.py-api" = "cp37" } +select = "cp38-*" +config-settings = { "wheel.py-api" = "cp38" } # note: manylinux_2_28 builds are added # in .github/workflows/wheels.yml From f43bd435517b8d53de612e14fd66274fe8db6861 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Dec 2024 13:27:51 +0100 Subject: [PATCH 4/9] need Python 3.11 for buffers in stable API --- .circleci/config.yml | 2 +- .github/workflows/wheels.yml | 2 +- pyproject.toml | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fe028eed..ae3ce5ba4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: resource_class: arm.medium environment: - CIBW_SKIP: "cp39-* cp310-* cp311-* cp313-* << parameters.skip >>" + CIBW_SKIP: "cp312-* cp313-* << parameters.skip >>" CIBW_BUILD: "<< parameters.build >>" CIBW_PRERELEASE_PYTHONS: "1" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9798fa48b..cbfb828bc 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -64,7 +64,7 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "10.9" CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" - CIBW_SKIP: "cp39-* cp310-* cp311-* cp313-* ${{ matrix.cibw.skip || '' }}" + CIBW_SKIP: "cp312-* cp313-* ${{ matrix.cibw.skip || '' }}" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}" diff --git a/pyproject.toml b/pyproject.toml index 80af4f7ca..8e949effa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -202,14 +202,10 @@ select = "cp3{7,8,9}-* pp3{7,8}-*" manylinux-x86_64-image = "manylinux2010" manylinux-i686-image = "manylinux2010" -# build limited-api wheels for 3.8, 3.12 +# build limited-api wheels for 3.11 [[tool.cibuildwheel.overrides]] -select = "cp312-*" -config-settings = { "wheel.py-api" = "cp312" } - -[[tool.cibuildwheel.overrides]] -select = "cp38-*" -config-settings = { "wheel.py-api" = "cp38" } +select = "cp311-*" +config-settings = { "wheel.py-api" = "cp311" } # note: manylinux_2_28 builds are added # in .github/workflows/wheels.yml From 404766031707a21a4862c582e999d4dbe2225d20 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 3 Dec 2024 14:53:26 +0100 Subject: [PATCH 5/9] udpate some wheel requirements --- pyproject.toml | 6 ++++-- tools/wheel-requirements.txt | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e949effa..00783ea39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,8 @@ [build-system] requires = [ "cffi; implementation_name == 'pypy'", - "cython>=3.1.0a1; implementation_name != 'pypy'", + "cython>=3; implementation_name != 'pypy'", + "cython>=3.1.0a1; implementation_name != 'pypy' and python_version >= '3.11'", "packaging", "scikit-build-core>=0.10", ] @@ -19,7 +20,7 @@ authors = [ { name = "Min Ragan-Kelley" }, ] license = { file = "LICENSE.md" } -requires-python = ">=3.8" +requires-python = ">=3.7" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -32,6 +33,7 @@ classifiers = [ "Topic :: System :: Networking", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tools/wheel-requirements.txt b/tools/wheel-requirements.txt index 477f9f062..4128d9d87 100644 --- a/tools/wheel-requirements.txt +++ b/tools/wheel-requirements.txt @@ -1,3 +1,3 @@ abi3audit -cibuildwheel==2.20.* -delvewheel==1.7.2; sys_platform == 'win32' +cibuildwheel==2.22.* +delvewheel==1.9.0; sys_platform == 'win32' From c760755e5845a6f14c0d0f24a7c19b81722e64f7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 12 Dec 2024 11:04:25 +0100 Subject: [PATCH 6/9] add 3.12 limited api wheels temporarily, for testing --- .circleci/config.yml | 2 +- .github/workflows/wheels.yml | 2 +- CMakeLists.txt | 4 ++-- pyproject.toml | 14 ++++++++++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae3ce5ba4..29779d031 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: resource_class: arm.medium environment: - CIBW_SKIP: "cp312-* cp313-* << parameters.skip >>" + CIBW_SKIP: "<< parameters.skip >>" CIBW_BUILD: "<< parameters.build >>" CIBW_PRERELEASE_PYTHONS: "1" diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index cbfb828bc..59fc5a642 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -64,7 +64,7 @@ jobs: env: MACOSX_DEPLOYMENT_TARGET: "10.9" CIBW_BUILD: "${{ matrix.cibw.build || '*' }}" - CIBW_SKIP: "cp312-* cp313-* ${{ matrix.cibw.skip || '' }}" + CIBW_SKIP: "${{ matrix.cibw.skip || '' }}" CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}" CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}" diff --git a/CMakeLists.txt b/CMakeLists.txt index 595ded455..90f5ca91f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -407,8 +407,8 @@ file(MAKE_DIRECTORY ${ZMQ_BACKEND_DEST}) if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") # set stable API # assume we are targeting >= current Python version - # this isn't required, but we can't seem to get `wheel.py-api - message("SKBUILD_LIMITED_API=${SKBUILD_LIMITED_API}") + # this isn't required, but we can't seem to get `wheel.py-api` + # see https://github.com/scikit-build/scikit-build-core/issues/958 set(SABI_ARG "USE_SABI;${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}") message("Building with stable API ${SABI_ARG} for ${Python_SOABI}") endif() diff --git a/pyproject.toml b/pyproject.toml index 00783ea39..821bbe1b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -196,7 +196,8 @@ repair-wheel-command = """\ # mac-arm target is 10.15 [[tool.cibuildwheel.overrides]] select = "*macos*{universal2,arm64}*" -environment = { ZMQ_PREFIX = "/tmp/zmq", MACOSX_DEPLOYMENT_TARGET = "10.15" } +inherit.environment = "append" +"environment.MACOSX_DEPLOYMENT_TARGET" = "10.15" # manylinux2010 for (less) old cp37-9, pp37-8 [[tool.cibuildwheel.overrides]] @@ -207,7 +208,16 @@ manylinux-i686-image = "manylinux2010" # build limited-api wheels for 3.11 [[tool.cibuildwheel.overrides]] select = "cp311-*" -config-settings = { "wheel.py-api" = "cp311" } +inherit.config-settings = "append" +config-settings."wheel.py-api" = "cp311" +inherit.repair-wheel-command = "append" +repair-wheel-command = ["abi3audit", "--strict", "--report" , "{wheel}"] + +# for benchmarking, build limited cp312 as well +[[tool.cibuildwheel.overrides]] +select = "cp312-*" +inherit.config-settings = "append" +config-settings."wheel.py-api" = "cp312" # note: manylinux_2_28 builds are added # in .github/workflows/wheels.yml From 6ad801bde23729a2be6140bd39ca79c9b320240c Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 12 Dec 2024 11:47:02 +0100 Subject: [PATCH 7/9] tweak abi3audit command abi3audit needs to be installed, use pipx --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 821bbe1b1..6a584d8d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,7 +165,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}; abi3audit -s {wheel}" +repair-wheel-command = "delocate-wheel --sanitize-rpaths --require-archs {delocate_archs} -w {dest_dir} -v {wheel}" [tool.cibuildwheel.macos.environment] # note: everything here needs to also be duplicated in overrides below @@ -211,7 +211,7 @@ select = "cp311-*" inherit.config-settings = "append" config-settings."wheel.py-api" = "cp311" inherit.repair-wheel-command = "append" -repair-wheel-command = ["abi3audit", "--strict", "--report" , "{wheel}"] +repair-wheel-command = "pipx run abi3audit --strict --report {wheel}" # for benchmarking, build limited cp312 as well [[tool.cibuildwheel.overrides]] From 1f1adc8fcb2148bf4f22aa4a67ba98314d440c67 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 12 Dec 2024 11:49:09 +0100 Subject: [PATCH 8/9] macos-12 is gone --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 59fc5a642..88704eab4 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -72,12 +72,12 @@ jobs: fail-fast: false matrix: include: - - os: macos-12 + - os: macos-13 name: mac-cpython cibw: build: "cp*" - - os: macos-12 + - os: macos-13 name: mac-pypy cibw: build: "pp*" From 55be94288dd95b36c896aa95b224ba9970f678e7 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 12 Dec 2024 12:13:24 +0100 Subject: [PATCH 9/9] pipx doesn't work on windows maybe it's old --- CMakeLists.txt | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90f5ca91f..169cc9cfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,7 +410,7 @@ if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") # this isn't required, but we can't seem to get `wheel.py-api` # see https://github.com/scikit-build/scikit-build-core/issues/958 set(SABI_ARG "USE_SABI;${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}") - message("Building with stable API ${SABI_ARG} for ${Python_SOABI}") + message(STATUS "Building with stable API ${SABI_ARG} for ${Python_SOABI}") endif() python_add_library( diff --git a/pyproject.toml b/pyproject.toml index 6a584d8d6..b1e04d8b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,7 +211,8 @@ select = "cp311-*" inherit.config-settings = "append" config-settings."wheel.py-api" = "cp311" inherit.repair-wheel-command = "append" -repair-wheel-command = "pipx run abi3audit --strict --report {wheel}" +before-build = "pip install abi3audit" +repair-wheel-command = "abi3audit --strict --report {wheel}" # for benchmarking, build limited cp312 as well [[tool.cibuildwheel.overrides]]