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 = pname;
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 ] ++ optional-dependencies.design;
44
45 disabledTests = lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
46 # crashing the interpreter
47 "test_quality_sine_parallel"
48 "test_resample_nu_quality_sine_parallel"
49 ];
50
51 pythonImportsCheck = [ "resampy" ];
52
53 meta = with lib; {
54 description = "Efficient signal resampling";
55 homepage = "https://github.com/bmcfee/resampy";
56 license = licenses.isc;
57 maintainers = [ ];
58 };
59}