Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build arm64 wheels for macOS #16

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -47,12 +47,22 @@ jobs:
choco install rtools -y --no-progress --force --version=4.0.0.20220206
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH

# Adapted from https://github.com/scipy/scipy/blob/main/tools/wheels/cibw_before_build_macos.sh
- name: Install GFortran for macOS arm64
if: runner.os == 'macOS'
run: |
curl -L https://github.com/isuruf/gcc/releases/download/gcc-11.3.0-2/gfortran-darwin-x86_64-native.tar.gz -o gfortran.tar.gz
shasum -c <(echo '981367dd0ad4335613e91bbee453d60b6669f5d7e976d18c7bdb7f1966f26ae4 gfortran.tar.gz')
sudo tar -xv -C /opt -f gfortran.tar.gz

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS_LINUX: auto aarch64
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ENVIRONMENT_MACOS: FC=gfortran-11
CIBW_ENVIRONMENT_MACOS: FC=/opt/gfortran-darwin-x86_64-native/bin/gfortran
CIBW_ARCHS_MACOS: arm64
# Skip musllinux wheels, which take a long time to build because Numpy must be built from source
# Skip PyPy wheels
# Skip 32-bit Intel wheels
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Astronomy"
]
license = { text = "NOSA" }
requires-python = ">=3.9"
requires-python = ">=3.9, <3.10"
dependencies = ["astropy", "numpy>=1.19"]
dynamic = [ "version" ]

Expand Down
Loading