1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, packaging
6, python
7, pythonOlder
8}:
9
10buildPythonPackage rec {
11 pname = "numexpr";
12 version = "2.8.6";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.6";
16
17 src = fetchPypi {
18 inherit pname version;
19 hash = "sha256-Yzb426P0VuQaT/w8l+tj2JxzWJ/24XBxQSJLkwJjJg0=";
20 };
21
22 nativeBuildInputs = [
23 numpy
24 ];
25
26 propagatedBuildInputs = [
27 numpy
28 packaging
29 ];
30
31 preBuild = ''
32 # Remove existing site.cfg, use the one we built for numpy
33 ln -s ${numpy.cfg} site.cfg
34 '';
35
36 checkPhase = ''
37 runtest="$(pwd)/numexpr/tests/test_numexpr.py"
38 pushd "$out"
39 ${python.interpreter} "$runtest"
40 popd
41 '';
42
43 pythonImportsCheck = [
44 "numexpr"
45 ];
46
47 meta = with lib; {
48 description = "Fast numerical array expression evaluator for NumPy";
49 homepage = "https://github.com/pydata/numexpr";
50 license = licenses.mit;
51 maintainers = with maintainers; [ ];
52 };
53}