Skip to content

Commit 6195420

Browse files
authored
Merge pull request #451 from bastibe/v1.2.2-libraries
V1.2.2 libraries
2 parents c6b218b + 26a7d66 commit 6195420

File tree

6 files changed

+41
-18
lines changed

6 files changed

+41
-18
lines changed

.github/workflows/python-package.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,35 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [ubuntu-20.04, windows-2019, macos-11]
11+
os: [ubuntu-latest, windows-latest, macos-latest]
1212
python-version:
13-
- "3.6"
14-
- "3.7"
15-
- "3.8"
1613
- "3.9"
1714
- "3.10"
1815
- "3.11"
16+
- "3.12"
17+
- "3.13"
1918
- "pypy-3.7"
2019
- "pypy-3.8"
20+
- "pypy-3.9"
21+
- "pypy-3.10"
2122
architecture: ["x86", "x64"]
2223
exclude:
23-
- os: macos-11 # No Numpy binary wheel
24+
- os: macos-latest # No Numpy binary wheel
2425
python-version: "pypy-3.7"
25-
- os: macos-11
26+
- os: macos-latest
27+
python-version: "3.9"
28+
- os: macos-latest
29+
python-version: "3.10"
30+
- os: macos-latest
2631
architecture: "x86"
27-
- os: ubuntu-20.04
32+
- os: ubuntu-latest
2833
architecture: "x86"
34+
- os: windows-latest
35+
python-version: "pypy-3.9"
36+
- os: windows-latest
37+
python-version: "pypy-3.10"
2938

3039
steps:
31-
- name: Install APT dependencies
32-
if: runner.os == 'Linux'
33-
run: |
34-
sudo apt-get update
35-
sudo apt-get install libsndfile1
3640
- uses: actions/checkout@v2
3741
with:
3842
submodules: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ build/
66
*.egg-info/
77
.cache/
88
.vscode/
9+
.DS_Store
10+
.venv/

build_wheels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import shutil
33

44
architectures = dict(darwin=['x86_64', 'arm64'],
5-
win32=['32bit', '64bit'],
6-
linux=['x86_64'],
5+
win32=['x86', 'x64', 'arm64'],
6+
linux=['x86_64', 'arm64'],
77
noplatform='noarch')
88

99
def cleanup():

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ def get_tag(self):
7979
oses = 'win_amd64'
8080
elif platform == 'linux':
8181
# using the centos:7 runner with glibc2.17:
82-
oses = 'manylinux_2_17_{}'.format(architecture0)
82+
if architecture0 == 'arm64':
83+
pep600_architecture = 'aarch64'
84+
else:
85+
pep600_architecture = architecture0
86+
87+
oses = 'manylinux_2_17_{}'.format(pep600_architecture)
8388
else:
8489
pythons = 'py2.py3'
8590
oses = 'any'

soundfile.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,22 @@
157157
_packaged_libname = 'libsndfile_' + _machine() + '.dylib'
158158
elif _sys.platform == 'win32':
159159
from platform import architecture as _architecture
160-
_packaged_libname = 'libsndfile_' + _architecture()[0] + '.dll'
160+
from platform import machine as _machine
161+
if _machine() == 'ARM64':
162+
_packaged_libname = 'libsndfile_arm64.dll'
163+
elif _architecture()[0] == '64bit':
164+
_packaged_libname = 'libsndfile_x64.dll'
165+
elif _architecture()[0] == '32bit':
166+
_packaged_libname = 'libsndfile_x86.dll'
167+
else:
168+
raise OSError('no packaged library for Windows {} {}'
169+
.format(_architecture(), _machine()))
161170
elif _sys.platform == 'linux':
162171
from platform import machine as _machine
163-
_packaged_libname = 'libsndfile_' + _machine() + '.so'
172+
if _machine() in ["aarch64", "aarch64_be", "armv8b", "armv8l"]:
173+
_packaged_libname = 'libsndfile_arm64.so'
174+
else:
175+
_packaged_libname = 'libsndfile_' + _machine() + '.so'
164176
else:
165177
raise OSError('no packaged library for this platform')
166178

0 commit comments

Comments
 (0)