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

Add ARM MacOS support for Python Bindings #351

Merged
merged 11 commits into from
Jul 25, 2024

Conversation

Creelman
Copy link
Contributor

@Creelman Creelman commented Jul 17, 2024

Main Changes

Updates the Python direct interface .cargo/config template file to work with ARM-based Macs.

Fix based on PyO3 docs here

Associated Issues

TODOs

  • Documentation
  • All tests must pass
  • Update CHANGELOG(s)
  • Update webpage documentation
  • Bump versions (in CHANGELOG, Cargo.toml and VERSION)

Other

Tested on M2 Max Macbook Pro

@Creelman
Copy link
Contributor Author

Creelman commented Jul 18, 2024

@alphaville AFAICT that MacOS job will never run - as part of this PR will I update the CI definition to use macos-latest? If it's preferable to stick to a constant version, macos-14 is the latest version

Looks like macos-11 runner got deactivated in June. I'm surprised it doesn't give a proper error, seems to match the behaviour described here when Ubuntu got updated a while back.

@alphaville
Copy link
Owner

@alphaville AFAICT that MacOS job will never run - as part of this PR will I update the CI definition to use macos-latest? If it's preferable to stick to a constant version, macos-14 is the latest version

Looks like macos-11 runner got deactivated in June. I'm surprised it doesn't give a proper error, seems to match the behaviour described here when Ubuntu got updated a while back.

@Creelman yes, I realised and created an issue (see #352). Can you please change it to macos-latest?

@Creelman
Copy link
Contributor Author

Should be ready to try a build again

@Creelman
Copy link
Contributor Author

Had to make a few more changes to support the new MacOS runner

  • Updated Python to version 3.12. Required because actions/setup-python does not support versions of Python <3.11 on Darwin Macs (macos-latest runs on Darwin M1 processors). I picked 3.12 as it's the latest version, and has been stable for 8 months now.
  • I updated the Python version for all of the CI workflows for consistency, including the docs and Ubuntu runners.
  • Updated actions/setup-python from v2 to v5 (latest) to support this
  • Updated the CI script to use the new Python version, and manually install setuptools to fix an issue where pkg_resources could not be found

IIUC the documentation failure is because I'm testing in a fork, and should succeed on a rerun of the CI pipeline here.

Apologies for adding quite a few commits for a relatively small change - I couldn't replicate the issue locally.

@alphaville
Copy link
Owner

@Creelman many thanks for all the good work! I'll merge this now and I'll create a new version afterwards.

@alphaville alphaville self-requested a review July 25, 2024 13:19
@alphaville alphaville merged commit 770c905 into alphaville:master Jul 25, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade macos-11 to macos-12 in GA Python direct interface fails on ARM-based MacOS platforms
2 participants