Merge pull request #241351 from yl3dy/pyamg_enable_tests

python3Packages.pyamg: enable tests
This commit is contained in:
Nick Cao 2023-07-04 10:41:32 +08:00 committed by GitHub
commit 0367d6aab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
, numpy
, scipy
, pytest
, python
, pybind11
, setuptools-scm
, pythonOlder
@ -32,12 +33,16 @@ buildPythonPackage rec {
pybind11
];
# 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()"
# '';
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"