-
Notifications
You must be signed in to change notification settings - Fork 6
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
import deflate
fails immediately on MacOS
#42
Comments
FYI, Do you have any CPython code in the library? If not, you should make a generic wheel, not a CPython specific one, that will work on all Pythons and won't require rereleasing every time there's a new CPython release. |
Also, I notice there's a CMakeLists in the library you are wrapping, I'd highly recommend looking at scikit-build-core. |
Yikes, thanks for the report. And thanks for the tips @henryiii. I do have C code wrapping libdeflate, so I don't think a generic wheel is an option? I'm also not terribly keen on learning (and keeping up with) a new build system at the moment. I will have a look at getting this fixed ASAP though. |
Ahh, yes. Though might be worth checking the Stable ABI out. |
Splitting the macos runners for cibuildwheel seems to do the trick. At least installing the wheel it built on my M3 doesn't fail 😄 I yanked 0.6.0 and uploaded 0.6.1 to PyPI - please let me know if you have any more trouble with it. And thanks again to both of you. |
FYI, this was the bug: Line 44 in 87272e9
That's going to get the wrong file when cross compiling. |
FYI, I played with the stable ABI (using #43 as a base, since I know how to do that), and it looks like PyBuffer is used, which requires Python 3.11 as the lowest Stable ABI version (fine), but then I hit |
Thanks for the quick fix! I've reverted Uproot to include it in all tests (scikit-hep/uproot5#1206). |
@henryiii I use |
It looks like it's still not working for Python 3.8 (only):
This test has deflate 0.6.1 installed:
|
Python 3.8 is tricky, as it just barely supported ARM. In cibuildwheel, we use the Intel version due to the final and only Universal release not being compiled in a compatible manor. But I think that's causing the code linked above to be incorrect. Scikit-build-core would have handled this correctly, by the way - the issues is due to hacking this into setuptools. :) |
You can check FYI, it's actually correct to include x86 & arm sources always, they are protected internally. That's what the upstream library does: https://github.com/ebiggers/libdeflate/blob/275aa5141db6eda3587214e0f1d3a134768f557d/CMakeLists.txt#L99-L106 FYI, cibuildwheel can't test 3.8 wheels on AS due to using a Python binary that doesn't support Apple Silicon, so it can't catch issues with 3.8. |
I just pushed out 0.7.0, built with scikit-build-core. Thanks again for the report and the help 🎉 |
I know this was pulled, but:
That's not correct. If you set |
I first noticed this in CI:
(perhaps because GitHub just upgraded to ARM/M1/M2 Macs), but I also see it on a (M2) Mac laptop:
This is deflate 0.6.0, freshly installed from PyPI.
My version of libdeflate is 1.17, installed through conda. (Overall, it's a conda environment, with deflate being the only package installed by pip within that environment.)
The text was updated successfully, but these errors were encountered: