1{ stdenv
2, pythonOlder
3, fetchPypi
4, python
5, buildPythonPackage
6, isPy27
7, isPy3k
8, numpy
9, llvmlite
10, funcsigs
11, singledispatch
12, libcxx
13}:
14
15buildPythonPackage rec {
16 version = "0.51.1";
17 pname = "numba";
18 # uses f-strings
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "1e765b1a41535684bf3b0465c1d0a24dcbbff6af325270c8f4dad924c0940160";
24 };
25
26 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
27
28 propagatedBuildInputs = [numpy llvmlite]
29 ++ stdenv.lib.optionals isPy27 [ funcsigs singledispatch];
30
31 # Copy test script into $out and run the test suite.
32 checkPhase = ''
33 ${python.interpreter} -m numba.runtests
34 '';
35 # ImportError: cannot import name '_typeconv'
36 doCheck = false;
37
38 meta = {
39 homepage = "http://numba.pydata.org/";
40 license = stdenv.lib.licenses.bsd2;
41 description = "Compiling Python code using LLVM";
42 maintainers = with stdenv.lib.maintainers; [ fridh ];
43 };
44}