python3Packages.librosa: 0.9.2 -> 0.10.0
https://github.com/librosa/librosa/releases/tag/0.10.0 - Migrate to pep517 build - Make matplotlib an optional dependency - Enable tests - Update description, homepage and add changelog url
This commit is contained in:
parent
470651e0e8
commit
ba9b0aef58
@ -1,39 +1,106 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, joblib
|
||||
, matplotlib
|
||||
, six
|
||||
, scikit-learn
|
||||
, decorator
|
||||
, fetchFromGitHub
|
||||
|
||||
# build-system
|
||||
, setuptools
|
||||
|
||||
# runtime
|
||||
, audioread
|
||||
, resampy
|
||||
, soundfile
|
||||
, 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.9.2";
|
||||
version = "0.10.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-W1drXv3OQo6QvJiL3VqVPRKnJ+X5MfMNdMU7Y6u+PIk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "librosa";
|
||||
repo = "librosa";
|
||||
rev = "refs/tags/${version}";
|
||||
fetchSubmodules = true; # for test data
|
||||
hash = "sha256-MXzPIcbG8b1JwhEyAZG4DRObGaHq+ipVHMrZCzaxLdE=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ joblib matplotlib six scikit-learn decorator audioread resampy soundfile pooch ];
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
# No tests
|
||||
# 1. Internet connection is required
|
||||
# 2. Got error "module 'librosa' has no attribute 'version'"
|
||||
doCheck = false;
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov-report term-missing --cov librosa --cov-report=xml " ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
audioread
|
||||
decorator
|
||||
joblib
|
||||
lazy-loader
|
||||
msgpack
|
||||
numba
|
||||
numpy
|
||||
pooch
|
||||
scipy
|
||||
scikit-learn
|
||||
soundfile
|
||||
soxr
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
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
|
||||
packaging
|
||||
pytest-mpl
|
||||
pytestCheckHook
|
||||
resampy
|
||||
samplerate
|
||||
] ++ passthru.optional-dependencies.matplotlib;
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# requires network access
|
||||
"test_example"
|
||||
"test_example_info"
|
||||
"test_load_resample"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python module for audio and music processing";
|
||||
homepage = "http://librosa.github.io/";
|
||||
description = "Python library for audio and music analysis";
|
||||
homepage = "https://github.com/librosa/librosa";
|
||||
changelog = "https://github.com/librosa/librosa/releases/tag/${version}";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ GuillaumeDesforges ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user