diff options
Diffstat (limited to 'pkgs/development/python-modules/pywavelets/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pywavelets/default.nix | 55 |
1 files changed, 33 insertions, 22 deletions
diff --git a/pkgs/development/python-modules/pywavelets/default.nix b/pkgs/development/python-modules/pywavelets/default.nix index a4d8117fc3720..149b9fb57fd83 100644 --- a/pkgs/development/python-modules/pywavelets/default.nix +++ b/pkgs/development/python-modules/pywavelets/default.nix @@ -1,34 +1,45 @@ -{ lib -, buildPythonPackage -, fetchPypi -, isPy27 -, cython -, nose -, pytest -, numpy +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + meson-python, + cython, + 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",' "" + ''; - buildInputs = [ cython ]; + build-system = [ + meson-python + cython + numpy + ]; - propagatedBuildInputs = [ numpy ]; + dependencies = [ numpy ]; - # 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 + nativeCheckInputs = [ pytestCheckHook ]; + + preCheck = '' + cd $out ''; # ensure compiled modules are present @@ -43,7 +54,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; }; - } |