1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 sphinx,
6 pytest-cov-stub,
7 pytest,
8 mako,
9 numpy,
10 funcsigs,
11 withCuda ? false,
12 pycuda,
13 withOpenCL ? true,
14 pyopencl,
15}:
16
17buildPythonPackage rec {
18 pname = "reikna";
19 version = "0.9.0";
20 format = "setuptools";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-uzIoGCkIINgmO+r0vAzmihS14GWv5ygakMz3tKIG3zA=";
25 };
26
27 nativeCheckInputs = [
28 sphinx
29 pytest-cov-stub
30 pytest
31 ];
32
33 propagatedBuildInputs =
34 [
35 mako
36 numpy
37 funcsigs
38 ]
39 ++ lib.optional withCuda pycuda
40 ++ lib.optional withOpenCL pyopencl;
41
42 checkPhase = ''
43 py.test
44 '';
45
46 # Requires device
47 doCheck = false;
48
49 meta = with lib; {
50 description = "GPGPU algorithms for PyCUDA and PyOpenCL";
51 homepage = "https://github.com/fjarri/reikna";
52 license = licenses.mit;
53 };
54}