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