From 6b22a0fc0399e6c453c805768ac91e823ab040e4 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Wed, 23 Oct 2024 14:32:20 -0400 Subject: [PATCH 1/3] ci: Update macos version used for release builds macos-12 is leaving support soon; macos-15 is currently the latest version. See https://github.com/actions/runner-images/issues/10721 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d58a5075..9e0a23ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, windows-2022, macos-12] + os: [ubuntu-22.04, windows-2022, macos-15] steps: - uses: actions/checkout@v4 From fbbf1268c753e8282cea708caceead9ab72b60ba Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Wed, 23 Oct 2024 14:20:16 -0400 Subject: [PATCH 2/3] ci: Run abi3audit on built wheels --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e0a23ed..680bc2c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,11 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.18 + - name: Audit ABI3 compliance + # This may be moved into cibuildwheel itself in the future. See + # https://github.com/pypa/cibuildwheel/issues/1342 + run: "pip install abi3audit && abi3audit --verbose --summary ./wheelhouse/*.whl" + - uses: actions/upload-artifact@v4 with: name: artifacts-${{ matrix.os }} From b690f4c36c34273353afd4a90e7a488fe5d2b98a Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Thu, 24 Oct 2024 09:33:13 -0400 Subject: [PATCH 3/3] setup: Remove override of bdist_wheel This is no longer necessary in recent versions of setuptools (and we now check that abi3 is used properly in official releases). The bdist_wheel implementation is being moved from the wheel package into setuptools so overriding it will stop working in the future. Follows the example of https://github.com/joerick/python-abi3-package-sample/pull/30 Replaces #3425 --- setup.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/setup.py b/setup.py index 14ddc3f2..0b175af8 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,6 @@ import os import platform import setuptools -try: - import wheel.bdist_wheel -except ImportError: - wheel = None - kwargs = {} @@ -56,17 +51,7 @@ if ( ) ] -if wheel is not None: - # From https://github.com/joerick/python-abi3-package-sample/blob/main/setup.py - class bdist_wheel_abi3(wheel.bdist_wheel.bdist_wheel): - def get_tag(self): - python, abi, plat = super().get_tag() - - if python.startswith("cp"): - return "cp39", "abi3", plat - return python, abi, plat - - kwargs["cmdclass"] = {"bdist_wheel": bdist_wheel_abi3} + kwargs["options"] = {"bdist_wheel": {"py_limited_api": "cp39"}} setuptools.setup(