diff options
Diffstat (limited to 'pkgs/development/python-modules/librosa/default.nix')
-rw-r--r-- | pkgs/development/python-modules/librosa/default.nix | 128 |
1 files changed, 66 insertions, 62 deletions
diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix index 62d712aa7b1f3..fa0c17487d337 100644 --- a/pkgs/development/python-modules/librosa/default.nix +++ b/pkgs/development/python-modules/librosa/default.nix @@ -1,40 +1,41 @@ -{ lib -, stdenv -, buildPythonPackage -, fetchFromGitHub -, fetchpatch - -# build-system -, setuptools - -# runtime -, audioread -, decorator -, joblib -, lazy-loader -, matplotlib -, msgpack -, numba -, numpy -, pooch -, scikit-learn -, scipy -, soundfile -, soxr -, typing-extensions - -# tests -, ffmpeg-headless -, packaging -, pytest-mpl -, pytestCheckHook -, resampy -, samplerate +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + fetchpatch2, + + # build-system + setuptools, + + # runtime + audioread, + decorator, + joblib, + lazy-loader, + matplotlib, + msgpack, + numba, + numpy, + pooch, + scikit-learn, + scipy, + soundfile, + soxr, + typing-extensions, + + # tests + ffmpeg-headless, + packaging, + pytest-mpl, + pytestCheckHook, + resampy, + samplerate, }: buildPythonPackage rec { pname = "librosa"; - version = "0.10.1"; + version = "0.10.2.post1"; format = "pyproject"; src = fetchFromGitHub { @@ -42,26 +43,23 @@ buildPythonPackage rec { repo = "librosa"; rev = "refs/tags/${version}"; fetchSubmodules = true; # for test data - hash = "sha256-zbmU87hI9A1CVcBZ/5FU8z0t6SS4jfJk9bj9kLe/EHI="; + hash = "sha256-0FbKVAFWmcFTW2dR27nif6hPZeIxFWYF1gTm4BEJZ/Q="; }; - nativeBuildInputs = [ - setuptools - ]; + nativeBuildInputs = [ setuptools ]; patches = [ - (fetchpatch { - # https://github.com/librosa/librosa/issues/1754 - # https://github.com/librosa/librosa/pull/1755 - name = "matplotlib-3.8-compat.patch"; - url = "https://github.com/librosa/librosa/commit/beef47885ce1255b43b65e48ea2054ddace37c6c.patch"; - hash = "sha256-rrnlUHXHY2me4BWGs3wFq8WJmz75CbXTWKFp3VdJKzE="; + (fetchpatch2 { + # https://github.com/librosa/librosa/issues/1849 + name = "librosa-scipy-1.14-compat.patch"; + url = "https://github.com/librosa/librosa/commit/d0a12c87cdff715ffb8ac1c7383bba1031aa71e4.patch"; + hash = "sha256-NHuGo4U1FRikb5OIkycQBvuZ+0OdG/VykTcuhXkLUug="; }) ]; postPatch = '' substituteInPlace setup.cfg \ - --replace "--cov-report term-missing --cov librosa --cov-report=xml " "" + --replace-fail "--cov-report term-missing --cov librosa --cov-report=xml " "" ''; propagatedBuildInputs = [ @@ -80,14 +78,10 @@ buildPythonPackage rec { typing-extensions ]; - passthru.optional-dependencies.matplotlib = [ - matplotlib - ]; + passthru.optional-dependencies.matplotlib = [ matplotlib ]; # check that import works, this allows to capture errors like https://github.com/librosa/librosa/issues/1160 - pythonImportsCheck = [ - "librosa" - ]; + pythonImportsCheck = [ "librosa" ]; nativeCheckInputs = [ ffmpeg-headless @@ -102,17 +96,28 @@ buildPythonPackage rec { export HOME=$TMPDIR ''; - disabledTests = [ - # requires network access - "test_example" - "test_example_info" - "test_load_resample" - # does not converge - "test_nnls_vector" - ] ++ lib.optionals stdenv.isDarwin [ - # https://github.com/librosa/librosa/pull/1808 - "test_pyin_multi_center" - ]; + disabledTests = + [ + # requires network access + "test_example" + "test_example_info" + "test_load_resample" + "test_cite_released" + "test_cite_badversion" + "test_cite_unreleased" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # crashing the python interpreter + "test_unknown_time_unit" + "test_unknown_wavaxis" + "test_waveshow_unknown_wavaxis" + "test_waveshow_bad_maxpoints" + "test_waveshow_deladaptor" + "test_waveshow_disconnect" + "test_unknown_axis" + "test_axis_bound_warning" + "test_auto_aspect" + ]; meta = with lib; { description = "Python library for audio and music analysis"; @@ -121,5 +126,4 @@ buildPythonPackage rec { license = licenses.isc; maintainers = with maintainers; [ GuillaumeDesforges ]; }; - } |