python314Packages.sounddevice: 0.5.3 -> 0.5.5

This commit is contained in:
Sandro Jäckel
2026-06-29 17:39:31 +02:00
parent 5744bb6c6a
commit 653d787cc3
2 changed files with 25 additions and 16 deletions
@@ -4,6 +4,7 @@
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-scm,
cffi,
numpy,
portaudio,
@@ -12,15 +13,18 @@
buildPythonPackage rec {
pname = "sounddevice";
version = "0.5.3";
version = "0.5.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-y6wrYBmPurhFM2l+fEkEzIlexp1fs5c1VsnrdKRimyw=";
hash = "sha256-Ikh7ZRmMtb8iCHVRBbUk94rRc+Wra0Rb2rHJifZpjfM=";
};
build-system = [ setuptools ];
build-system = [
setuptools
setuptools-scm
];
dependencies = [
cffi
@@ -43,7 +47,8 @@ buildPythonPackage rec {
meta = {
description = "Play and Record Sound with Python";
homepage = "http://python-sounddevice.rtfd.org/";
homepage = "https://python-sounddevice.readthedocs.io/";
changelog = "https://github.com/spatialaudio/python-sounddevice/releases/tag/${version}";
license = with lib.licenses; [ mit ];
};
}
@@ -1,8 +1,8 @@
diff --git a/sounddevice.py b/sounddevice.py
index 0974289..2d56c28 100644
--- a/sounddevice.py
+++ b/sounddevice.py
@@ -58,32 +58,7 @@ from ctypes.util import find_library as _find_library
diff --git a/src/sounddevice.py b/src/sounddevice.py
index 00fc6f8..72abede 100644
--- a/src/sounddevice.py
+++ b/src/sounddevice.py
@@ -59,36 +59,7 @@
from _sounddevice import ffi as _ffi
@@ -17,22 +17,26 @@ index 0974289..2d56c28 100644
- break
- else:
- raise OSError('PortAudio library not found')
- _lib = _ffi.dlopen(_libname)
- _lib: ... = _ffi.dlopen(_libname)
-except OSError:
- if _platform.system() == 'Darwin':
- _libname = 'libportaudio.dylib'
- elif _platform.system() == 'Windows':
- if 'SD_ENABLE_ASIO' in _os.environ:
- _libname = 'libportaudio' + _platform.architecture()[0] + '-asio.dll'
- if _platform.machine().lower() in ('arm64', 'aarch64'):
- _platform_suffix = 'arm64'
- else:
- _libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
- _platform_suffix = _platform.architecture()[0]
- if 'SD_ENABLE_ASIO' in _os.environ:
- _libname = 'libportaudio' + _platform_suffix + '-asio.dll'
- else:
- _libname = 'libportaudio' + _platform_suffix + '.dll'
- else:
- raise
- import _sounddevice_data
- _libname = _os.path.join(
- next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
- _lib = _ffi.dlopen(_libname)
+_lib = _ffi.dlopen('@portaudio@')
- _lib: ... = _ffi.dlopen(_libname)
+_lib: ... = _ffi.dlopen('@portaudio@')
_sampleformats = {
_sampleformats: ... = {
'float32': _lib.paFloat32,