1{
2 stdenv,
3 lib,
4 pythonOlder,
5 buildPythonPackage,
6 fetchFromGitHub,
7 numpy,
8 scipy,
9 pandas,
10 matplotlib,
11 tox,
12 coverage,
13 flake8,
14 nbval,
15 pyvisa,
16 networkx,
17 ipython,
18 ipykernel,
19 ipywidgets,
20 jupyter-client,
21 sphinx-rtd-theme,
22 sphinx,
23 nbsphinx,
24 openpyxl,
25 qtpy,
26 pyqtgraph,
27 pyqt5,
28 setuptools,
29 pytestCheckHook,
30 pytest-cov,
31 pytest-mock,
32}:
33
34buildPythonPackage rec {
35 pname = "scikit-rf";
36 version = "1.1.0";
37 pyproject = true;
38
39 disabled = pythonOlder "3.7";
40
41 src = fetchFromGitHub {
42 owner = "scikit-rf";
43 repo = pname;
44 rev = "refs/tags/v${version}";
45 hash = "sha256-xLgttefCRj8U2Wqif/28FiSjPjQn9YYCB+stlhZiIUo=";
46 };
47
48 buildInputs = [ setuptools ];
49
50 propagatedBuildInputs = [
51 numpy
52 scipy
53 pandas
54 ];
55
56 passthru.optional-dependencies = {
57 plot = [ matplotlib ];
58 xlsx = [ openpyxl ];
59 netw = [ networkx ];
60 visa = [ pyvisa ];
61 docs = [
62 ipython
63 ipykernel
64 ipywidgets
65 jupyter-client
66 sphinx-rtd-theme
67 sphinx
68 nbsphinx
69 openpyxl
70 ];
71 qtapps = [
72 qtpy
73 pyqtgraph
74 pyqt5
75 ];
76 };
77
78 nativeCheckInputs = [
79 tox
80 coverage
81 flake8
82 pytest-cov
83 pytest-mock
84 nbval
85 matplotlib
86 pyvisa
87 openpyxl
88 networkx
89 ];
90
91 checkInputs = [ pytestCheckHook ];
92
93 # test_calibration.py generates a divide by zero error on darwin
94 # https://github.com/scikit-rf/scikit-rf/issues/972
95 disabledTestPaths = lib.optional (
96 stdenv.isAarch64 && stdenv.isDarwin
97 ) "skrf/calibration/tests/test_calibration.py";
98
99 pythonImportsCheck = [ "skrf" ];
100
101 meta = with lib; {
102 description = "Python library for RF/Microwave engineering";
103 homepage = "https://scikit-rf.org/";
104 changelog = "https://github.com/scikit-rf/scikit-rf/releases/tag/v${version}";
105 license = licenses.bsd3;
106 maintainers = with maintainers; [ lugarun ];
107 };
108}