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