Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ build/
*.egg-info/
.cache/
.vscode/
.DS_Store
.venv/
4 changes: 2 additions & 2 deletions build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
16 changes: 14 additions & 2 deletions soundfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
Loading