Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / sounddevice / fix-portaudio-library-path.patch
bloba5761764fdbb8dac26da869bf3374d91061042f7
1 diff --git i/sounddevice.py w/sounddevice.py
2 index c7c1d62..aabcb12 100644
3 --- i/sounddevice.py
4 +++ w/sounddevice.py
5 @@ -58,29 +58,7 @@ from ctypes.util import find_library as _find_library
6 from _sounddevice import ffi as _ffi
9 -try:
10 - for _libname in (
11 - 'portaudio', # Default name on POSIX systems
12 - 'bin\\libportaudio-2.dll', # DLL from conda-forge
13 - 'lib/libportaudio.dylib', # dylib from anaconda
14 - ):
15 - _libname = _find_library(_libname)
16 - if _libname is not None:
17 - break
18 - else:
19 - raise OSError('PortAudio library not found')
20 - _lib = _ffi.dlopen(_libname)
21 -except OSError:
22 - if _platform.system() == 'Darwin':
23 - _libname = 'libportaudio.dylib'
24 - elif _platform.system() == 'Windows':
25 - _libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
26 - else:
27 - raise
28 - import _sounddevice_data
29 - _libname = _os.path.join(
30 - next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
31 - _lib = _ffi.dlopen(_libname)
32 +_lib = _ffi.dlopen('@portaudio@')
34 _sampleformats = {
35 'float32': _lib.paFloat32,