mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 21:04:30 +00:00
Merge pull request #241351 from yl3dy/pyamg_enable_tests
python3Packages.pyamg: enable tests
This commit is contained in:
commit
0367d6aab8
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user