about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pywavelets/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/pywavelets/default.nix')
-rw-r--r--pkgs/development/python-modules/pywavelets/default.nix45
1 files changed, 28 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/pywavelets/default.nix b/pkgs/development/python-modules/pywavelets/default.nix
index a4d8117fc3720..af598a1439caf 100644
--- a/pkgs/development/python-modules/pywavelets/default.nix
+++ b/pkgs/development/python-modules/pywavelets/default.nix
@@ -1,34 +1,44 @@
 { lib
 , buildPythonPackage
-, fetchPypi
-, isPy27
+, fetchFromGitHub
+, pythonOlder
+, meson-python
 , cython
-, nose
-, pytest
+, pytestCheckHook
 , numpy
 }:
 
 buildPythonPackage rec {
   pname = "pywavelets";
-  version = "1.4.1";
-  disabled = isPy27;
+  version = "1.6.0";
+  pyproject = true;
 
-  src = fetchPypi {
-    pname = "PyWavelets";
-    inherit version;
-    hash = "sha256-ZDevPd8IMRjCbY+Xq0OwckuVbJ+Vjp6niGWfaig0upM=";
+  disabled = pythonOlder "3.9";
+
+  src = fetchFromGitHub {
+    owner = "PyWavelets";
+    repo = "pywt";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-Dr6LWGVlYGDD21l1RQ7elScovcen5uuFdJJXe3deB5o=";
   };
 
-  nativeCheckInputs = [ nose pytest ];
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail '"numpy>=2.0.0rc1,<2.3",' ""
+  '';
+
+  build-system = [
+    meson-python
+    cython
+    numpy
+  ];
 
-  buildInputs = [ cython ];
+  dependencies = [ numpy ];
 
-  propagatedBuildInputs = [ numpy ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
-  # Somehow nosetests doesn't run the tests, so let's use pytest instead
-  doCheck = false; # tests use relative paths, which fail to resolve
-  checkPhase = ''
-    py.test pywt/tests
+  preCheck = ''
+    cd $out
   '';
 
   # ensure compiled modules are present
@@ -43,6 +53,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "Wavelet transform module";
     homepage = "https://github.com/PyWavelets/pywt";
+    changelog = "https://github.com/PyWavelets/pywt/releases/tag/v${version}";
     license = licenses.mit;
   };