evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pyamg / default.nix
blobe0a983c6bbc55f32a38636d0a36428f82a981d2c
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   numpy,
6   scipy,
7   pytest,
8   python,
9   pybind11,
10   setuptools-scm,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "pyamg";
16   version = "5.2.1";
17   pyproject = true;
19   disabled = pythonOlder "3.9";
21   src = fetchPypi {
22     inherit pname version;
23     hash = "sha256-9EnZNCJOUDQB7nLNLuzhop2JO3q+NfYqRNUrqDEZjvo=";
24   };
26   nativeBuildInputs = [ setuptools-scm ];
28   propagatedBuildInputs = [
29     numpy
30     scipy
31     pytest
32     pybind11
33   ];
35   checkPhase = ''
36     runHook preCheck
38     # The `pyamg` directory in PWD doesn't have the compiled Cython modules in it, but has higher import priority compared to the properly built and installed `pyamg`.
39     # It's easier to just remove the package directory in PWD.
40     rm -r pyamg
41     ${python.interpreter} -c "import pyamg; pyamg.test()"
43     runHook postCheck
44   '';
46   pythonImportsCheck = [
47     "pyamg"
48     "pyamg.amg_core.evolution_strength"
49   ];
51   meta = with lib; {
52     description = "Algebraic Multigrid Solvers in Python";
53     homepage = "https://github.com/pyamg/pyamg";
54     changelog = "https://github.com/pyamg/pyamg/blob/v${version}/changelog.md";
55     license = licenses.mit;
56     maintainers = [ ];
57   };