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

Add linux arm64 to build_wheels.py #382

Closed
wants to merge 1 commit into from

Conversation

imWildCat
Copy link

#381

I found it would be very straightforward to add arm64 support for linux because we already have prebuilt binary for it.

@bastibe
Copy link
Owner

bastibe commented Apr 8, 2023

This has been on my todo list for a while, actually, but life has been busy recently, so I didn't yet get around to it.

Can you verify that the resulting wheel works on arm64 linux?

@imWildCat
Copy link
Author

Thanks for asking.

I checked the wheel content:

~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:24:28
$ ll soundfile-0.12.1/_soundfile_data
total 3.4M
-rw-rw-r-- 1 ubuntu ubuntu  26K Apr  8 17:24 COPYING
-rw-rw-r-- 1 ubuntu ubuntu  125 Apr  8 17:24 __init__.py
-rw-rw-r-- 1 ubuntu ubuntu 3.4M Apr  8 17:24 libsndfile_x86_64.so
(venv)
~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:24:30
$ rm -rf soundfile-0.12.1
(venv)
~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:24:32
$ wheel unpack soundfile-0.12.1-py2.py3-none-manylinux_2_17_arm64.whl
Unpacking to: soundfile-0.12.1...OK
(venv)
~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:24:35
$ ll soundfile-0.12.1/_soundfile_data
total 692K
-rw-rw-r-- 1 ubuntu ubuntu  26K Apr  8 17:24 COPYING
-rw-rw-r-- 1 ubuntu ubuntu  125 Apr  8 17:24 __init__.py
-rw-rw-r-- 1 ubuntu ubuntu 660K Apr  8 17:24 libsndfile_arm64.so
(venv)
~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:24:37
$ ll .
total 5.5M
drwxrwxr-x 4 ubuntu ubuntu 4.0K Apr  8 17:24 soundfile-0.12.1
-rw-rw-r-- 1 ubuntu ubuntu  24K Apr  8 17:22 soundfile-0.12.1-py2.py3-none-any.whl
-rw-rw-r-- 1 ubuntu ubuntu 1.2M Apr  8 17:22 soundfile-0.12.1-py2.py3-none-macosx_10_9_x86_64.whl
-rw-rw-r-- 1 ubuntu ubuntu 1.1M Apr  8 17:22 soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl
-rw-rw-r-- 1 ubuntu ubuntu 219K Apr  8 17:22 soundfile-0.12.1-py2.py3-none-manylinux_2_17_arm64.whl
-rw-rw-r-- 1 ubuntu ubuntu 1.2M Apr  8 17:22 soundfile-0.12.1-py2.py3-none-manylinux_2_17_x86_64.whl
-rw-rw-r-- 1 ubuntu ubuntu 868K Apr  8 17:22 soundfile-0.12.1-py2.py3-none-win32.whl
-rw-rw-r-- 1 ubuntu ubuntu 986K Apr  8 17:22 soundfile-0.12.1-py2.py

To my surprise, its size is quite small compared with the amd64 binary:

https://github.com/bastibe/libsndfile-binaries/blob/f1655ba375f306c4b3b179e1fb603d71b50ce179/libsndfile_arm64.so

I think we need to change the arm64 tag to aarch64:

~/demo-soundfile/python-soundfile/dist on  add-linux-arm64! ⌚ 17:35:14
$ pip install soundfile-0.12.1-py2.py3-none-manylinux_2_17_arm64.whl
ERROR: soundfile-0.12.1-py2.py3-none-manylinux_2_17_arm64.whl is not a supported wheel on this platform. python: [<cp310-cp310-manylinux_2_31_aarch64 @ 281472805414400>, <cp310-cp310-manylinux_2_30_aarch64 @ 281472778991680>, <cp310-cp310-manylinux_2_29_aarch64 @ 281472778991936>, <cp310-cp310-manylinux_2_28_aarch64 @ 281472778988992>, <cp310-cp310-manylinux_2_27_aarch64 @ 281472778993344>, <cp310-cp310-manylinux_2_26_aarch64 @ 281472778837760>, <cp310-cp310-manylinux_2_25_aarch64 @ 281472778837376>, <cp310-cp310-manylinux_2_24_aarch64 @ 281472778831232>, <cp310-cp310-manylinux_2_23_aarch64 @ 281472778843136>, <cp310-cp310-manylinux_2_22_aarch64 @ 281472802683008>, <cp310-cp310-manylinux_2_21_aarch64 @ 281472778837568>, <cp310-cp310-manylinux_2_20_aarch64 @ 281472778833216>, <cp310-cp310-manylinux_2_19_aarch64 @ 281472778839552>, <cp310-cp310-manylinux_2_18_aarch64 @ 281472778834240>, <cp310-cp310-manylinux_2_17_aarch64 @ 281472778833088>, <cp310-cp310-manylinux2014_aarch64 @ 281472778832384>, <cp310-cp310-linux_aarch64 @ 281472778843264>, <cp310-abi3-manylinux_2_31_aarch64 @ 281472778844160>, <cp310-abi3-manylinux_2_30_aarch64 @ 281472778840704>, <cp310-abi3-manylinux_2_29_aarch64 @ 281472778835712>, <cp310-abi3-manylinux_2_28_aarch64 @ 281472778835584>, <cp310-abi3-manylinux_2_27_aarch64 @ 281472778841536>, <cp310-abi3-manylinux_2_26_aarch64 @ 281472778843328>, <cp310-abi3-manylinux_2_25_aarch64 @ 281472778844352>, <cp310-abi3-manylinux_2_24_aarch64 @ 281472778839808>, <cp310-abi3-manylinux_2_23_aarch64 @ 281472778844672>, <cp310-abi3-manylinux_2_22_aarch64 @ 281472778835392>, <cp310-abi3-manylinux_2_21_aarch64 @ 281472778841024>, <cp310-abi3-manylinux_2_20_aarch64 @ 281472778841408>, <cp310-abi3-manylinux_2_19_aarch64 @ 281472778830976>, <cp310-abi3-manylinux_2_18_aarch64 @ 281472778840128>, <cp310-abi3-manylinux_2_17_aarch64 @ 281472778841600>, <cp310-abi3-manylinux2014_aarch64 @ 281472778845120>, <cp310-abi3-linux_aarch64 @ 281472778834496>, <cp310-none-manylinux_2_31_aarch64 @ 281472778841984>, <cp310-none-manylinux_2_30_aarch64 @ 281472778844608>, <cp310-none-manylinux_2_29_aarch64 @ 281472778838080>, <cp310-none-manylinux_2_28_aarch64 @ 281472778843072>, <cp310-none-manylinux_2_27_aarch64 @ 281472778842496>, <cp310-none-manylinux_2_26_aarch64 @ 281472778836288>, <cp310-none-manylinux_2_25_aarch64 @ 281472778846144>, <cp310-none-manylinux_2_24_aarch64 @ 281472778830464>, <cp310-none-manylinux_2_23_aarch64 @ 281472778845248>, <cp310-none-manylinux_2_22_aarch64 @ 281472778845376>, <cp310-none-manylinux_2_21_aarch64 @ 281472778838848>, <cp310-none-manylinux_2_20_aarch64 @ 281472778834368>, <cp310-none-manylinux_2_19_aarch64 @ 281472778834304>, <cp310-none-manylinux_2_18_aarch64 @ 281472778836416>, <cp310-none-manylinux_2_17_aarch64 @ 281472778832192>, <cp310-none-manylinux2014_aarch64 @ 281472778838784>, <cp310-none-linux_aarch64 @ 281472778830848>, <cp39-abi3-manylinux_2_31_aarch64 @ 281472778993600>, <cp39-abi3-manylinux_2_30_aarch64 @ 281472778837248>, <cp39-abi3-manylinux_2_29_aarch64 @ 281472778838400>, <cp39-abi3-manylinux_2_28_aarch64 @ 281472778838720>, <cp39-abi3-manylinux_2_27_aarch64 @ 281472778832320>, <cp39-abi3-manylinux_2_26_aarch64 @ 281472778845056>, <cp39-abi3-manylinux_2_25_aarch64 @ 281472778838144>, <cp39-abi3-manylinux_2_24_aarch64 @ 281472778877440>, <cp39-abi3-manylinux_2_23_aarch64 @ 281472778878720>, <cp39-abi3-manylinux_2_22_aarch64 @ 281472778868352>, <cp39-abi3-manylinux_2_21_aarch64 @ 281472778868224>, <cp39-abi3-manylinux_2_20_aarch64 @ 281472778868480>, <cp39-abi3-manylinux_2_19_aarch64 @ 281472778868864>, <cp39-abi3-manylinux_2_18_aarch64 @ 281472778869376>, <cp39-abi3-manylinux_2_17_aarch64 @ 281472778873728>, <cp39-abi3-manylinux2014_aarch64 @ 281472778869760>, <cp39-abi3-linux_aarch64 @ 281472778865472>, <cp38-abi3-manylinux_2_31_aarch64 @ 281472778872640>, <cp38-abi3-manylinux_2_30_aarch64 @ 281472778871488>, <cp38-abi3-manylinux_2_29_aarch64 @ 281472778864192>, <cp38-abi3-manylinux_2_28_aarch64 @ 281472778862976>, <cp38-abi3-manylinux_2_27_aarch64 @ 281472778874304>, <cp38-abi3-manylinux_2_26_aarch64 @ 281472778876352>, <cp38-abi3-manylinux_2_25_aarch64 @ 281472778875712>, <cp38-abi3-manylinux_2_24_aarch64 @ 281472778876928>, <cp38-abi3-manylinux_2_23_aarch64 @ 281472778877504>, <cp38-abi3-manylinux_2_22_aarch64 @ 281472778878272>, <cp38-abi3-manylinux_2_21_aarch64 @ 281472778876416>, <cp38-abi3-manylinux_2_20_aarch64 @ 281472778878656>, <cp38-abi3-manylinux_2_19_aarch64 @ 281472778869184>, <cp38-abi3-manylinux_2_18_aarch64 @ 281472778864000>, <cp38-abi3-manylinux_2_17_aarch64 @ 281472778872576>, <cp38-abi3-manylinux2014_aarch64 @ 281472778874560>, <cp38-abi3-linux_aarch64 @ 281472778869632>, <cp37-abi3-manylinux_2_31_aarch64 @ 281472778865856>, <cp37-abi3-manylinux_2_30_aarch64 @ 281472778866176>, <cp37-abi3-manylinux_2_29_aarch64 @ 281472778867648>, <cp37-abi3-manylinux_2_28_aarch64 @ 281472778868096>, <cp37-abi3-manylinux_2_27_aarch64 @ 281472778862848>, <cp37-abi3-manylinux_2_26_aarch64 @ 281472778872960>, <cp37-abi3-manylinux_2_25_aarch64 @ 281472778873472>, <cp37-abi3-manylinux_2_24_aarch64 @ 281472778870656>, <cp37-abi3-manylinux_2_23_aarch64 @ 281472778870016>, <cp37-abi3-manylinux_2_22_aarch64 @ 281472778871808>, <cp37-abi3-manylinux_2_21_aarch64 @ 281472778867200>, <cp37-abi3-manylinux_2_20_aarch64 @ 281472778872384>, <cp37-abi3-manylinux_2_19_aarch64 @ 281472778863168>, <cp37-abi3-manylinux_2_18_aarch64 @ 281472778875200>, <cp37-abi3-manylinux_2_17_aarch64 @ 281472778875264>, <cp37-abi3-manylinux2014_aarch64 @ 281472778875840>, <cp37-abi3-linux_aarch64 @ 281472778872256>, <cp36-abi3-manylinux_2_31_aarch64 @ 281472778864896>, <cp36-abi3-manylinux_2_30_aarch64 @ 281472778673792>, <cp36-abi3-manylinux_2_29_aarch64 @ 281472778672576>, <cp36-abi3-manylinux_2_28_aarch64 @ 281472778669824>, <cp36-abi3-manylinux_2_27_aarch64 @ 281472778677120>, <cp36-abi3-manylinux_2_26_aarch64 @ 281472778666816>, <cp36-abi3-manylinux_2_25_aarch64 @ 281472778672384>, <cp36-abi3-manylinux_2_24_aarch64 @ 281472778674752>, <cp36-abi3-manylinux_2_23_aarch64 @ 281472778676416>, <cp36-abi3-manylinux_2_22_aarch64 @ 281472778672832>, <cp36-abi3-manylinux_2_21_aarch64 @ 281472778678976>, <cp36-abi3-manylinux_2_20_aarch64 @ 281472778669952>, <cp36-abi3-manylinux_2_19_aarch64 @ 281472778682176>, <cp36-abi3-manylinux_2_18_aarch64 @ 281472778681856>, <cp36-abi3-manylinux_2_17_aarch64 @ 281472778670848>, <cp36-abi3-manylinux2014_aarch64 @ 281472778675520>, <cp36-abi3-linux_aarch64 @ 281472778668224>, <cp35-abi3-manylinux_2_31_aarch64 @ 281472778674816>, <cp35-abi3-manylinux_2_30_aarch64 @ 281472778671296>, <cp35-abi3-manylinux_2_29_aarch64 @ 281472778675072>, <cp35-abi3-manylinux_2_28_aarch64 @ 281472778674368>, <cp35-abi3-manylinux_2_27_aarch64 @ 281472778667712>, <cp35-abi3-manylinux_2_26_aarch64 @ 281472778667584>, <cp35-abi3-manylinux_2_25_aarch64 @ 281472778668352>, <cp35-abi3-manylinux_2_24_aarch64 @ 281472778678464>, <cp35-abi3-manylinux_2_23_aarch64 @ 281472778668160>, <cp35-abi3-manylinux_2_22_aarch64 @ 281472778666368>, <cp35-abi3-manylinux_2_21_aarch64 @ 281472778676480>, <cp35-abi3-manylinux_2_20_aarch64 @ 281472778666752>, <cp35-abi3-manylinux_2_19_aarch64 @ 281472778666240>, <cp35-abi3-manylinux_2_18_aarch64 @ 281472778666304>, <cp35-abi3-manylinux_2_17_aarch64 @ 281472778669376>, <cp35-abi3-manylinux2014_aarch64 @ 281472778679488>, <cp35-abi3-linux_aarch64 @ 281472778679616>, <cp34-abi3-manylinux_2_31_aarch64 @ 281472778680000>, <cp34-abi3-manylinux_2_30_aarch64 @ 281472778679744>, <cp34-abi3-manylinux_2_29_aarch64 @ 281472778674304>, <cp34-abi3-manylinux_2_28_aarch64 @ 281472778666944>, <cp34-abi3-manylinux_2_27_aarch64 @ 281472778678848>, <cp34-abi3-manylinux_2_26_aarch64 @ 281472778671104>, <cp34-abi3-manylinux_2_25_aarch64 @ 281472778672128>, <cp34-abi3-manylinux_2_24_aarch64 @ 281472778676608>, <cp34-abi3-manylinux_2_23_aarch64 @ 281472778671936>, <cp34-abi3-manylinux_2_22_aarch64 @ 281472778673408>, <cp34-abi3-manylinux_2_21_aarch64 @ 281472778676544>, <cp34-abi3-manylinux_2_20_aarch64 @ 281472778681664>, <cp34-abi3-manylinux_2_19_aarch64 @ 281472778679872>, <cp34-abi3-manylinux_2_18_aarch64 @ 281472778673344>, <cp34-abi3-manylinux_2_17_aarch64 @ 281472778671616>, <cp34-abi3-manylinux2014_aarch64 @ 281472778679936>, <cp34-abi3-linux_aarch64 @ 281472778675712>, <cp33-abi3-manylinux_2_31_aarch64 @ 281472777064640>, <cp33-abi3-manylinux_2_30_aarch64 @ 281472777064896>, <cp33-abi3-manylinux_2_29_aarch64 @ 281472777063552>, <cp33-abi3-manylinux_2_28_aarch64 @ 281472777064256>, <cp33-abi3-manylinux_2_27_aarch64 @ 281472777060992>, <cp33-abi3-manylinux_2_26_aarch64 @ 281472777067072>, <cp33-abi3-manylinux_2_25_aarch64 @ 281472777066944>, <cp33-abi3-manylinux_2_24_aarch64 @ 281472777068096>, <cp33-abi3-manylinux_2_23_aarch64 @ 281472777066496>, <cp33-abi3-manylinux_2_22_aarch64 @ 281472777075904>, <cp33-abi3-manylinux_2_21_aarch64 @ 281472777076096>, <cp33-abi3-manylinux_2_20_aarch64 @ 281472777076480>, <cp33-abi3-manylinux_2_19_aarch64 @ 281472777068928>, <cp33-abi3-manylinux_2_18_aarch64 @ 281472777068352>, <cp33-abi3-manylinux_2_17_aarch64 @ 281472777069632>, <cp33-abi3-manylinux2014_aarch64 @ 281472777067840>, <cp33-abi3-linux_aarch64 @ 281472777066240>, <cp32-abi3-manylinux_2_31_aarch64 @ 281472777066432>, <cp32-abi3-manylinux_2_30_aarch64 @ 281472777076544>, <cp32-abi3-manylinux_2_29_aarch64 @ 281472777066880>, <cp32-abi3-manylinux_2_28_aarch64 @ 281472777066560>, <cp32-abi3-manylinux_2_27_aarch64 @ 281472777067520>, <cp32-abi3-manylinux_2_26_aarch64 @ 281472777069248>, <cp32-abi3-manylinux_2_25_aarch64 @ 281472777070144>, <cp32-abi3-manylinux_2_24_aarch64 @ 281472777069184>, <cp32-abi3-manylinux_2_23_aarch64 @ 281472777070528>, <cp32-abi3-manylinux_2_22_aarch64 @ 281472777072384>, <cp32-abi3-manylinux_2_21_aarch64 @ 281472777073792>, <cp32-abi3-manylinux_2_20_aarch64 @ 281472777073984>, <cp32-abi3-manylinux_2_19_aarch64 @ 281472777073728>, <cp32-abi3-manylinux_2_18_aarch64 @ 281472777074368>, <cp32-abi3-manylinux_2_17_aarch64 @ 281472777074240>, <cp32-abi3-manylinux2014_aarch64 @ 281472777074688>, <cp32-abi3-linux_aarch64 @ 281472777074624>, <py310-none-manylinux_2_31_aarch64 @ 281472777074432>, <py310-none-manylinux_2_30_aarch64 @ 281472777065536>, <py310-none-manylinux_2_29_aarch64 @ 281472777075776>, <py310-none-manylinux_2_28_aarch64 @ 281472777062720>, <py310-none-manylinux_2_27_aarch64 @ 281472777063744>, <py310-none-manylinux_2_26_aarch64 @ 281472777065920>, <py310-none-manylinux_2_25_aarch64 @ 281472777063168>, <py310-none-manylinux_2_24_aarch64 @ 281472777072576>, <py310-none-manylinux_2_23_aarch64 @ 281472777068544>, <py310-none-manylinux_2_22_aarch64 @ 281472777067968>, <py310-none-manylinux_2_21_aarch64 @ 281472777068992>, <py310-none-manylinux_2_20_aarch64 @ 281472777064000>, <py310-none-manylinux_2_19_aarch64 @ 281472777063872>, <py310-none-manylinux_2_18_aarch64 @ 281472777062208>, <py310-none-manylinux_2_17_aarch64 @ 281472777063360>, <py310-none-manylinux2014_aarch64 @ 281472777072704>, <py310-none-linux_aarch64 @ 281472777071744>, <py3-none-manylinux_2_31_aarch64 @ 281472778988480>, <py3-none-manylinux_2_30_aarch64 @ 281472777070656>, <py3-none-manylinux_2_29_aarch64 @ 281472777070336>, <py3-none-manylinux_2_28_aarch64 @ 281472777071296>, <py3-none-manylinux_2_27_aarch64 @ 281472777071040>, <py3-none-manylinux_2_26_aarch64 @ 281472777071616>, <py3-none-manylinux_2_25_aarch64 @ 281472777062080>, <py3-none-manylinux_2_24_aarch64 @ 281472777062336>, <py3-none-manylinux_2_23_aarch64 @ 281472777061696>, <py3-none-manylinux_2_22_aarch64 @ 281472777060672>, <py3-none-manylinux_2_21_aarch64 @ 281472777076608>, <py3-none-manylinux_2_20_aarch64 @ 281472777070848>, <py3-none-manylinux_2_19_aarch64 @ 281472777072064>, <py3-none-manylinux_2_18_aarch64 @ 281472777072320>, <py3-none-manylinux_2_17_aarch64 @ 281472777069888>, <py3-none-manylinux2014_aarch64 @ 281472779035392>, <py3-none-linux_aarch64 @ 281472779029568>, <py39-none-manylinux_2_31_aarch64 @ 281472777070720>, <py39-none-manylinux_2_30_aarch64 @ 281472779042368>, <py39-none-manylinux_2_29_aarch64 @ 281472779039936>, <py39-none-manylinux_2_28_aarch64 @ 281472779027968>, <py39-none-manylinux_2_27_aarch64 @ 281472779027776>, <py39-none-manylinux_2_26_aarch64 @ 281472779038144>, <py39-none-manylinux_2_25_aarch64 @ 281472779034688>, <py39-none-manylinux_2_24_aarch64 @ 281472779038016>, <py39-none-manylinux_2_23_aarch64 @ 281472779040704>, <py39-none-manylinux_2_22_aarch64 @ 281472779036224>, <py39-none-manylinux_2_21_aarch64 @ 281472779041792>, <py39-none-manylinux_2_20_aarch64 @ 281472779029120>, <py39-none-manylinux_2_19_aarch64 @ 281472779028096>, <py39-none-manylinux_2_18_aarch64 @ 281472779028864>, <py39-none-manylinux_2_17_aarch64 @ 281472779042240>, <py39-none-manylinux2014_aarch64 @ 281472779033664>, <py39-none-linux_aarch64 @ 281472779032000>, <py38-none-manylinux_2_31_aarch64 @ 281472779029760>, <py38-none-manylinux_2_30_aarch64 @ 281472779037312>, <py38-none-manylinux_2_29_aarch64 @ 281472779035968>, <py38-none-manylinux_2_28_aarch64 @ 281472779034816>, <py38-none-manylinux_2_27_aarch64 @ 281472779042176>, <py38-none-manylinux_2_26_aarch64 @ 281472779036992>, <py38-none-manylinux_2_25_aarch64 @ 281472779038400>, <py38-none-manylinux_2_24_aarch64 @ 281472779028992>, <py38-none-manylinux_2_23_aarch64 @ 281472779039872>, <py38-none-manylinux_2_22_aarch64 @ 281472779031872>, <py38-none-manylinux_2_21_aarch64 @ 281472779030016>, <py38-none-manylinux_2_20_aarch64 @ 281472779030784>, <py38-none-manylinux_2_19_aarch64 @ 281472779040768>, <py38-none-manylinux_2_18_aarch64 @ 281472779037568>, <py38-none-manylinux_2_17_aarch64 @ 281472779036800>, <py38-none-manylinux2014_aarch64 @ 281472779038720>, <py38-none-linux_aarch64 @ 281472779036544>, <py37-none-manylinux_2_31_aarch64 @ 281472779041856>, <py37-none-manylinux_2_30_aarch64 @ 281472779031808>, <py37-none-manylinux_2_29_aarch64 @ 281472779032704>, <py37-none-manylinux_2_28_aarch64 @ 281472779026496>, <py37-none-manylinux_2_27_aarch64 @ 281472779030592>, <py37-none-manylinux_2_26_aarch64 @ 281472779031360>, <py37-none-manylinux_2_25_aarch64 @ 281472779033728>, <py37-none-manylinux_2_24_aarch64 @ 281472779034176>, <py37-none-manylinux_2_23_aarch64 @ 281472779039488>, <py37-none-manylinux_2_22_aarch64 @ 281472779034304>, <py37-none-manylinux_2_21_aarch64 @ 281472779031296>, <py37-none-manylinux_2_20_aarch64 @ 281472779031616>, <py37-none-manylinux_2_19_aarch64 @ 281472779032064>, <py37-none-manylinux_2_18_aarch64 @ 281472779074880>, <py37-none-manylinux_2_17_aarch64 @ 281472779065408>, <py37-none-manylinux2014_aarch64 @ 281472779072576>, <py37-none-linux_aarch64 @ 281472779073728>, <py36-none-manylinux_2_31_aarch64 @ 281472779033600>, <py36-none-manylinux_2_30_aarch64 @ 281472779068928>, <py36-none-manylinux_2_29_aarch64 @ 281472779071744>, <py36-none-manylinux_2_28_aarch64 @ 281472779073664>, <py36-none-manylinux_2_27_aarch64 @ 281472779069888>, <py36-none-manylinux_2_26_aarch64 @ 281472779072128>, <py36-none-manylinux_2_25_aarch64 @ 281472779062464>, <py36-none-manylinux_2_24_aarch64 @ 281472779060736>, <py36-none-manylinux_2_23_aarch64 @ 281472779066112>, <py36-none-manylinux_2_22_aarch64 @ 281472779067136>, <py36-none-manylinux_2_21_aarch64 @ 281472779066944>, <py36-none-manylinux_2_20_aarch64 @ 281472779061760>, <py36-none-manylinux_2_19_aarch64 @ 281472779061824>, <py36-none-manylinux_2_18_aarch64 @ 281472779068608>, <py36-none-manylinux_2_17_aarch64 @ 281472779068992>, <py36-none-manylinux2014_aarch64 @ 281472779060608>, <py36-none-linux_aarch64 @ 281472779064320>, <py35-none-manylinux_2_31_aarch64 @ 281472779072640>, <py35-none-manylinux_2_30_aarch64 @ 281472779066816>, <py35-none-manylinux_2_29_aarch64 @ 281472779063744>, <py35-none-manylinux_2_28_aarch64 @ 281472779074368>, <py35-none-manylinux_2_27_aarch64 @ 281472779059328>, <py35-none-manylinux_2_26_aarch64 @ 281472779066240>, <py35-none-manylinux_2_25_aarch64 @ 281472779074752>, <py35-none-manylinux_2_24_aarch64 @ 281472779074496>, <py35-none-manylinux_2_23_aarch64 @ 281472779069824>, <py35-none-manylinux_2_22_aarch64 @ 281472779071104>, <py35-none-manylinux_2_21_aarch64 @ 281472779070784>, <py35-none-manylinux_2_20_aarch64 @ 281472779067968>, <py35-none-manylinux_2_19_aarch64 @ 281472779063552>, <py35-none-manylinux_2_18_aarch64 @ 281472779072000>, <py35-none-manylinux_2_17_aarch64 @ 281472779065280>, <py35-none-manylinux2014_aarch64 @ 281472779063680>, <py35-none-linux_aarch64 @ 281472779061056>, <py34-none-manylinux_2_31_aarch64 @ 281472779063104>, <py34-none-manylinux_2_30_aarch64 @ 281472779075072>, <py34-none-manylinux_2_29_aarch64 @ 281472779059520>, <py34-none-manylinux_2_28_aarch64 @ 281472779073536>, <py34-none-manylinux_2_27_aarch64 @ 281472779060288>, <py34-none-manylinux_2_26_aarch64 @ 281472779074688>, <py34-none-manylinux_2_25_aarch64 @ 281472779075328>, <py34-none-manylinux_2_24_aarch64 @ 281472779067840>, <py34-none-manylinux_2_23_aarch64 @ 281472779062144>, <py34-none-manylinux_2_22_aarch64 @ 281472779065024>, <py34-none-manylinux_2_21_aarch64 @ 281472777008896>, <py34-none-manylinux_2_20_aarch64 @ 281472777005568>, <py34-none-manylinux_2_19_aarch64 @ 281472776996544>, <py34-none-manylinux_2_18_aarch64 @ 281472777005824>, <py34-none-manylinux_2_17_aarch64 @ 281472777006464>, <py34-none-manylinux2014_aarch64 @ 281472777009664>, <py34-none-linux_aarch64 @ 281472776999808>, <py33-none-manylinux_2_31_aarch64 @ 281472779073024>, <py33-none-manylinux_2_30_aarch64 @ 281472776999168>, <py33-none-manylinux_2_29_aarch64 @ 281472777010496>, <py33-none-manylinux_2_28_aarch64 @ 281472777007616>, <py33-none-manylinux_2_27_aarch64 @ 281472777006208>, <py33-none-manylinux_2_26_aarch64 @ 281472777001216>, <py33-none-manylinux_2_25_aarch64 @ 281472777000896>, <py33-none-manylinux_2_24_aarch64 @ 281472777004800>, <py33-none-manylinux_2_23_aarch64 @ 281472777006784>, <py33-none-manylinux_2_22_aarch64 @ 281472776998080>, <py33-none-manylinux_2_21_aarch64 @ 281472776998656>, <py33-none-manylinux_2_20_aarch64 @ 281472776999232>, <py33-none-manylinux_2_19_aarch64 @ 281472776999296>, <py33-none-manylinux_2_18_aarch64 @ 281472777009216>, <py33-none-manylinux_2_17_aarch64 @ 281472776998784>, <py33-none-manylinux2014_aarch64 @ 281472777002304>, <py33-none-linux_aarch64 @ 281472777003904>, <py32-none-manylinux_2_31_aarch64 @ 281472776995904>, <py32-none-manylinux_2_30_aarch64 @ 281472777003456>, <py32-none-manylinux_2_29_aarch64 @ 281472776997696>, <py32-none-manylinux_2_28_aarch64 @ 281472777009920>, <py32-none-manylinux_2_27_aarch64 @ 281472776998592>, <py32-none-manylinux_2_26_aarch64 @ 281472777001856>, <py32-none-manylinux_2_25_aarch64 @ 281472776997184>, <py32-none-manylinux_2_24_aarch64 @ 281472776997312>, <py32-none-manylinux_2_23_aarch64 @ 281472777010560>, <py32-none-manylinux_2_22_aarch64 @ 281472776994880>, <py32-none-manylinux_2_21_aarch64 @ 281472777001088>, <py32-none-manylinux_2_20_aarch64 @ 281472776999872>, <py32-none-manylinux_2_19_aarch64 @ 281472777003072>, <py32-none-manylinux_2_18_aarch64 @ 281472777009984>, <py32-none-manylinux_2_17_aarch64 @ 281472777009472>, <py32-none-manylinux2014_aarch64 @ 281472777010688>, <py32-none-linux_aarch64 @ 281472777003392>, <py31-none-manylinux_2_31_aarch64 @ 281472777007936>, <py31-none-manylinux_2_30_aarch64 @ 281472777001472>, <py31-none-manylinux_2_29_aarch64 @ 281472777006912>, <py31-none-manylinux_2_28_aarch64 @ 281472776995776>, <py31-none-manylinux_2_27_aarch64 @ 281472777010304>, <py31-none-manylinux_2_26_aarch64 @ 281472776997440>, <py31-none-manylinux_2_25_aarch64 @ 281472777010880>, <py31-none-manylinux_2_24_aarch64 @ 281472777003520>, <py31-none-manylinux_2_23_aarch64 @ 281472776994944>, <py31-none-manylinux_2_22_aarch64 @ 281472776996288>, <py31-none-manylinux_2_21_aarch64 @ 281472777007232>, <py31-none-manylinux_2_20_aarch64 @ 281472778796480>, <py31-none-manylinux_2_19_aarch64 @ 281472778794688>, <py31-none-manylinux_2_18_aarch64 @ 281472778796864>, <py31-none-manylinux_2_17_aarch64 @ 281472778795520>, <py31-none-manylinux2014_aarch64 @ 281472778780992>, <py31-none-linux_aarch64 @ 281472778781184>, <py30-none-manylinux_2_31_aarch64 @ 281472777002816>, <py30-none-manylinux_2_30_aarch64 @ 281472778796672>, <py30-none-manylinux_2_29_aarch64 @ 281472778796992>, <py30-none-manylinux_2_28_aarch64 @ 281472778792576>, <py30-none-manylinux_2_27_aarch64 @ 281472778783104>, <py30-none-manylinux_2_26_aarch64 @ 281472778783808>, <py30-none-manylinux_2_25_aarch64 @ 281472778785600>, <py30-none-manylinux_2_24_aarch64 @ 281472778796352>, <py30-none-manylinux_2_23_aarch64 @ 281472778790144>, <py30-none-manylinux_2_22_aarch64 @ 281472778789440>, <py30-none-manylinux_2_21_aarch64 @ 281472778786112>, <py30-none-manylinux_2_20_aarch64 @ 281472778790656>, <py30-none-manylinux_2_19_aarch64 @ 281472778794176>, <py30-none-manylinux_2_18_aarch64 @ 281472778794560>, <py30-none-manylinux_2_17_aarch64 @ 281472778790528>, <py30-none-manylinux2014_aarch64 @ 281472778785664>, <py30-none-linux_aarch64 @ 281472778787392>, <cp310-none-any @ 281472778784256>, <py310-none-any @ 281472778783616>, <py3-none-any @ 281472778796096>, <py39-none-any @ 281472778794368>, <py38-none-any @ 281472778793216>, <py37-none-any @ 281472778789120>, <py36-none-any @ 281472778785280>, <py35-none-any @ 281472778785856>, <py34-none-any @ 281472778782400>, <py33-none-any @ 281472778788544>, <py32-none-any @ 281472778788992>, <py31-none-any @ 281472778791296>, <py30-none-any @ 281472778792192>], wheel: {<py3-none-manylinux_2_17_arm64 @ 281472778989696>, <py2-none-manylinux_2_17_arm64 @ 281472778982080>}

@bastibe
Copy link
Owner

bastibe commented Apr 10, 2023

Since you seem to have access to an ARM linux device, I'd be grateful for your help in creating a binary wheel for it.

@aoirint
Copy link
Contributor

aoirint commented Oct 23, 2023

@bastibe @imWildCat
I'm interested in this feature. I can take over this pull request if you are busy.


After some additional fixes, the problem #382 (comment) (installation issue) was fixed in my own build.

Main points of fixes

Experimental binary wheel build: https://github.com/aoirint/python-soundfile/releases/tag/0.12.2.dev1%2Baoirint.addlinuxarm64
(Download soundfile-0.12.2.dev1+aoirint.addlinuxarm64-py2.py3-none-manylinux_2_17_aarch64.whl)

However, this binary wheel does not pass pytest. I have found libogg and libvorbis support is lacked in bastibe/libsndfile-binaries's Linux ARM64 binary libsndfile_arm64.so (660 KB, sha256:c317ef4555ffc6b6b6f38514a8d4e631e4916b4ca5eca638d1659f92238cba6d). Other tests are passed.

I created an issue about it.

Shortened Error Log of pytest

FAILED tests/test_soundfile.py::test_available_formats - AssertionError: assert 'OGG' in {'AIFF': 'AIFF (Apple/SGI)', 'AU': 'AU (Sun/NeXT)', 'AVR': 'AVR (Audio Visual Research)', ...
FAILED tests/test_soundfile.py::test_available_subtypes - AssertionError: assert 'VORBIS' in {'ALAC_16': '16 bit ALAC', 'ALAC_20': '20 bit ALAC', 'ALAC_24': '24 bit ALAC', 'ALAC_32...
Full Error Log of pytest
$ python -m pytest
===================================================== test session starts =====================================================
platform linux -- Python 3.11.6, pytest-7.4.2, pluggy-1.3.0
rootdir: /code
collected 324 items                                                                                                           

tests/test_argspec.py ....                                                                                              [  1%]
tests/test_soundfile.py ............................................................................................... [ 30%]
....................................................................................................................... [ 67%]
................................................................................................FF........              [100%]

========================================================== FAILURES ===========================================================
___________________________________________________ test_available_formats ____________________________________________________

    def test_available_formats():
        formats = sf.available_formats()
        assert 'WAV' in formats
>       assert 'OGG' in formats
E       AssertionError: assert 'OGG' in {'AIFF': 'AIFF (Apple/SGI)', 'AU': 'AU (Sun/NeXT)', 'AVR': 'AVR (Audio Visual Research)', 'CAF': 'CAF (Apple Core Audio File)', ...}

tests/test_soundfile.py:1005: AssertionError
___________________________________________________ test_available_subtypes ___________________________________________________

    def test_available_subtypes():
        subtypes = sf.available_subtypes()
        assert 'PCM_24' in subtypes
        assert 'FLOAT' in subtypes
>       assert 'VORBIS' in subtypes
E       AssertionError: assert 'VORBIS' in {'ALAC_16': '16 bit ALAC', 'ALAC_20': '20 bit ALAC', 'ALAC_24': '24 bit ALAC', 'ALAC_32': '32 bit ALAC', ...}

tests/test_soundfile.py:1013: AssertionError
====================================================== warnings summary =======================================================
tests/test_soundfile.py::test_extra_info[fd]
  /home/user/.local/lib/python3.11/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function SoundFile._init_virtual_io.<locals>.vio_write at 0x5518d100e0>: None
  
  Traceback (most recent call last):
    File "/home/user/.local/lib/python3.11/site-packages/_pytest/fixtures.py", line 596, in _get_active_fixturedef
      return self._fixture_defs[argname]
             ~~~~~~~~~~~~~~~~~~^^^^^^^^^
  KeyError: 'request'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/code/soundfile.py", line 1261, in vio_write
      written = file.write(data)
                ^^^^^^^^^^^^^^^^
  ValueError: I/O operation on closed file
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================== short test summary info ===================================================
FAILED tests/test_soundfile.py::test_available_formats - AssertionError: assert 'OGG' in {'AIFF': 'AIFF (Apple/SGI)', 'AU': 'AU (Sun/NeXT)', 'AVR': 'AVR (Audio Visual Research)', ...
FAILED tests/test_soundfile.py::test_available_subtypes - AssertionError: assert 'VORBIS' in {'ALAC_16': '16 bit ALAC', 'ALAC_20': '20 bit ALAC', 'ALAC_24': '24 bit ALAC', 'ALAC_32...
========================================== 2 failed, 322 passed, 1 warning in 5.65s ===========================================

If you are using Docker, you may test my aarch64 wheel build/fix on x86_64 machine with QEMU CPU emulation.

Commands
# On host machine
git clone https://github.com/aoirint/python-soundfile.git
cd python-soundfile
git checkout 5f2f5b37cd210005f0510f3d11cd9e4e0efa06e4
git submodule update --init

sudo docker run --rm -it --volume ".:/code" --platform "linux/arm64" arm64v8/python:3.11 bash
# As root user in Docker container
useradd --uid 1000 --create-home user
su -l user -s /bin/bash
# As general user in Docker container
cd /code
python build_wheels.py

pip install ./dist/soundfile-0.12.2.dev1+aoirint.addlinuxarm64-py2.py3-none-manylinux_2_17_aarch64.whl

pip install numpy pytest
python -m pytest

@aoirint
Copy link
Contributor

aoirint commented Oct 23, 2023

After libsndfile_arm64.so replaced with CI provided binary (mentioned in bastibe/libsndfile-binaries#29 ), the pytest errors are fixed and passed.

Experimental binary wheel build: https://github.com/aoirint/python-soundfile/releases/tag/0.12.2.dev2%2Baoirint.addlinuxarm64
(Download soundfile-0.12.2.dev2+aoirint.addlinuxarm64-py2.py3-none-manylinux_2_17_aarch64.whl)

Full log of pytest after .so file replaced
$ python -m pytest
================================================= test session starts ==================================================
platform linux -- Python 3.11.6, pytest-7.4.2, pluggy-1.3.0
rootdir: /code
collected 324 items

tests/test_argspec.py ....                                                                                       [  1%]
tests/test_soundfile.py ........................................................................................ [ 28%]
................................................................................................................ [ 62%]
................................................................................................................ [ 97%]
........                                                                                                         [100%]

=================================================== warnings summary ===================================================
tests/test_soundfile.py::test_file_truthiness[obj]
  /home/user/.local/lib/python3.11/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function SoundFile._init_virtual_io.<locals>.vio_write at 0x5518f63ec0>: None

  Traceback (most recent call last):
    File "/home/user/.local/lib/python3.11/site-packages/_pytest/fixtures.py", line 596, in _get_active_fixturedef
      return self._fixture_defs[argname]
             ~~~~~~~~~~~~~~~~~~^^^^^^^^^
  KeyError: 'request'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/user/.local/lib/python3.11/site-packages/_pytest/fixtures.py", line 599, in _get_active_fixturedef
      fixturedef = self._getnextfixturedef(argname)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/user/.local/lib/python3.11/site-packages/_pytest/fixtures.py", line 473, in _getnextfixturedef
      raise FixtureLookupError(argname, self)
  _pytest.fixtures.FixtureLookupError: ('request', <SubRequest 'file_w' for <Function test_file_truthiness[obj]>>)

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/code/soundfile.py", line 1261, in vio_write
      written = file.write(data)
                ^^^^^^^^^^^^^^^^
  ValueError: I/O operation on closed file

    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================ 324 passed, 1 warning in 3.49s ============================================

@imWildCat
Copy link
Author

@aoirint sorry for the late response. Yes, please take over it.

@aoirint
Copy link
Contributor

aoirint commented Oct 23, 2023

@imWildCat
Thanks for your quick and positive response! I have taken over your pull request and created a new one #415. You may close this PR #382.

@bastibe
I would appreciate your review for the new pull request.

@imWildCat
Copy link
Author

#415

@imWildCat imWildCat closed this Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants