1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-18 15:39:46 +03:00
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 18:56:37 +01:00
{ lib
, buildPythonPackage
, fetchPypi
, numpy
2022-01-22 01:10:58 +01:00
, packaging
, python
, pythonOlder
2017-12-29 18:56:37 +01:00
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.8.1";
2022-01-22 01:10:58 +01:00
format = "setuptools";
disabled = pythonOlder "3.6";
2017-12-29 18:56:37 +01:00
src = fetchPypi {
inherit pname version;
2022-01-22 01:10:58 +01:00
hash = "sha256-zXeapE3ZhsTvEBY1GSOWArAnvgalJ5RmViB6zx9YETs=";
2017-12-29 18:56:37 +01:00
};
2020-11-19 22:04:46 +01:00
nativeBuildInputs = [
numpy
];
propagatedBuildInputs = [
numpy
2022-01-22 01:10:58 +01:00
packaging
2020-11-19 22:04:46 +01:00
];
2017-12-29 18:56:37 +01:00
2022-01-22 01:10:58 +01:00
preBuild = ''
# Remove existing site.cfg, use the one we built for numpy
ln -s ${numpy.cfg} site.cfg
'';
2017-12-29 18:56:37 +01:00
checkPhase = ''
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
pushd "$out"
2020-11-19 22:04:46 +01:00
${python.interpreter} "$runtest"
2018-08-25 18:41:12 +02:00
popd
2017-12-29 18:56:37 +01:00
'';
2022-01-22 01:10:58 +01:00
pythonImportsCheck = [
"numexpr"
];
meta = with lib; {
2017-12-29 18:56:37 +01:00
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
2022-01-22 01:10:58 +01:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2017-12-29 18:56:37 +01:00
};
}