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

Fixes for running on Apple Silicon #196

Merged
merged 2 commits into from Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions cython/sharp_utils.c
@@ -1,5 +1,7 @@
#include "sharp_utils.h"
#if 0
#include <immintrin.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -35,7 +35,12 @@
sp.check_call('scripts/osx.sh', shell=True)
except sp.CalledProcessError:
raise DistutilsError('Failed to prepare Mac OS X properly. See earlier errors.')
# Try to find gcc in /usr/local/bin/ (which is where it's installed by homebrew on
# Intel) or, if that fails, /opt/homebrew/bin/ (which is where it's installed by
# homebrew on Silicon)
gccpath = glob.glob('/usr/local/bin/gcc-*')
if not gccpath:
gccpath = glob.glob('/opt/homebrew/bin/gcc-*')
if gccpath:
# Use newest gcc found
sint = lambda x: int(x) if x.isdigit() else 0
Expand Down Expand Up @@ -249,4 +254,3 @@ def run(self):
)

print('\n[setup.py request was successful.]')