about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pydmd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pydmd/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pydmd/default.nix83
1 files changed, 47 insertions, 36 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pydmd/default.nix b/nixpkgs/pkgs/development/python-modules/pydmd/default.nix
index d77caf7e4ad0..3cf1f14f70e2 100644
--- a/nixpkgs/pkgs/development/python-modules/pydmd/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pydmd/default.nix
@@ -2,57 +2,68 @@
 , stdenv
 , buildPythonPackage
 , fetchFromGitHub
+, setuptools
 , future
 , matplotlib
 , numpy
 , pytestCheckHook
+, pytest-mock
 , pythonOlder
 , scipy
 , ezyrb
 }:
 
-buildPythonPackage rec {
-  pname = "pydmd";
-  version = "0.4.0.post2302";
-  format = "setuptools";
+let
+  self = buildPythonPackage rec {
+    pname = "pydmd";
+    version = "1.0.0";
+    pyproject = true;
 
-  disabled = pythonOlder "3.6";
+    disabled = pythonOlder "3.6";
 
-  src = fetchFromGitHub {
-    owner = "mathLab";
-    repo = "PyDMD";
-    rev = "refs/tags/v${version}";
-    hash = "sha256-EYVmaxwOxje3KVrNbvsjwRqQBD7Rje/JK+qB1F7EqA0=";
-  };
+    src = fetchFromGitHub {
+      owner = "PyDMD";
+      repo = "PyDMD";
+      rev = "refs/tags/v${version}";
+      hash = "sha256-vprvq3sl/eNtu4cqg0A4XV96dzUt0nOtPmfwEv0h+PI=";
+    };
 
-  propagatedBuildInputs = [
-    future
-    matplotlib
-    numpy
-    scipy
-    ezyrb
+    build-system = [
+      setuptools
   ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+    propagatedBuildInputs = [
+      future
+      matplotlib
+      numpy
+      scipy
+      ezyrb
+    ];
 
-  pytestFlagsArray = [
-    # test suite takes over 100 vCPU hours, just run small subset of it.
-    # TODO: Add a passthru.tests with all tests
-    "tests/test_dmdbase.py"
-  ];
+    nativeCheckInputs = [
+      pytestCheckHook
+      pytest-mock
+    ];
 
-  pythonImportsCheck = [
-    "pydmd"
-  ];
+    pytestFlagsArray = [
+      "tests/test_dmdbase.py"
+    ];
+
+    pythonImportsCheck = [
+      "pydmd"
+    ];
+
+    passthru.tests = self.overrideAttrs (old: {
+      pytestFlagsArray = [];
+    });
 
-  meta = with lib; {
-    description = "Python Dynamic Mode Decomposition";
-    homepage = "https://mathlab.github.io/PyDMD/";
-    changelog = "https://github.com/mathLab/PyDMD/releases/tag/v${version}";
-    license = licenses.mit;
-    maintainers = with maintainers; [ yl3dy ];
-    broken = stdenv.hostPlatform.isAarch64;
+    meta = with lib; {
+      description = "Python Dynamic Mode Decomposition";
+      homepage = "https://pydmd.github.io/PyDMD/";
+      changelog = "https://github.com/PyDMD/PyDMD/releases/tag/v${version}";
+      license = licenses.mit;
+      maintainers = with maintainers; [ yl3dy ];
+      broken = stdenv.hostPlatform.isAarch64;
+    };
   };
-}
+in self