3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/numexpr/default.nix
Dmitry Kalinkin c184c87571
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>'
2020-07-15 22:11:43 -04:00

37 lines
732 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, python
, numpy
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.7.1";
src = fetchPypi {
inherit pname version;
sha256 = "1c82z0zx0542j9df6ckjz6pn1g13b21hbza4hghcw6vyhbckklmh";
};
# Remove existing site.cfg, use the one we built for numpy.
preBuild = ''
ln -s ${numpy.cfg} site.cfg
'';
propagatedBuildInputs = [ numpy ];
checkPhase = ''
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
pushd "$out"
${python}/bin/${python.executable} "$runtest"
popd
'';
meta = {
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
license = lib.licenses.mit;
};
}