nixpkgs/pkgs/development/python-modules/numba/default.nix
2021-07-05 12:34:02 -07:00

42 lines
975 B
Nix

{ lib
, stdenv
, pythonAtLeast
, pythonOlder
, fetchPypi
, python
, buildPythonPackage
, numpy
, llvmlite
, setuptools
, libcxx
}:
buildPythonPackage rec {
version = "0.53.1";
pname = "numba";
disabled = pythonOlder "3.6" || pythonAtLeast "3.10";
src = fetchPypi {
inherit pname version;
sha256 = "9cd4e5216acdc66c4e9dab2dfd22ddb5bef151185c070d4a3cd8e78638aff5b0";
};
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
propagatedBuildInputs = [ numpy llvmlite setuptools ];
pythonImportsCheck = [ "numba" ];
# Copy test script into $out and run the test suite.
checkPhase = ''
${python.interpreter} -m numba.runtests
'';
# ImportError: cannot import name '_typeconv'
doCheck = false;
meta = with lib; {
homepage = "http://numba.pydata.org/";
license = licenses.bsd2;
description = "Compiling Python code using LLVM";
maintainers = with maintainers; [ fridh ];
};
}