2018-07-20 07:38:08 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-10-26 23:39:46 +02:00
|
|
|
, isPy27
|
2018-07-20 07:38:08 +02:00
|
|
|
, cython
|
|
|
|
, nose
|
|
|
|
, pytest
|
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "PyWavelets";
|
2019-10-24 08:47:46 +02:00
|
|
|
version = "1.1.1";
|
2019-10-26 23:39:46 +02:00
|
|
|
disabled = isPy27;
|
2018-07-20 07:38:08 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-24 08:47:46 +02:00
|
|
|
sha256 = "1a64b40f6acb4ffbaccce0545d7fc641744f95351f62e4c6aaa40549326008c9";
|
2018-07-20 07:38:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ nose pytest ];
|
|
|
|
|
|
|
|
buildInputs = [ cython ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy ];
|
|
|
|
|
|
|
|
# Somehow nosetests doesn't run the tests, so let's use pytest instead
|
2019-10-26 23:39:46 +02:00
|
|
|
doCheck = false; # tests use relative paths, which fail to resolve
|
2018-07-20 07:38:08 +02:00
|
|
|
checkPhase = ''
|
|
|
|
py.test pywt/tests
|
|
|
|
'';
|
|
|
|
|
2019-10-26 23:39:46 +02:00
|
|
|
# ensure compiled modules are present
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pywt"
|
|
|
|
"pywt._extensions._cwt"
|
|
|
|
"pywt._extensions._dwt"
|
|
|
|
"pywt._extensions._pywt"
|
|
|
|
"pywt._extensions._swt"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-07-20 07:38:08 +02:00
|
|
|
description = "Wavelet transform module";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PyWavelets/pywt";
|
2019-10-26 23:39:46 +02:00
|
|
|
license = licenses.mit;
|
2018-07-20 07:38:08 +02:00
|
|
|
};
|
|
|
|
|
2019-10-26 23:39:46 +02:00
|
|
|
}
|