Skip to content

Commit

Permalink
ENH: Set MacOS deployment target for wider compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpa committed Aug 8, 2024
1 parent 5f550b8 commit e305c2d
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
# Need to quote decimal versions as string to avoid the "Norway problem"

# Windows 64-bit
- os: windows-latest
python: '3.9'
cibw_python: 39
platform_id: win_amd64
- os: windows-latest
python: '3.10'
cibw_python: 310
Expand Down Expand Up @@ -59,42 +55,43 @@ jobs:
platform_id: manylinux_x86_64

# macOS on Intel 64-bit
- os: macos-12
python: '3.9'
cibw_python: 39
arch: x86_64
platform_id: macosx_x86_64
- os: macos-12
python: '3.10'
cibw_python: 310
arch: x86_64
macos_target: 10.14
platform_id: macosx_x86_64
- os: macos-12
python: '3.11'
cibw_python: 311
arch: x86_64
macos_target: 10.14
platform_id: macosx_x86_64
- os: macos-12
python: '3.12'
cibw_python: 312
arch: x86_64
macos_target: 10.14
platform_id: macosx_x86_64

# macOS on Apple M1 64-bit, supported for Python 3.10 and later
- os: macos-14
python: '3.10'
cibw_python: 310
arch: arm64
macos_target: 11.0
platform_id: macosx_arm64
- os: macos-14
python: '3.11'
cibw_python: 311
arch: arm64
macos_target: 11.0
platform_id: macosx_arm64
- os: macos-14
python: '3.12'
cibw_python: 312
arch: arm64
macos_target: 11.0
platform_id: macosx_arm64

steps:
Expand Down Expand Up @@ -129,11 +126,11 @@ jobs:
echo "PACKAGE_NAME=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
echo "PACKAGE_VERSION=$( python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])" )" | Out-File -FilePath $env:GITHUB_ENV ` -Append
- name: Determine macOS version
# Do this before CIBW steps
- name: Set MacOS deployment target
if: startsWith(matrix.os, 'macos-')
run: |
macos_version=$(sw_vers -productVersion | awk -F '.' '{print $1".0"}')
echo "MACOSX_DEPLOYMENT_TARGET=${macos_version}" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=${{matrix.macos_target}}" >> $GITHUB_ENV
- name: Build wheels
env:
Expand Down

0 comments on commit e305c2d

Please sign in to comment.