1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5 sphinx,
6 pytest-cov,
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.8.0";
20 format = "setuptools";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-fpa1Pfo5EAafg7Pgha17G6k5G13fdErjclv0On/uYyI=";
25 };
26
27 nativeCheckInputs = [
28 sphinx
29 pytest-cov
30 pytest
31 ];
32
33 propagatedBuildInputs = [
34 mako
35 numpy
36 funcsigs
37 ] ++ lib.optional withCuda pycuda ++ lib.optional withOpenCL pyopencl;
38
39 checkPhase = ''
40 py.test
41 '';
42
43 # Requires device
44 doCheck = false;
45
46 meta = with lib; {
47 description = "GPGPU algorithms for PyCUDA and PyOpenCL";
48 homepage = "https://github.com/fjarri/reikna";
49 license = licenses.mit;
50 };
51}