1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 numba,
7 numpy,
8 optuna,
9 pytest-cov-stub,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools,
13 scipy,
14}:
15
16buildPythonPackage rec {
17 pname = "resampy";
18 version = "0.4.3";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "bmcfee";
25 repo = "resampy";
26 tag = version;
27 hash = "sha256-LOWpOPAEK+ga7c3bR15QvnHmON6ARS1Qee/7U/VMlTY=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 numpy
34 numba
35 ];
36
37 optional-dependencies.design = [ optuna ];
38
39 nativeCheckInputs = [
40 pytest-cov-stub
41 pytestCheckHook
42 scipy
43 ]
44 ++ optional-dependencies.design;
45
46 disabledTests = lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
47 # crashing the interpreter
48 "test_quality_sine_parallel"
49 "test_resample_nu_quality_sine_parallel"
50 ];
51
52 pythonImportsCheck = [ "resampy" ];
53
54 meta = with lib; {
55 description = "Efficient signal resampling";
56 homepage = "https://github.com/bmcfee/resampy";
57 license = licenses.isc;
58 maintainers = [ ];
59 };
60}