at 22.05-pre 1.1 kB view raw
1{ lib 2, stdenv 3, pythonAtLeast 4, pythonOlder 5, fetchPypi 6, python 7, buildPythonPackage 8, numpy 9, llvmlite 10, setuptools 11, libcxx 12}: 13 14buildPythonPackage rec { 15 version = "0.54.1"; 16 pname = "numba"; 17 disabled = pythonOlder "3.6" || pythonAtLeast "3.10"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "f9dfc803c864edcc2381219b800abf366793400aea55e26d4d5b7d953e14f43f"; 22 }; 23 24 postPatch = '' 25 substituteInPlace setup.py \ 26 --replace "1.21" "1.22" 27 28 substituteInPlace numba/__init__.py \ 29 --replace "(1, 20)" "(1, 21)" 30 ''; 31 32 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; 33 34 propagatedBuildInputs = [ numpy llvmlite setuptools ]; 35 36 # Copy test script into $out and run the test suite. 37 checkPhase = '' 38 ${python.interpreter} -m numba.runtests 39 ''; 40 41 # ImportError: cannot import name '_typeconv' 42 doCheck = false; 43 44 pythonImportsCheck = [ "numba" ]; 45 46 meta = with lib; { 47 homepage = "https://numba.pydata.org/"; 48 license = licenses.bsd2; 49 description = "Compiling Python code using LLVM"; 50 maintainers = with maintainers; [ fridh ]; 51 }; 52}