-
Notifications
You must be signed in to change notification settings - Fork 18
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
fixes platform identification in setup.py to work correctly with M1/M2 Mac #114
Conversation
…e Silicon architecture
Hi, thanks for looking into it. Did you check whether it builds locally? I'll let the workflows run, but this will not build mac arm64 wheels. For that the .github/workflows may have to be extended to add a M1 machine. |
This correctly builds locally. MAD-X was installed locally following the instructions as here but with the following changes: Change cmake to arm64 architecturereplace
with
Set Openblas directory
Disable ASM optimisation
Build with blas/lapack linked
|
Sounds good. We can potentially also add an upstream wheel using these changes.
Of course, setting DYLD path would not be ideal in the case of an upstream wheel.
What was the reason for this? Did you experience build or runtime errors? The style check complains about line length. Can you change it like this: - IS_WIN = get_platform().startswith('win')
- IS_ARM = get_platform().startswith('linux-aarch')
+ platform = get_platform()
+ IS_WIN = platform.startswith('win')
+ IS_ARM = platform.startswith('linux-aarch') or platform.endswith('arm64') |
Apologies, this seems as though it is not necessary. |
Are you also planning to work on building an upstream wheel using the github actions, or should I merge as is? Build error on Mac might be due to py3.6 being EOLed some months ago, will have to remove that build. |
I can certainly give this a try. |
actually it probably makes sense for an upstream wheel to be a separate PR. easiest to merge now and I'll open a new one. |
line 42 in
setup.py
was:which only returns true for linux arm64 machines. After testing on a MacBook Air M2, setting
IS_ARM = True
enabled successful install. This commit enables theIS_ARM
flag to function with Apple Silicon architecture Macs (M1/M2/)