1{ lib
2, buildPythonPackage
3, fetchPypi
4, python
5, numpy
6}:
7
8buildPythonPackage rec {
9 pname = "numexpr";
10 version = "2.7.3";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "43616529f9b7d1afc83386f943dc66c4da5e052f00217ba7e3ad8dd1b5f3a825";
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 nativeBuildInputs = [
23 numpy
24 ];
25
26 propagatedBuildInputs = [
27 numpy
28 ];
29
30 checkPhase = ''
31 runtest="$(pwd)/numexpr/tests/test_numexpr.py"
32 pushd "$out"
33 ${python.interpreter} "$runtest"
34 popd
35 '';
36
37 meta = {
38 description = "Fast numerical array expression evaluator for NumPy";
39 homepage = "https://github.com/pydata/numexpr";
40 license = lib.licenses.mit;
41 };
42}