Skip to content

Commit 7ecdd52

Browse files
authored
python3Packages.sounddevice: 0.4.7 -> 0.5.1, convert to pyproject, fix cross (#342258)
2 parents 7441138 + 590380d commit 7ecdd52

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

pkgs/development/python-modules/sounddevice/default.nix

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
buildPythonPackage,
55
fetchPypi,
66
isPy27,
7+
setuptools,
78
cffi,
89
numpy,
910
portaudio,
@@ -12,21 +13,25 @@
1213

1314
buildPythonPackage rec {
1415
pname = "sounddevice";
15-
version = "0.4.7";
16-
format = "setuptools";
16+
version = "0.5.1";
17+
pyproject = true;
1718
disabled = isPy27;
1819

1920
src = fetchPypi {
2021
inherit pname version;
21-
hash = "sha256-abOGgY1QotUYYH1LlzRC6NUkdgx81si4vgPYyY/EvOc=";
22+
hash = "sha256-CcqZHa7ajOS+mskeFamoHI+B76a2laNIyRceoMFssEE=";
2223
};
2324

24-
propagatedBuildInputs = [
25+
build-system = [ setuptools ];
26+
27+
dependencies = [
2528
cffi
2629
numpy
2730
portaudio
2831
];
2932

33+
nativeBuildInputs = [ cffi ];
34+
3035
# No tests included nor upstream available.
3136
doCheck = false;
3237

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
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
1+
diff --git a/sounddevice.py b/sounddevice.py
2+
index 0974289..2d56c28 100644
3+
--- a/sounddevice.py
4+
+++ b/sounddevice.py
5+
@@ -58,32 +58,7 @@ from ctypes.util import find_library as _find_library
66
from _sounddevice import ffi as _ffi
7-
8-
7+
8+
99
-try:
1010
- for _libname in (
1111
- 'portaudio', # Default name on POSIX systems
@@ -22,14 +22,17 @@ index c7c1d62..aabcb12 100644
2222
- if _platform.system() == 'Darwin':
2323
- _libname = 'libportaudio.dylib'
2424
- elif _platform.system() == 'Windows':
25-
- _libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
25+
- if 'SD_ENABLE_ASIO' in _os.environ:
26+
- _libname = 'libportaudio' + _platform.architecture()[0] + '-asio.dll'
27+
- else:
28+
- _libname = 'libportaudio' + _platform.architecture()[0] + '.dll'
2629
- else:
2730
- raise
2831
- import _sounddevice_data
2932
- _libname = _os.path.join(
3033
- next(iter(_sounddevice_data.__path__)), 'portaudio-binaries', _libname)
3134
- _lib = _ffi.dlopen(_libname)
3235
+_lib = _ffi.dlopen('@portaudio@')
33-
36+
3437
_sampleformats = {
3538
'float32': _lib.paFloat32,

0 commit comments

Comments
 (0)