2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
meson-python,
|
|
|
|
cython,
|
|
|
|
pytestCheckHook,
|
|
|
|
numpy,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "pywavelets";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.6.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyWavelets";
|
|
|
|
repo = "pywt";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Dr6LWGVlYGDD21l1RQ7elScovcen5uuFdJJXe3deB5o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail '"numpy>=2.0.0rc1,<2.3",' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
meson-python
|
|
|
|
cython
|
|
|
|
numpy
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [ numpy ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
preCheck = ''
|
|
|
|
cd $out
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/PyWavelets/pywt/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|