3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_with tests # py.test calls
11 Summary: Python 2 wrapper for OpenCL
12 Summary(pl.UTF-8): Interfejs Pythona 2 do OpenCL
17 Group: Libraries/Python
18 #Source0Download: https://pypi.python.org/simple/pyopencl/
19 Source0: https://pypi.python.org/packages/cb/4e/fcb45db7d3005f5646f28a3de2a2f8e60a6e4b629f02bbb331320778f3a1/pyopencl-%{version}.tar.gz
20 # Source0-md5: 0c8a33b6a6b427bcd9c5966da461d9c6
21 URL: http://mathema.tician.de/software/pyopencl
22 BuildRequires: OpenCL-devel >= 1.2
23 BuildRequires: libstdc++-devel >= 6:4.3
24 BuildRequires: rpmbuild(macros) >= 1.710
26 BuildRequires: python-cffi >= 1.1.0
27 BuildRequires: python-devel >= 1:2.6
28 BuildRequires: python-numpy-devel
29 BuildRequires: python-setuptools
31 BuildRequires: python-Mako >= 0.3.6
32 BuildRequires: python-appdirs >= 1.4.0
33 BuildRequires: python-decorator >= 3.2.0
34 BuildRequires: python-pytest >= 2
35 BuildRequires: python-pytools >= 2015.1.2
36 BuildRequires: python-six >= 1.9.0
39 BuildRequires: python-numpy
40 BuildRequires: python-pytools >= 2015.1.2
41 BuildRequires: python-six >= 1.9.0
42 BuildRequires: python-sphinx_bootstrap_theme
43 BuildRequires: sphinx-pdg-2
47 BuildRequires: python3-cffi >= 1.1.0
48 BuildRequires: python3-devel >= 1:3.2
49 BuildRequires: python3-numpy-devel
50 BuildRequires: python3-setuptools
52 BuildRequires: python3-Mako >= 0.3.6
53 BuildRequires: python3-appdirs >= 1.4.0
54 BuildRequires: python3-decorator >= 3.2.0
55 BuildRequires: python3-pytest >= 2
56 BuildRequires: python3-pytools >= 2015.1.2
57 BuildRequires: python3-six >= 1.9.0
60 Requires: OpenCL >= 1.1
61 Requires: python-appdirs >= 1.4.0
62 Requires: python-decorator >= 3.2.0
63 Requires: python-numpy
64 Requires: python-pytools >= 2014.2
65 Suggests: python-Mako >= 0.3.6
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 PyOpenCL lets you access GPUs and other massively parallel compute
70 devices from Python. It tries to offer computing goodness in the
71 spirit of its sister project PyCUDA.
73 %description -l pl.UTF-8
74 PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
75 zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
76 możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
79 %package -n python3-pyopencl
80 Summary: Python 3 wrapper for OpenCL
81 Summary(pl.UTF-8): Interfejs Pythona 3 do OpenCL
82 Group: Libraries/Python
83 Requires: OpenCL >= 1.1
84 Requires: python3-appdirs >= 1.4.0
85 Requires: python3-decorator >= 3.2.0
86 Requires: python3-numpy
87 Requires: python3-pytools >= 2014.2
88 Suggests: python3-Mako >= 0.3.6
90 %description -n python3-pyopencl
91 PyOpenCL lets you access GPUs and other massively parallel compute
92 devices from Python. It tries to offer computing goodness in the
93 spirit of its sister project PyCUDA.
95 %description -n python3-pyopencl -l pl.UTF-8
96 PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
97 zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
98 możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
102 Summary: Documentation for PyOpenCL module
103 Summary(pl.UTF-8): Dokumentacja modułu PyOpenCL
105 %if "%{_rpmversion}" >= "5"
110 Documentation for PyOpenCL module.
112 %description apidocs -l pl.UTF-8
113 Dokumentacja modułu PyOpenCL.
116 Summary: Examples for PyOpenCL module
117 Summary(pl.UTF-8): Przykłady do modułu PyOpenCL
120 %description examples
121 Examples for PyOpenCL module.
123 %description examples -l pl.UTF-8
124 Przykłady do modułu PyOpenCL.
127 %setup -q -n pyopencl-%{version}
130 %define configopts \\\
131 CXXFLAGS="%{rpmcxxflags}" \\\
132 LDFLAGS="%{rpmldflags}" \\\
140 --python-exe=%{__python}
145 PYTHONPATH="$(echo build-2/lib.*):." \
146 py.test-%{py_ver} test
150 %{__make} -C doc html \
151 PYTHONPATH="$(echo $(pwd)/build-2/lib.*):$(pwd)" \
152 SPHINXBUILD=sphinx-build-2
155 %{__mv} siteconf.py siteconf-2.py
162 --python-exe=%{__python3}
167 PYTHONPATH="$(echo build-3/lib.*):." \
168 py.test-%{py3_ver} test
171 %{__mv} siteconf.py siteconf-3.py
175 rm -rf $RPM_BUILD_ROOT
178 cp -af siteconf-2.py siteconf.py
185 cp -af siteconf-3.py siteconf.py
189 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
190 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
193 rm -rf $RPM_BUILD_ROOT
197 %defattr(644,root,root,755)
199 %dir %{py_sitedir}/pyopencl
200 %attr(755,root,root) %{py_sitedir}/pyopencl/_cffi.so
201 %{py_sitedir}/pyopencl/*.py[co]
202 %{py_sitedir}/pyopencl/characterize
203 %{py_sitedir}/pyopencl/cl
204 %{py_sitedir}/pyopencl/compyte
205 %{py_sitedir}/pyopencl-%{version}-py*.egg-info
209 %files -n python3-pyopencl
210 %defattr(644,root,root,755)
212 %dir %{py3_sitedir}/pyopencl
213 %attr(755,root,root) %{py3_sitedir}/pyopencl/_cffi.cpython-*.so
214 %{py3_sitedir}/pyopencl/*.py
215 %{py3_sitedir}/pyopencl/__pycache__
216 %{py3_sitedir}/pyopencl/characterize
217 %{py3_sitedir}/pyopencl/cl
218 %{py3_sitedir}/pyopencl/compyte
219 %{py3_sitedir}/pyopencl-%{version}-py*.egg-info
224 %defattr(644,root,root,755)
225 %doc doc/_build/html/*
229 %defattr(644,root,root,755)
230 %{_examplesdir}/%{name}-%{version}