summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/reikna/default.nix
blob: 2b4a0b02b8c41c6740d801ba18d7309523668306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  fetchPypi,
  buildPythonPackage,
  sphinx,
  pytest-cov-stub,
  pytestCheckHook,
  mako,
  numpy,
  funcsigs,
  withCuda ? false,
  pycuda,
  withOpenCL ? true,
  pyopencl,
}:

buildPythonPackage rec {
  pname = "reikna";
  version = "0.9.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-uzIoGCkIINgmO+r0vAzmihS14GWv5ygakMz3tKIG3zA=";
  };

  nativeCheckInputs = [
    sphinx
    pytest-cov-stub
    pytestCheckHook
  ];

  propagatedBuildInputs = [
    mako
    numpy
    funcsigs
  ]
  ++ lib.optional withCuda pycuda
  ++ lib.optional withOpenCL pyopencl;

  # Requires device
  doCheck = false;

  meta = {
    description = "GPGPU algorithms for PyCUDA and PyOpenCL";
    homepage = "https://github.com/fjarri/reikna";
    license = lib.licenses.mit;
  };
}