-
Notifications
You must be signed in to change notification settings - Fork 64
Set correct compile flags for Apple M1 chips as well as 32bit machines. #44
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
base: master
Are you sure you want to change the base?
Conversation
|
This works well for me on Mac M1. Is there a way this can be merged / released as a separate version to pypi? |
|
Hey, where this will be merged? |
|
Thanks for posting this @tmikus — made my day much easier here's a script to apply this fix in a virtualenv located at path |
|
@aboSamoor why this is still not solved? |
|
still getting an error |
|
got an error
on apple m1 arm64 |
|
You can install it using: |
|
Thanks @tmikus , your PR works fine on my M1 for utf-8 but not byte object, as you mentioned. I'm currently using polyglot that depends on this. Currently i just switch this line in order to make it work. So i wonder if you've made new findings on byte objects.... |
This PR also fixes a Segmentation Fault when calling the
detectfunction on Macs running M1 chip.The array returned from the
PyArg_ParseTupleAndKeywordswas being set to an incorrect address, which caused a segmentation fault. Surprisingly, changing the call so that it requests a null-terminated string fixes the problem.I tried using other forms of that function (
s*,y*,y#) but to no avail.I suspect this might be a problem with Python (3.9.5 for Apple Silicon).
One thing to remember is that the
detectfunction will no longer accept byte-like objects. It will still work fine with utf-8 strings.