python3Packages.numexpr: add packaging

This commit is contained in:
Fabian Affolter 2022-01-22 01:10:58 +01:00 committed by Martin Weinelt
parent d4528ddd5b
commit 3021297744

View file

@ -1,32 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, python
, numpy
, packaging
, python
, pythonOlder
}:
buildPythonPackage rec {
pname = "numexpr";
version = "2.8.1";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "cd779aa44dd986c4ef10163519239602b027be06a527946656207acf1f58113b";
hash = "sha256-zXeapE3ZhsTvEBY1GSOWArAnvgalJ5RmViB6zx9YETs=";
};
# Remove existing site.cfg, use the one we built for numpy.
preBuild = ''
ln -s ${numpy.cfg} site.cfg
'';
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"
@ -34,9 +40,14 @@ buildPythonPackage rec {
popd
'';
meta = {
pythonImportsCheck = [
"numexpr"
];
meta = with lib; {
description = "Fast numerical array expression evaluator for NumPy";
homepage = "https://github.com/pydata/numexpr";
license = lib.licenses.mit;
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}