Skip to content

Commit

Permalink
Point release to fix MacOS arm64 wheel builds (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion committed Jan 20, 2024
1 parent d743db7 commit b01dbdd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 19 deletions.
78 changes: 60 additions & 18 deletions .github/workflows/release-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,23 +131,6 @@ jobs:
python: 312
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-latest
python: 38
platform_id: macosx_arm64
- os: macos-latest
python: 39
platform_id: macosx_arm64
- os: macos-latest
python: 310
platform_id: macosx_arm64
- os: macos-latest
python: 311
platform_id: macosx_arm64
- os: macos-latest
python: 312
platform_id: macosx_arm64

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -187,9 +170,68 @@ jobs:
name: wheel-${{ matrix.python }}-${{ matrix.platform_id }}
path: ./dist

build-wheels-macos-arm64:
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# MacOS arm64
- os: macos-latest
python: 38
platform_id: macosx_arm64
- os: macos-latest
python: 39
platform_id: macosx_arm64
- os: macos-latest
python: 310
platform_id: macosx_arm64
- os: macos-latest
python: 311
platform_id: macosx_arm64
- os: macos-latest
python: 312
platform_id: macosx_arm64

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2 wheel==0.42

- name: Build wheels
env:
CIBW_BUILD: cp${{ matrix.python }}-*
CIBW_ARCHS_MACOS: arm64
CIBW_BUILD_VERBOSITY: 1
run: |
python -m cibuildwheel --output-dir dist
# Cross compiling wheels for arm64 with poetry creates wheels with wrong tag
# Update the wheel with the correct tag then remove the incorrect wheel
- name: Fix poetry mistagging
run: |
wheel tags --platform-tag macosx_12_0_arm64 ./dist/*-macosx_12_0_x86_64.whl
rm ./dist/*-macosx_12_0_x86_64.whl
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.python }}-${{ matrix.platform_id }}
path: ./dist/*.whl


test-package:
name: Test built package
needs: [ build-wheels, build-sdist ]
needs: [ build-wheels, build-sdist, build-wheels-macos-arm64 ]
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ packages = [
{ include = "libjpeg" },
]
readme = "README.md"
version = "2.0.0"
version = "2.0.1"

[tool.poetry.dependencies]
python = "^3.8"
Expand Down

0 comments on commit b01dbdd

Please sign in to comment.