mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
c184c87571
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>'
37 lines
732 B
Nix
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;
|
|
};
|
|
}
|