2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, sphinx
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-cov
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
|
|
|
, Mako
|
|
|
|
, numpy
|
|
|
|
, funcsigs
|
|
|
|
, withCuda ? false, pycuda
|
|
|
|
, withOpenCL ? true, pyopencl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reikna";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "0.7.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "722fefbd253d0bbcbf5250b7b9c4aca5722cde4ca38bfbf863a551a5fc26edfa";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
checkInputs = [ sphinx pytest-cov pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ Mako numpy funcsigs ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional withCuda pycuda
|
|
|
|
++ lib.optional withOpenCL pyopencl;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Requires device
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GPGPU algorithms for PyCUDA and PyOpenCL";
|
|
|
|
homepage = "https://github.com/fjarri/reikna";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|