1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 meson-python,
7 cython,
8 pytestCheckHook,
9 numpy,
10}:
11
12buildPythonPackage rec {
13 pname = "pywavelets";
14 version = "1.9.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchFromGitHub {
20 owner = "PyWavelets";
21 repo = "pywt";
22 tag = "v${version}";
23 hash = "sha256-UVQWZPuOyUPcWI3cV2u+jQyAZN/RV3aKAT6BQxqRE4M=";
24 };
25
26 build-system = [
27 meson-python
28 cython
29 numpy
30 ];
31
32 dependencies = [ numpy ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 preCheck = ''
37 cd $out
38 '';
39
40 # ensure compiled modules are present
41 pythonImportsCheck = [
42 "pywt"
43 "pywt._extensions._cwt"
44 "pywt._extensions._dwt"
45 "pywt._extensions._pywt"
46 "pywt._extensions._swt"
47 ];
48
49 meta = with lib; {
50 description = "Wavelet transform module";
51 homepage = "https://github.com/PyWavelets/pywt";
52 changelog = "https://github.com/PyWavelets/pywt/releases/tag/${src.tag}";
53 license = licenses.mit;
54 };
55}