1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, numpy 6}: 7 8buildPythonPackage rec { 9 pname = "numexpr"; 10 version = "2.6.8"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "ee8bc7201aa2f1962c67d27c326a11eef9df887d7b87b1278a1d4e722bf44375"; 15 }; 16 17 propagatedBuildInputs = [ numpy ]; 18 19 # Run the test suite. 20 # It requires the build path to be in the python search path. 21 checkPhase = '' 22 pushd $out 23 ${python}/bin/${python.executable} <<EOF 24 import sys 25 import numexpr 26 r = numexpr.test() 27 if not r.wasSuccessful(): 28 sys.exit(1) 29 EOF 30 popd 31 ''; 32 33 meta = { 34 description = "Fast numerical array expression evaluator for NumPy"; 35 homepage = "https://github.com/pydata/numexpr"; 36 license = lib.licenses.mit; 37 }; 38}