2016-11-14 11:23:53 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, buildPythonPackage
|
|
|
|
, sphinx
|
|
|
|
, pytestcov
|
|
|
|
, pytest
|
|
|
|
, Mako
|
|
|
|
, numpy
|
|
|
|
, funcsigs
|
|
|
|
, withCuda ? false, pycuda
|
|
|
|
, withOpenCL ? true, pyopencl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reikna";
|
|
|
|
name = "${pname}-${version}";
|
2017-05-27 13:24:47 +01:00
|
|
|
version = "0.6.8";
|
2016-11-14 11:23:53 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
|
2017-05-27 13:24:47 +01:00
|
|
|
sha256 = "34d92786237bef9ab5d37d78f01c155d0dcd1fc24df7782af9498a9f1786890c";
|
2016-11-14 11:23:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ sphinx pytestcov pytest ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ Mako numpy funcsigs ]
|
|
|
|
++ stdenv.lib.optional withCuda pycuda
|
|
|
|
++ stdenv.lib.optional withOpenCL pyopencl;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Requires device
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "GPGPU algorithms for PyCUDA and PyOpenCL";
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://github.com/fjarri/reikna;
|
2016-11-14 11:23:53 +00:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2017-12-05 22:20:11 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.fridh ];
|
2016-11-14 11:23:53 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-12-05 22:20:11 +00:00
|
|
|
}
|