2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, numpy
|
2022-02-10 20:34:41 +00:00
|
|
|
, packaging
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "numexpr";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "2.8.3";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-14 12:49:19 +00:00
|
|
|
hash = "sha256-y2R8nZx4Xa4HWb9sh1zeK+xHK1w/emAVc0sWGudm0UE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-03 08:41:04 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
2022-02-10 20:34:41 +00:00
|
|
|
packaging
|
2020-12-03 08:41:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
preBuild = ''
|
|
|
|
# Remove existing site.cfg, use the one we built for numpy
|
|
|
|
ln -s ${numpy.cfg} site.cfg
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
runtest="$(pwd)/numexpr/tests/test_numexpr.py"
|
|
|
|
pushd "$out"
|
2020-12-03 08:41:04 +00:00
|
|
|
${python.interpreter} "$runtest"
|
2020-04-24 23:36:52 +00:00
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"numexpr"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast numerical array expression evaluator for NumPy";
|
|
|
|
homepage = "https://github.com/pydata/numexpr";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|