Quansight-Labs / ndindex

A Python library for manipulating indices of ndarrays
https://quansight-labs.github.io/ndindex/
MIT License
97 stars 12 forks source link

ndindex 1.7 apparently introduced some glitches in wheels for Win #156

Closed FrancescAlted closed 1 year ago

FrancescAlted commented 1 year ago

Something happened in ndindex 1.7 that prevents python-blosc2 package to use it straight from PyPI for Windows. The ndindex dependency used to work well with ndindex < 1.7, but recently we started to notice that GHA was crashing on Windows.

The offending error happens when trying to import a wheel made out of ndindex 1.7:

ImportError: DLL load failed while importing ndindex: %1 is not a valid Win32 application.

Apparently, the making of the wheel goes well, but for some reason, it does not import on Win anymore.

FrancescAlted commented 1 year ago

BTW, I did a workaround by using the conda-forge package of ndindex: https://github.com/Blosc/python-blosc2/pull/106

asmeurer commented 1 year ago

I think the problem is that I forgot to build a py3-none wheel for 1.7. I need to make sure the release script does this in the future. The issue is that setup.py tries to cythonize the files when built https://quansight-labs.github.io/ndindex/#experimental-cythonization, but this is disabled for the pypi release. Apparently it doesn't work on Windows.

asmeurer commented 1 year ago

I uploaded a 1.7 wheel. If that doesn't fix the issue, it means you are building a wheel, and you should be able to fix the issue by setting CYTHONIZE_NDINDEX=0.

FrancescAlted commented 1 year ago

That did the trick. Thank you!