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";
|
2022-06-26 04:05:20 +00:00
|
|
|
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;
|
2022-06-26 04:05:20 +00:00
|
|
|
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 = ''
|
2020-07-16 02:11:43 +00:00
|
|
|
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
|
|
|
};
|
2018-10-23 21:33:49 +00:00
|
|
|
}
|