bastibe / python-soundfile

SoundFile is an audio library based on libsndfile, CFFI, and NumPy
BSD 3-Clause "New" or "Revised" License
718 stars 111 forks source link

Update build_wheels.py for aarch64 support #441

Open esnvidia opened 3 months ago

esnvidia commented 3 months ago

The attached file here fixes an issue using HuggingFace datasets requiring soundfile on aarch64.

I compiled on this branch (bastibe/aarchh64-build) using linux_build.sh on Grace Hopper, which requires aarch64. This generated libsndfile.so which I renamed to libsndfile_aarch64.so to match the others

Then, in this line I added 'aarch64' and built the whl as suggested python setup.py bdist_wheel followed by installing the whl with pip install dist/soundfile-0.12.1-py2.py3-none-manylinux_2_17_aarch64.whl

This file should just be added to the repo along with the others.

esnvidia commented 3 months ago

See also: https://github.com/bastibe/libsndfile-binaries/pull/35

bastibe commented 3 months ago

This needs to be added to python-package.yml as well, in order to compile.

esnvidia commented 3 months ago

Updated python-package.yml

bastibe commented 2 months ago

This does not seem to work in the CI.

esnvidia commented 2 months ago

I learned that apparently aarch64 with armv9 is not supported and armv8 is in beta for the CI pipeline.

bastibe commented 2 months ago

I see. Thank you for the analysis. Do you know the timeline of these changes? Should we just wait for aarch64 to become available, or do we need a different workaround?

esnvidia commented 2 months ago

No, not aware of the timeline for these changes to be implemented in Github CI runner. Perhaps a workaround would be to build from source of the os.platform() is aarch64?

bastibe commented 1 month ago

If you need this feature, please update the merge request accordingly. Otherwise, I'll close it.