diff --git a/pkgs/development/python-modules/pyamg/default.nix b/pkgs/development/python-modules/pyamg/default.nix index bf46734df514..59e807f11fcb 100644 --- a/pkgs/development/python-modules/pyamg/default.nix +++ b/pkgs/development/python-modules/pyamg/default.nix @@ -5,6 +5,7 @@ , scipy , pytest , pybind11 +, setuptools-scm }: buildPythonPackage rec { @@ -16,6 +17,10 @@ buildPythonPackage rec { sha256 = "48d9be622049d8363cda84125c45d18b89e0ab7d99be5a93c0246f375ebad344"; }; + nativeBuildInputs = [ + setuptools-scm + ]; + propagatedBuildInputs = [ numpy scipy @@ -23,9 +28,17 @@ buildPythonPackage rec { pybind11 ]; - preBuild = '' - export HOME=$(mktemp -d) - ''; + # failed with "ModuleNotFoundError: No module named 'pyamg.amg_core.evolution_strength'" + doCheck = false; + # taken from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-pyamg#n27 + # checkPhase = '' + # PYTHONPATH="$PWD/build/lib.linux-*:$PYTHONPATH" ${python3.interpreter} -c "import pyamg; pyamg.test()" + # ''; + + pythonImportsCheck = [ + "pyamg" + "pyamg.amg_core.evolution_strength" + ]; meta = with lib; { description = "Algebraic Multigrid Solvers in Python";