blob: 2fb5afb144009cddeee8ecc6bebb9198fafccc0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{
lib,
buildPythonPackage,
fetchPypi,
numpy,
scipy,
pytest,
python,
pybind11,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "pyamg";
version = "5.2.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-9EnZNCJOUDQB7nLNLuzhop2JO3q+NfYqRNUrqDEZjvo=";
};
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
numpy
scipy
pytest
pybind11
];
checkPhase = ''
runHook preCheck
# 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`.
# It's easier to just remove the package directory in PWD.
rm -r pyamg
${python.interpreter} -c "import pyamg; pyamg.test()"
runHook postCheck
'';
pythonImportsCheck = [
"pyamg"
"pyamg.amg_core.evolution_strength"
];
meta = {
description = "Algebraic Multigrid Solvers in Python";
homepage = "https://github.com/pyamg/pyamg";
changelog = "https://github.com/pyamg/pyamg/blob/v${version}/changelog.md";
license = lib.licenses.mit;
maintainers = [ ];
};
}
|