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