File tree Expand file tree Collapse file tree 4 files changed +26
-7
lines changed
Expand file tree Collapse file tree 4 files changed +26
-7
lines changed Original file line number Diff line number Diff 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 : ${{ matrix.os == 'windows-11-arm' && '3.13' || '3.10' }}
2325 architecture : ${{ matrix.arch }}
2426 - name : Double-check Python version
2527 run : |
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ make_wheel Windows 32bit
1919
2020make_wheel Windows 64bit
2121
22+ make_wheel Windows arm64
23+
2224# This makes sure that the libraries are not copied to the final sdist:
2325rm -rf sounddevice.egg-info/
2426
Original file line number Diff line number Diff line change 1818system = os .environ .get ('PYTHON_SOUNDDEVICE_PLATFORM' , platform .system ())
1919architecture0 = os .environ .get ('PYTHON_SOUNDDEVICE_ARCHITECTURE' ,
2020 platform .architecture ()[0 ])
21+ machine = platform .machine ().lower ()
22+ is_arm64 = machine in ['arm64' , 'aarch64' ]
2123
2224if system == 'Darwin' :
2325 libname = 'libportaudio.dylib'
2426elif system == 'Windows' :
25- libname = 'libportaudio' + architecture0 + '.dll'
26- libname_asio = 'libportaudio' + architecture0 + '-asio.dll'
27+ if is_arm64 :
28+ libname = 'libportaudioarm64.dll'
29+ libname_asio = 'libportaudioarm64-asio.dll'
30+ else :
31+ libname = 'libportaudio' + architecture0 + '.dll'
32+ libname_asio = 'libportaudio' + architecture0 + '-asio.dll'
2733else :
2834 libname = None
2935
@@ -52,7 +58,9 @@ def get_tag(self):
5258 if system == 'Darwin' :
5359 oses = MACOSX_VERSIONS
5460 elif system == 'Windows' :
55- if architecture0 == '32bit' :
61+ if is_arm64 :
62+ oses = 'win_arm64'
63+ elif architecture0 == '32bit' :
5664 oses = 'win32'
5765 else :
5866 oses = 'win_amd64'
Original file line number Diff line number Diff line change 7474 if _platform .system () == 'Darwin' :
7575 _libname = 'libportaudio.dylib'
7676 elif _platform .system () == 'Windows' :
77- if 'SD_ENABLE_ASIO' in _os .environ :
78- _libname = 'libportaudio' + _platform .architecture ()[0 ] + '-asio.dll'
77+ machine = _platform .machine ().lower ()
78+ if machine in ('arm64' , 'aarch64' ):
79+ if 'SD_ENABLE_ASIO' in _os .environ :
80+ _libname = 'libportaudioarm64-asio.dll'
81+ else :
82+ _libname = 'libportaudioarm64.dll'
7983 else :
80- _libname = 'libportaudio' + _platform .architecture ()[0 ] + '.dll'
84+ if 'SD_ENABLE_ASIO' in _os .environ :
85+ _libname = 'libportaudio' + _platform .architecture ()[0 ] + '-asio.dll'
86+ else :
87+ _libname = 'libportaudio' + _platform .architecture ()[0 ] + '.dll'
8188 else :
8289 raise
8390 import _sounddevice_data
You can’t perform that action at this time.
0 commit comments