2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
|
|
|
, cython
|
|
|
|
, nose
|
|
|
|
, pytest
|
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyWavelets";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-ZDevPd8IMRjCbY+Xq0OwckuVbJ+Vjp6niGWfaig0upM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nose pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ cython ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ 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
|
|
|
|
'';
|
|
|
|
|
|
|
|
# ensure compiled modules are present
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pywt"
|
|
|
|
"pywt._extensions._cwt"
|
|
|
|
"pywt._extensions._dwt"
|
|
|
|
"pywt._extensions._pywt"
|
|
|
|
"pywt._extensions._swt"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Wavelet transform module";
|
|
|
|
homepage = "https://github.com/PyWavelets/pywt";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|