Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.6.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.9"; 18 19 src = fetchFromGitHub { 20 owner = "PyWavelets"; 21 repo = "pywt"; 22 rev = "refs/tags/v${version}"; 23 hash = "sha256-Dr6LWGVlYGDD21l1RQ7elScovcen5uuFdJJXe3deB5o="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace-fail '"numpy>=2.0.0rc1,<2.3",' "" 29 ''; 30 31 build-system = [ 32 meson-python 33 cython 34 numpy 35 ]; 36 37 dependencies = [ numpy ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 preCheck = '' 42 cd $out 43 ''; 44 45 # ensure compiled modules are present 46 pythonImportsCheck = [ 47 "pywt" 48 "pywt._extensions._cwt" 49 "pywt._extensions._dwt" 50 "pywt._extensions._pywt" 51 "pywt._extensions._swt" 52 ]; 53 54 meta = with lib; { 55 description = "Wavelet transform module"; 56 homepage = "https://github.com/PyWavelets/pywt"; 57 changelog = "https://github.com/PyWavelets/pywt/releases/tag/v${version}"; 58 license = licenses.mit; 59 }; 60}