diff --git a/pkgs/development/python-modules/torch-audiomentations/default.nix b/pkgs/development/python-modules/torch-audiomentations/default.nix index 2a9985ce91b4..7a4205268e3e 100644 --- a/pkgs/development/python-modules/torch-audiomentations/default.nix +++ b/pkgs/development/python-modules/torch-audiomentations/default.nix @@ -2,13 +2,15 @@ lib, buildPythonPackage, fetchFromGitHub, - setuptools, - wheel, julius, librosa, + pytest-cov-stub, + pytestCheckHook, + pythonOlder, + setuptools, + torch-pitch-shift, torch, torchaudio, - torch-pitch-shift, }: buildPythonPackage rec { @@ -16,6 +18,8 @@ buildPythonPackage rec { version = "0.11.1"; pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "asteroid-team"; repo = "torch-audiomentations"; @@ -23,7 +27,11 @@ buildPythonPackage rec { hash = "sha256-0+5wc+mP4c221q6mdaqPalfumTOtdnkjnIPtLErOp9E="; }; - propagatedBuildInputs = [ + pythonRelaxDeps = [ "torchaudio" ]; + + build-system = [ setuptools ]; + + dependencies = [ julius librosa torch @@ -31,16 +39,27 @@ buildPythonPackage rec { torch-pitch-shift ]; - nativeBuildInputs = [ - setuptools - wheel + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook ]; pythonImportsCheck = [ "torch_audiomentations" ]; + disabledTestPaths = [ + # librosa issues + "tests/test_mix.py" + "tests/test_convolution.py" + "tests/test_impulse_response.py" + "tests/test_background_noise.py" + ]; + + disabledTests = [ "test_transform_is_differentiable" ]; + meta = with lib; { - description = "Fast audio data augmentation in PyTorch. Inspired by audiomentations. Useful for deep learning"; + description = "Fast audio data augmentation in PyTorch"; homepage = "https://github.com/asteroid-team/torch-audiomentations"; + changelog = "https://github.com/asteroid-team/torch-audiomentations/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ matthewcroughan ]; };