diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 31cb6e9..ad26484 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -8,31 +8,35 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-11] + os: [ubuntu-latest, windows-latest, macos-latest] python-version: - - "3.6" - - "3.7" - - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" - "pypy-3.7" - "pypy-3.8" + - "pypy-3.9" + - "pypy-3.10" architecture: ["x86", "x64"] exclude: - - os: macos-11 # No Numpy binary wheel + - os: macos-latest # No Numpy binary wheel python-version: "pypy-3.7" - - os: macos-11 + - os: macos-latest + python-version: "3.9" + - os: macos-latest + python-version: "3.10" + - os: macos-latest architecture: "x86" - - os: ubuntu-20.04 + - os: ubuntu-latest architecture: "x86" + - os: windows-latest + python-version: "pypy-3.9" + - os: windows-latest + python-version: "pypy-3.10" steps: - - name: Install APT dependencies - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install libsndfile1 - uses: actions/checkout@v2 with: submodules: true diff --git a/.gitignore b/.gitignore index 0f90457..4311438 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ build/ *.egg-info/ .cache/ .vscode/ +.DS_Store +.venv/ \ No newline at end of file diff --git a/_soundfile_data b/_soundfile_data index f1655ba..dd1c4a5 160000 --- a/_soundfile_data +++ b/_soundfile_data @@ -1 +1 @@ -Subproject commit f1655ba375f306c4b3b179e1fb603d71b50ce179 +Subproject commit dd1c4a5b2f00185b2e387431296560dd691e0a08 diff --git a/build_wheels.py b/build_wheels.py index a2af99c..2f03786 100644 --- a/build_wheels.py +++ b/build_wheels.py @@ -2,8 +2,8 @@ import shutil architectures = dict(darwin=['x86_64', 'arm64'], - win32=['32bit', '64bit'], - linux=['x86_64'], + win32=['x86', 'x64', 'arm64'], + linux=['x86_64', 'arm64'], noplatform='noarch') def cleanup(): diff --git a/setup.py b/setup.py index f986c50..14fa60f 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 31218b6..9758a9f 100644 --- a/soundfile.py +++ b/soundfile.py @@ -157,10 +157,22 @@ _packaged_libname = 'libsndfile_' + _machine() + '.dylib' elif _sys.platform == 'win32': from platform import architecture as _architecture - _packaged_libname = 'libsndfile_' + _architecture()[0] + '.dll' + from platform import machine as _machine + if _machine() == 'ARM64': + _packaged_libname = 'libsndfile_arm64.dll' + elif _architecture()[0] == '64bit': + _packaged_libname = 'libsndfile_x64.dll' + elif _architecture()[0] == '32bit': + _packaged_libname = 'libsndfile_x86.dll' + else: + raise OSError('no packaged library for Windows {} {}' + .format(_architecture(), _machine())) 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')