From d40fd2cfc508ffe06b4b95c2611b476690a075f6 Mon Sep 17 00:00:00 2001 From: David de Hilster Date: Sun, 28 Jun 2026 13:46:58 -0400 Subject: [PATCH] ci: build full cp310-cp313 macOS wheels via cibuildwheel The macOS job used a bare `pip wheel .`, which built exactly one wheel for the runner's host Python (currently cp314) and bundled no ICU dylibs. So macOS users on cp310-cp313 had no wheel and fell through to the unbuildable sdist -- the same gap just fixed for Windows/Linux cp313. Switch the job to cibuildwheel@v2.23.4 (matching the other platforms), installing ICU through the vcpkg manifest with johnwason/vcpkg-action and letting cibuildwheel default delocate vendor the dylibs. Drop the cp*-macosx_arm64 skip from pyproject: macOS-latest is an arm64 runner, so that skip would otherwise leave the job with nothing to build. Verified the matrix with cibuildwheel --print-build-identifiers --platform macos --arch arm64: cp310/cp311/cp312/cp313-macosx_arm64. publish.yml runs on pull_request, so this PR CI builds the macOS wheels without publishing -- inspect that run before merging/releasing. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/publish.yml | 25 ++++++++++++++++++------- pyproject.toml | 4 +++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 07358d7..e4ed450 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,22 +49,33 @@ jobs: with: submodules: recursive + # Autotools are needed for vcpkg to build ICU from source on a cache miss. - name: Install packages run: brew install autoconf-archive autoconf automake pkg-config - - name: vcpkg setup - run: | - git clone --depth 1 https://github.com/Microsoft/vcpkg.git - ./vcpkg/bootstrap-vcpkg.sh + - name: vcpkg build + id: vcpkg + uses: johnwason/vcpkg-action@v6 + with: + manifest-dir: ${{ github.workspace }} + triplet: arm64-osx-release + token: ${{ github.token }} + github-binarycache: true + # Replaces the previous bare `pip wheel`, which only built a single wheel + # for the runner's host Python (leaving cp310-cp312 macOS users with no + # wheel) and did not bundle the ICU dylibs. cibuildwheel builds the full + # cp310-cp313 matrix and its default delocate step vendors the dylibs. - name: Build wheels - run: | - pip wheel -C "cmake.args=-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake" -v . + uses: pypa/cibuildwheel@v2.23.4 + env: + CIBW_BUILD_VERBOSITY: 3 + CIBW_CONFIG_SETTINGS: "cmake.args='-DCMAKE_BUILD_TYPE=Release;-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake'" - uses: actions/upload-artifact@v4 with: name: cibw-wheels-macos - path: ./*.whl + path: ./wheelhouse/*.whl build_wheels_windows: name: Build wheels on Windows diff --git a/pyproject.toml b/pyproject.toml index f5aa683..b34266c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,9 @@ build = [ "cp313-*", ] skip = [ - "cp*-macosx_arm64", + # macosx_arm64 is intentionally built: the macOS job runs cibuildwheel + # natively on an arm64 (Apple Silicon) runner, so skipping arm64 here + # would leave that job with nothing to build. "*_i686", "*musl*", "*-win32",