diff --git a/build_wheels.py b/build_wheels.py index a2af99c..f4588cc 100644 --- a/build_wheels.py +++ b/build_wheels.py @@ -3,7 +3,7 @@ architectures = dict(darwin=['x86_64', 'arm64'], win32=['32bit', '64bit'], - linux=['x86_64'], + linux=['x86_64', 'arm64'], noplatform='noarch') def cleanup(): diff --git a/setup.py b/setup.py index 9cdcf42..acac4ef 100644 --- a/setup.py +++ b/setup.py @@ -79,7 +79,12 @@ def get_tag(self): oses = 'win_amd64' elif platform == 'linux': # using the centos:7 runner with glibc2.17: - oses = 'manylinux_2_17_{}'.format(architecture0) + if architecture0 == 'arm64': + pep600_architecture = 'aarch64' + else: + pep600_architecture = architecture0 + + oses = 'manylinux_2_17_{}'.format(pep600_architecture) else: pythons = 'py2.py3' oses = 'any' diff --git a/soundfile.py b/soundfile.py index cc13192..1760d73 100644 --- a/soundfile.py +++ b/soundfile.py @@ -154,7 +154,10 @@ _packaged_libname = 'libsndfile_' + _architecture()[0] + '.dll' elif _sys.platform == 'linux': from platform import machine as _machine - _packaged_libname = 'libsndfile_' + _machine() + '.so' + if _machine() in ["aarch64", "aarch64_be", "armv8b", "armv8l"]: + _packaged_libname = 'libsndfile_arm64.so' + else: + _packaged_libname = 'libsndfile_' + _machine() + '.so' else: raise OSError('no packaged library for this platform')