nixpkgs/pkgs/development/python-modules/numexpr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
953 B
Nix
Raw Normal View History

2017-12-29 17:56:37 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, numpy
2022-01-22 00:10:58 +00:00
, packaging
, python
, pythonOlder
2017-12-29 17:56:37 +00:00
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.8.3";
2022-01-22 00:10:58 +00:00
format = "setuptools";
disabled = pythonOlder "3.6";
2017-12-29 17:56:37 +00:00
src = fetchPypi {
inherit pname version;
hash = "sha256-y2R8nZx4Xa4HWb9sh1zeK+xHK1w/emAVc0sWGudm0UE=";
2017-12-29 17:56:37 +00:00
};
2020-11-19 21:04:46 +00:00
nativeBuildInputs = [
numpy
];
propagatedBuildInputs = [
numpy
2022-01-22 00:10:58 +00:00
packaging
2020-11-19 21:04:46 +00:00
];
2017-12-29 17:56:37 +00:00
2022-01-22 00:10:58 +00:00
preBuild = ''
# Remove existing site.cfg, use the one we built for numpy
ln -s ${numpy.cfg} site.cfg
'';
2017-12-29 17:56:37 +00:00
checkPhase = ''
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
pushd "$out"
2020-11-19 21:04:46 +00:00
${python.interpreter} "$runtest"
2018-08-25 16:41:12 +00:00
popd
2017-12-29 17:56:37 +00:00
'';
2022-01-22 00:10:58 +00:00
pythonImportsCheck = [
"numexpr"
];
meta = with lib; {
2017-12-29 17:56:37 +00:00
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
2022-01-22 00:10:58 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2017-12-29 17:56:37 +00:00
};
}