Skip to content

Commit f841bd3

Browse files
committed
add Windows ARM64 support
1 parent 09d449a commit f841bd3

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
os: [ubuntu-latest, windows-latest, macos-latest]
11+
os: [ubuntu-latest, windows-latest, windows-11-arm, macos-latest]
1212
python-version:
1313
- "3.9"
1414
- "3.10"
@@ -19,7 +19,7 @@ jobs:
1919
- "pypy-3.8"
2020
- "pypy-3.9"
2121
- "pypy-3.10"
22-
architecture: ["x86", "x64"]
22+
architecture: ["x86", "x64", "arm64"]
2323
exclude:
2424
- os: macos-latest # No Numpy binary wheel
2525
python-version: "pypy-3.7"
@@ -35,6 +35,28 @@ jobs:
3535
python-version: "pypy-3.9"
3636
- os: windows-latest
3737
python-version: "pypy-3.10"
38+
- os: windows-11-arm
39+
python-version: "3.9"
40+
- os: windows-11-arm
41+
python-version: "3.10"
42+
- os: windows-latest
43+
architecture: "arm64"
44+
- os: ubuntu-latest
45+
architecture: "arm64"
46+
- os: macos-latest
47+
architecture: "arm64"
48+
- os: windows-11-arm
49+
architecture: "x86"
50+
- os: windows-11-arm
51+
architecture: "x64"
52+
- os: windows-11-arm
53+
python-version: "pypy-3.7"
54+
- os: windows-11-arm
55+
python-version: "pypy-3.8"
56+
- os: windows-11-arm
57+
python-version: "pypy-3.9"
58+
- os: windows-11-arm
59+
python-version: "pypy-3.10"
3860

3961
steps:
4062
- uses: actions/checkout@v2

soundfile.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,10 @@
169169
elif _sys.platform == 'win32':
170170
from platform import architecture as _architecture
171171
from platform import machine as _machine
172-
# this check can not be completed correctly: for x64 binaries running on
173-
# arm64 Windows report the same values as arm64 binaries. For now, neither
174-
# numpy nor cffi are available for arm64, so we can safely assume we're
175-
# in x86 land:
176-
if _architecture()[0] == '64bit':
172+
_win_machine = _machine().lower()
173+
if _win_machine in ('arm64', 'aarch64'):
174+
_packaged_libname = 'libsndfile_arm64.dll'
175+
elif _architecture()[0] == '64bit':
177176
_packaged_libname = 'libsndfile_x64.dll'
178177
elif _architecture()[0] == '32bit':
179178
_packaged_libname = 'libsndfile_x86.dll'

0 commit comments

Comments
 (0)