2016-11-14 11:23:53 +00:00
|
|
|
{ stdenv
|
2018-06-23 14:27:58 +01:00
|
|
|
, fetchPypi
|
2016-11-14 11:23:53 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, sphinx
|
|
|
|
, pytestcov
|
|
|
|
, pytest
|
|
|
|
, Mako
|
|
|
|
, numpy
|
|
|
|
, funcsigs
|
|
|
|
, withCuda ? false, pycuda
|
|
|
|
, withOpenCL ? true, pyopencl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reikna";
|
2018-10-06 11:56:20 +01:00
|
|
|
version = "0.7.2";
|
2016-11-14 11:23:53 +00:00
|
|
|
|
2018-06-23 14:27:58 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-10-06 11:56:20 +01:00
|
|
|
sha256 = "c52f5ae13e35284feda8f6b67c0d6223c02c0292b1495969cf7a42f547b3fc18";
|
2016-11-14 11:23:53 +00:00
|
|
|
};
|
|
|
|
|
2018-06-23 14:27:58 +01:00
|
|
|
checkInputs = [ sphinx pytestcov pytest ];
|
2016-11-14 11:23:53 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|