nixpkgs/pkgs/development/python-modules/numba/default.nix

43 lines
1015 B
Nix
Raw Normal View History

{ lib
, stdenv
, pythonAtLeast
, pythonOlder
2017-12-30 11:25:04 +00:00
, fetchPypi
, python
, buildPythonPackage
, numpy
, llvmlite
, setuptools
, libcxx
}:
buildPythonPackage rec {
2021-02-27 16:58:34 +00:00
version = "0.52.0";
pname = "numba";
# uses f-strings, python 3.9 is not yet supported
disabled = pythonOlder "3.6" || pythonAtLeast "3.9";
2017-12-30 11:25:04 +00:00
src = fetchPypi {
inherit pname version;
2021-02-27 16:58:34 +00:00
sha256 = "44661c5bd85e3d3619be0a40eedee34e397e9ccb3d4c458b70e10bf95d1ce933";
};
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
propagatedBuildInputs = [ numpy llvmlite setuptools ];
pythonImportsCheck = [ "numba" ];
# Copy test script into $out and run the test suite.
checkPhase = ''
2017-12-30 11:25:04 +00:00
${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 ];
};
2017-02-13 10:00:12 +00:00
}