1{ lib
2, buildPythonPackage
3, fetchPypi
4, flit-core
5, matplotlib
6, numpy
7, pandas
8, pytestCheckHook
9, pythonOlder
10, scipy
11, tabulate
12}:
13
14buildPythonPackage rec {
15 pname = "acoustics";
16 version = "0.2.6";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-0CvMhCUc+i7dPiHH+IXdlj+OjFh/l1wvnU4dmxQrzFI=";
23 };
24 format = "pyproject";
25
26 nativeBuildInputs = [ flit-core ];
27
28 propagatedBuildInputs = [
29 matplotlib
30 numpy
31 pandas
32 scipy
33 tabulate
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 preCheck = ''
41 export HOME=$TMPDIR
42 mkdir -p $HOME/.matplotlib
43 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
44 '';
45
46 pytestFlagsArray = [
47 "-Wignore::DeprecationWarning"
48 ];
49
50 disabledTestPaths = [
51 # ValueError: Unknown window type: "hanning"
52 "tests/standards/test_iso_1996_2_2007.py"
53 ];
54
55 pythonImportsCheck = [ "acoustics" ];
56
57 meta = with lib; {
58 description = "Python package for acousticians";
59 maintainers = with maintainers; [ fridh ];
60 license = with licenses; [ bsd3 ];
61 homepage = "https://github.com/python-acoustics/python-acoustics";
62 };
63}