1{ stdenv
2, fetchPypi
3, buildPythonPackage
4, sphinx
5, pytestcov
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.7.1";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "0afc5d502cc9ba0dadd88c15d72e2fdaa09fee31faaae5064889732de7940953";
21 };
22
23 checkInputs = [ sphinx pytestcov pytest ];
24
25 propagatedBuildInputs = [ Mako numpy funcsigs ]
26 ++ stdenv.lib.optional withCuda pycuda
27 ++ stdenv.lib.optional withOpenCL pyopencl;
28
29 checkPhase = ''
30 py.test
31 '';
32
33 # Requires device
34 doCheck = false;
35
36 meta = {
37 description = "GPGPU algorithms for PyCUDA and PyOpenCL";
38 homepage = https://github.com/fjarri/reikna;
39 license = stdenv.lib.licenses.mit;
40 maintainers = [ stdenv.lib.maintainers.fridh ];
41
42 };
43
44}