1{ stdenv
2, fetchPypi
3, buildPythonPackage
4, Mako
5, pytest
6, numpy
7, cffi
8, pytools
9, decorator
10, appdirs
11, six
12, opencl-headers
13, ocl-icd
14}:
15
16buildPythonPackage rec {
17 pname = "pyopencl";
18 version = "2018.1";
19
20 checkInputs = [ pytest ];
21 buildInputs = [ opencl-headers ocl-icd ];
22
23 propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];
24
25 src = fetchPypi {
26 inherit pname version;
27 sha256 = "b692966bbaaa65ef8949ee25660d6b0cc7cbadc7f4a35eb9c5139dfa4dde6d4a";
28 };
29
30 # py.test is not needed during runtime, so remove it from `install_requires`
31 postPatch = ''
32 substituteInPlace setup.py --replace "pytest>=2" ""
33 '';
34
35 # gcc: error: pygpu_language_opencl.cpp: No such file or directory
36 doCheck = false;
37
38 meta = with stdenv.lib; {
39 description = "Python wrapper for OpenCL";
40 homepage = https://github.com/pyopencl/pyopencl;
41 license = licenses.mit;
42 maintainers = [ maintainers.fridh ];
43 };
44}