pythonPackages.numexpr: fix darwin build by refactoring checkPhase

This fixes a following error on python 3.8:

FileNotFoundError: [Errno 2] No such file or directory: '/nix/store/0s7kw66pav5c7bi38lb0gznxnxz31a1n-python3.8-numexpr-2.7.1/<stdin>'
This commit is contained in:
Dmitry Kalinkin 2020-07-15 22:11:43 -04:00
parent 4af55b773f
commit c184c87571
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333

View File

@ -21,17 +21,10 @@ buildPythonPackage rec {
propagatedBuildInputs = [ numpy ];
# Run the test suite.
# It requires the build path to be in the python search path.
checkPhase = ''
pushd $out
${python}/bin/${python.executable} <<EOF
import sys
import numexpr
r = numexpr.test()
if not r.wasSuccessful():
sys.exit(1)
EOF
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
pushd "$out"
${python}/bin/${python.executable} "$runtest"
popd
'';