1{
2 lib,
3 buildPythonPackage,
4 cvxopt,
5 fetchFromGitHub,
6 matplotlib,
7 numpy,
8 numpydoc,
9 pytest-timeout,
10 pytestCheckHook,
11 scipy,
12 setuptools-scm,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "control";
18 version = "0.10.2";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "python-control";
23 repo = "python-control";
24 tag = version;
25 hash = "sha256-E9RZDUK01hzjutq83XdLr3d97NwjmQzt65hqVg2TBGE=";
26 };
27
28 build-system = [
29 setuptools
30 setuptools-scm
31 ];
32
33 dependencies = [
34 numpy
35 scipy
36 matplotlib
37 ];
38
39 optional-dependencies = {
40 # slycot is not in nixpkgs
41 # slycot = [ slycot ];
42 cvxopt = [ cvxopt ];
43 };
44
45 nativeCheckInputs = [
46 numpydoc
47 pytest-timeout
48 pytestCheckHook
49 ]
50 ++ lib.flatten (builtins.attrValues optional-dependencies);
51
52 pythonImportsCheck = [ "control" ];
53
54 disabledTestPaths = [
55 # Don't test the docs
56 "doc/test_sphinxdocs.py"
57 ];
58
59 meta = {
60 description = "Python Control Systems Library";
61 changelog = "https://github.com/python-control/python-control/releases/tag/${src.tag}";
62 homepage = "https://github.com/python-control/python-control";
63 license = lib.licenses.bsd3;
64 maintainers = with lib.maintainers; [ Peter3579 ];
65 };
66}