Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 732 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, numpy 6}: 7 8buildPythonPackage rec { 9 pname = "numexpr"; 10 version = "2.7.1"; 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "1c82z0zx0542j9df6ckjz6pn1g13b21hbza4hghcw6vyhbckklmh"; 15 }; 16 17 # Remove existing site.cfg, use the one we built for numpy. 18 preBuild = '' 19 ln -s ${numpy.cfg} site.cfg 20 ''; 21 22 propagatedBuildInputs = [ numpy ]; 23 24 checkPhase = '' 25 runtest="$(pwd)/numexpr/tests/test_numexpr.py" 26 pushd "$out" 27 ${python}/bin/${python.executable} "$runtest" 28 popd 29 ''; 30 31 meta = { 32 description = "Fast numerical array expression evaluator for NumPy"; 33 homepage = "https://github.com/pydata/numexpr"; 34 license = lib.licenses.mit; 35 }; 36}