Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 42 lines 1.0 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.53.0"; 16 pname = "numba"; 17 # uses f-strings, python 3.9 is not yet supported 18 disabled = pythonOlder "3.6" || pythonAtLeast "3.9"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "55c11d7edbba2ba715f2b56f5294cad55cfd87bff98e2627c3047c2d5cc52d16"; 23 }; 24 25 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; 26 27 propagatedBuildInputs = [ numpy llvmlite setuptools ]; 28 pythonImportsCheck = [ "numba" ]; 29 # Copy test script into $out and run the test suite. 30 checkPhase = '' 31 ${python.interpreter} -m numba.runtests 32 ''; 33 # ImportError: cannot import name '_typeconv' 34 doCheck = false; 35 36 meta = with lib; { 37 homepage = "http://numba.pydata.org/"; 38 license = licenses.bsd2; 39 description = "Compiling Python code using LLVM"; 40 maintainers = with maintainers; [ fridh ]; 41 }; 42}