depot/third_party/nixpkgs/pkgs/development/python-modules/numexpr/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

53 lines
953 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, numpy
, packaging
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.8.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-zXeapE3ZhsTvEBY1GSOWArAnvgalJ5RmViB6zx9YETs=";
};
nativeBuildInputs = [
numpy
];
propagatedBuildInputs = [
numpy
packaging
];
preBuild = ''
# Remove existing site.cfg, use the one we built for numpy
ln -s ${numpy.cfg} site.cfg
'';
checkPhase = ''
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
pushd "$out"
${python.interpreter} "$runtest"
popd
'';
pythonImportsCheck = [
"numexpr"
];
meta = with lib; {
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}