Skip to content

Commit 8c449ce

Browse files
committed
Merge branch 'master' into pyproject.toml
2 parents b512012 + ce94736 commit 8c449ce

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
python -m sphinx -W --keep-going --color -d _build/doctrees/ doc/ _build/linkcheck/ -b linkcheck
3030
- name: Upload linkcheck results
31-
uses: actions/upload-artifact@v4
31+
uses: actions/upload-artifact@v5
3232
if: ${{ success() || failure() }}
3333
with:
3434
name: linkcheck

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run: |
1717
./make_dist.sh
1818
- name: Store the distribution packages
19-
uses: actions/upload-artifact@v4
19+
uses: actions/upload-artifact@v5
2020
with:
2121
name: dist
2222
path: dist
@@ -33,7 +33,7 @@ jobs:
3333
id-token: write
3434
steps:
3535
- name: Get the artifacts
36-
uses: actions/download-artifact@v5
36+
uses: actions/download-artifact@v6
3737
with:
3838
name: dist
3939
path: dist

.github/workflows/sounddevice-data.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ jobs:
1414
arch: 'x64'
1515
- os: windows-latest
1616
arch: 'x86'
17+
- os: windows-11-arm
18+
arch: 'arm64'
1719
runs-on: ${{ matrix.os }}
1820
steps:
1921
- name: Set up Python
2022
uses: actions/setup-python@v6
2123
with:
22-
python-version: "3.10"
24+
python-version: "3.13"
2325
architecture: ${{ matrix.arch }}
2426
- name: Double-check Python version
2527
run: |

make_dist.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ make_wheel Windows 32bit
2222

2323
make_wheel Windows 64bit
2424

25+
make_wheel Windows arm64
26+
2527
# This creates a "pure" wheel and an sdist without libraries:
2628
make_wheel Linux

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
# environment variables for cross-platform package creation
1111
system = os.environ.get('PYTHON_SOUNDDEVICE_PLATFORM', platform.system())
12+
machine = platform.machine().lower()
1213
architecture0 = os.environ.get('PYTHON_SOUNDDEVICE_ARCHITECTURE',
13-
platform.architecture()[0])
14+
'arm64' if machine in ['arm64', 'aarch64'] else platform.architecture()[0])
1415

1516
if system == 'Darwin':
1617
libname = 'libportaudio.dylib'
@@ -45,7 +46,9 @@ def get_tag(self):
4546
if system == 'Darwin':
4647
oses = MACOSX_VERSIONS
4748
elif system == 'Windows':
48-
if architecture0 == '32bit':
49+
if architecture0 == 'arm64':
50+
oses = 'win_arm64'
51+
elif architecture0 == '32bit':
4952
oses = 'win32'
5053
else:
5154
oses = 'win_amd64'

src/sounddevice.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@
7474
if _platform.system() == 'Darwin':
7575
_libname = 'libportaudio.dylib'
7676
elif _platform.system() == 'Windows':
77+
if _platform.machine().lower() in ('arm64', 'aarch64'):
78+
_platform_suffix = 'arm64'
79+
else:
80+
_platform_suffix = _platform.architecture()[0]
7781
if 'SD_ENABLE_ASIO' in _os.environ:
78-
_libname = 'libportaudio' + _platform.architecture()[0] + '-asio.dll'
82+
_libname = 'libportaudio' + _platform_suffix + '-asio.dll'
7983
else:
80-
_libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
84+
_libname = 'libportaudio' + _platform_suffix + '.dll'
8185
else:
8286
raise
8387
import _sounddevice_data

0 commit comments

Comments
 (0)