From 3002eaccda8dcd6076785ff2591d28946a1f3da7 Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Thu, 27 Feb 2025 13:15:17 -0500 Subject: [PATCH 1/4] Build wheels for Python 3.13 --- .github/workflows/pypi.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index a5f6fed..d93b6e4 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -33,10 +33,10 @@ jobs: uses: pypa/cibuildwheel@v2.17.0 env: CIBW_BEFORE_ALL_MACOS: "brew unlink gcc && brew link gcc" # gfortran and libs don't seem to be linked by default for some reason - CIBW_BUILD: "cp39-* cp310-* cp311-*" + CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*" # Skip extra linux cpu archs and pypy CIBW_SKIP: "*_aarch64 *_i686 *_ppc64le *_s390x pp* *universal2*" - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./wheelhouse/*.whl build_sdist: @@ -50,7 +50,7 @@ jobs: python-version: '3.10' - name: Build sdist run: pip install build && python -m build --sdist - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz upload_pypi: @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload == 'true') steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifact path: dist From 0651a6d13286ca287f3ac304ae5dd155bfeefe5e Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Thu, 27 Feb 2025 13:20:59 -0500 Subject: [PATCH 2/4] Fix artifact name conflict --- .github/workflows/pypi.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d93b6e4..cc13b81 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -38,6 +38,7 @@ jobs: CIBW_SKIP: "*_aarch64 *_i686 *_ppc64le *_s390x pp* *universal2*" - uses: actions/upload-artifact@v4 with: + name: wheels-${{ matrix.os }} path: ./wheelhouse/*.whl build_sdist: name: Build source distribution @@ -52,6 +53,7 @@ jobs: run: pip install build && python -m build --sdist - uses: actions/upload-artifact@v4 with: + name: sdist path: dist/*.tar.gz upload_pypi: needs: [build_wheels, build_sdist] @@ -60,7 +62,12 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: artifact + pattern: wheels-* + path: dist + merge-multiple: true + - uses: actions/download-artifact@v4 + with: + name: sdist path: dist - uses: pypa/gh-action-pypi-publish@release/v1 with: From da16e23a1c2881e2b43a277d5b39cb79c00529bc Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Thu, 27 Feb 2025 13:30:25 -0500 Subject: [PATCH 3/4] Update action runner versions --- .github/workflows/pypi.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index cc13b81..f1bfd7c 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -24,16 +24,16 @@ jobs: matrix: os: [macos-13, macos-14, ubuntu-20.04] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.10' - name: Build wheels - uses: pypa/cibuildwheel@v2.17.0 + uses: pypa/cibuildwheel@v2.22.0 env: CIBW_BEFORE_ALL_MACOS: "brew unlink gcc && brew link gcc" # gfortran and libs don't seem to be linked by default for some reason - CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*" + CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*" # Skip extra linux cpu archs and pypy CIBW_SKIP: "*_aarch64 *_i686 *_ppc64le *_s390x pp* *universal2*" - uses: actions/upload-artifact@v4 @@ -44,8 +44,8 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.10' From 6d91b847a49fba650de05241f762cb0deef444e8 Mon Sep 17 00:00:00 2001 From: Brett Naul Date: Thu, 27 Feb 2025 13:59:29 -0500 Subject: [PATCH 4/4] Fix MacOS deployment target --- .github/workflows/pypi.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index f1bfd7c..65ed204 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -32,10 +32,17 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 env: - CIBW_BEFORE_ALL_MACOS: "brew unlink gcc && brew link gcc" # gfortran and libs don't seem to be linked by default for some reason + CIBW_BEFORE_ALL_MACOS: "brew unlink gcc && brew link gcc" CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*" - # Skip extra linux cpu archs and pypy CIBW_SKIP: "*_aarch64 *_i686 *_ppc64le *_s390x pp* *universal2*" + # Set deployment target based on runner OS + CIBW_ENVIRONMENT_MACOS: >- + MACOSX_DEPLOYMENT_TARGET=14.0 + # Additional environment variables for better compatibility + CIBW_REPAIR_WHEEL_COMMAND_MACOS: >- + DYLD_LIBRARY_PATH=/opt/homebrew/lib delocate-wheel + --require-archs {delocate_archs} + -w {dest_dir} -v {wheel} - uses: actions/upload-artifact@v4 with: name: wheels-${{ matrix.os }}