1{ stdenv
2, lib
3, buildPythonPackage
4, fetchPypi
5, scipy
6, numba
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "numba-scipy";
13 version = "0.3.1";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-cApTGH5GJZH/RbkRjKhL3injvixD5kvfaS49FjrPA2U=";
21 };
22
23 propagatedBuildInputs = [
24 scipy
25 numba
26 ];
27
28 postPatch = ''
29 # https://github.com/numba/numba-scipy/pull/76
30 substituteInPlace setup.py \
31 --replace "scipy>=0.16,<=1.7.3" "scipy>=0.16"
32 '';
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "numba_scipy"
40 ];
41
42 meta = with lib; {
43 broken = stdenv.isDarwin;
44 description = "Extends Numba to make it aware of SciPy";
45 homepage = "https://github.com/numba/numba-scipy";
46 changelog = "https://github.com/numba/numba-scipy/blob/master/CHANGE_LOG";
47 license = licenses.bsd2;
48 maintainers = with maintainers; [ Etjean ];
49 };
50}