]> git.pld-linux.org Git - packages/python-pyopencl.git/blame - python-pyopencl.spec
- release 4 (by relup.sh)
[packages/python-pyopencl.git] / python-pyopencl.spec
CommitLineData
f5847243
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without doc # Sphinx documentation
dc8f5b2d 6%bcond_with tests # py.test calls
c01f1365 7
f5847243 8%if %{without python2}
dc8f5b2d 9%undefine with_doc
f5847243
JB
10%endif
11Summary: Python 2 wrapper for OpenCL
12Summary(pl.UTF-8): Interfejs Pythona 2 do OpenCL
441abba3 13Name: python-pyopencl
dc8f5b2d 14Version: 2016.1
81f192f6 15Release: 4
441abba3 16License: MIT
f5847243 17Group: Libraries/Python
dc8f5b2d
JB
18#Source0Download: https://pypi.python.org/simple/pyopencl/
19Source0: https://pypi.python.org/packages/cb/4e/fcb45db7d3005f5646f28a3de2a2f8e60a6e4b629f02bbb331320778f3a1/pyopencl-%{version}.tar.gz
20# Source0-md5: 0c8a33b6a6b427bcd9c5966da461d9c6
441abba3 21URL: http://mathema.tician.de/software/pyopencl
dc8f5b2d 22BuildRequires: OpenCL-devel >= 1.2
8d6d4e8f 23BuildRequires: libstdc++-devel >= 6:4.3
5b449651 24BuildRequires: rpmbuild(macros) >= 1.710
f5847243 25%if %{with python2}
dc8f5b2d
JB
26BuildRequires: python-cffi >= 1.1.0
27BuildRequires: python-devel >= 1:2.6
28BuildRequires: python-numpy-devel
29BuildRequires: python-setuptools
30%if %{with tests}
31BuildRequires: python-Mako >= 0.3.6
f5847243 32BuildRequires: python-appdirs >= 1.4.0
a24997d7 33BuildRequires: python-decorator >= 3.2.0
f5847243 34BuildRequires: python-pytest >= 2
dc8f5b2d
JB
35BuildRequires: python-pytools >= 2015.1.2
36BuildRequires: python-six >= 1.9.0
37%endif
8d6d4e8f
JB
38%if %{with doc}
39BuildRequires: python-numpy
40BuildRequires: python-pytools >= 2015.1.2
41BuildRequires: python-six >= 1.9.0
42BuildRequires: python-sphinx_bootstrap_theme
43BuildRequires: sphinx-pdg-2
44%endif
f5847243
JB
45%endif
46%if %{with python3}
dc8f5b2d 47BuildRequires: python3-cffi >= 1.1.0
c01f1365 48BuildRequires: python3-devel >= 1:3.2
f5847243 49BuildRequires: python3-numpy-devel
dc8f5b2d
JB
50BuildRequires: python3-setuptools
51%if %{with tests}
52BuildRequires: python3-Mako >= 0.3.6
53BuildRequires: python3-appdirs >= 1.4.0
54BuildRequires: python3-decorator >= 3.2.0
f5847243 55BuildRequires: python3-pytest >= 2
dc8f5b2d
JB
56BuildRequires: python3-pytools >= 2015.1.2
57BuildRequires: python3-six >= 1.9.0
f5847243 58%endif
dc8f5b2d 59%endif
a8c1d76c 60Requires: OpenCL >= 1.1
f5847243 61Requires: python-appdirs >= 1.4.0
a24997d7 62Requires: python-decorator >= 3.2.0
a24997d7 63Requires: python-numpy
c01f1365 64Requires: python-pytools >= 2014.2
a24997d7
JB
65Suggests: python-Mako >= 0.3.6
66BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
441abba3
AM
67
68%description
69PyOpenCL lets you access GPUs and other massively parallel compute
70devices from Python. It tries to offer computing goodness in the
a24997d7 71spirit of its sister project PyCUDA.
441abba3 72
a24997d7
JB
73%description -l pl.UTF-8
74PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
75zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
76możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
77PyCUDA.
441abba3 78
f5847243
JB
79%package -n python3-pyopencl
80Summary: Python 3 wrapper for OpenCL
81Summary(pl.UTF-8): Interfejs Pythona 3 do OpenCL
82Group: Libraries/Python
83Requires: OpenCL >= 1.1
84Requires: python3-appdirs >= 1.4.0
85Requires: python3-decorator >= 3.2.0
f5847243 86Requires: python3-numpy
c01f1365 87Requires: python3-pytools >= 2014.2
f5847243
JB
88Suggests: python3-Mako >= 0.3.6
89
90%description -n python3-pyopencl
91PyOpenCL lets you access GPUs and other massively parallel compute
92devices from Python. It tries to offer computing goodness in the
93spirit of its sister project PyCUDA.
94
95%description -n python3-pyopencl -l pl.UTF-8
96PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
97zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
98możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
99PyCUDA.
100
101%package apidocs
102Summary: Documentation for PyOpenCL module
103Summary(pl.UTF-8): Dokumentacja modułu PyOpenCL
104Group: Documentation
c01f1365
ER
105%if "%{_rpmversion}" >= "5"
106BuildArch: noarch
107%endif
f5847243
JB
108
109%description apidocs
110Documentation for PyOpenCL module.
111
112%description apidocs -l pl.UTF-8
113Dokumentacja modułu PyOpenCL.
114
115%package examples
116Summary: Examples for PyOpenCL module
117Summary(pl.UTF-8): Przykłady do modułu PyOpenCL
118Group: Documentation
119
120%description examples
121Examples for PyOpenCL module.
122
123%description examples -l pl.UTF-8
124Przykłady do modułu PyOpenCL.
125
441abba3
AM
126%prep
127%setup -q -n pyopencl-%{version}
128
129%build
f5847243
JB
130%define configopts \\\
131 CXXFLAGS="%{rpmcxxflags}" \\\
132 LDFLAGS="%{rpmldflags}" \\\
dc8f5b2d 133 --cl-enable-gl \\\
f5847243 134 %{nil}
a24997d7 135
f5847243
JB
136%if %{with python2}
137install -d build-2
138./configure.py \
139 %{configopts} \
dc8f5b2d 140 --python-exe=%{__python}
f5847243 141
106e7e90 142%py_build
441abba3 143
dc8f5b2d
JB
144%if %{with tests}
145PYTHONPATH="$(echo build-2/lib.*):." \
604671b3 146%{__python} -m pytest test
dc8f5b2d
JB
147%endif
148
f5847243 149%if %{with doc}
a24997d7 150%{__make} -C doc html \
8d6d4e8f
JB
151 PYTHONPATH="$(echo $(pwd)/build-2/lib.*):$(pwd)" \
152 SPHINXBUILD=sphinx-build-2
f5847243 153%endif
f5847243 154
dc8f5b2d 155%{__mv} siteconf.py siteconf-2.py
f5847243
JB
156%endif
157
158%if %{with python3}
159install -d build-3
160./configure.py \
161 %{configopts} \
dc8f5b2d 162 --python-exe=%{__python3}
f5847243 163
106e7e90 164%py3_build
f5847243 165
dc8f5b2d
JB
166%if %{with tests}
167PYTHONPATH="$(echo build-3/lib.*):." \
604671b3 168%{__python3} -m pytest test
dc8f5b2d
JB
169%endif
170
f5847243
JB
171%{__mv} siteconf.py siteconf-3.py
172%endif
441abba3
AM
173
174%install
175rm -rf $RPM_BUILD_ROOT
441abba3 176
f5847243
JB
177%if %{with python2}
178cp -af siteconf-2.py siteconf.py
106e7e90 179%py_install
a24997d7
JB
180
181%py_postclean
f5847243
JB
182%endif
183
184%if %{with python3}
185cp -af siteconf-3.py siteconf.py
106e7e90 186%py3_install
f5847243
JB
187%endif
188
189install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
190cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
441abba3
AM
191
192%clean
193rm -rf $RPM_BUILD_ROOT
194
f5847243 195%if %{with python2}
a24997d7 196%files
441abba3 197%defattr(644,root,root,755)
f5847243 198%doc README.rst
441abba3 199%dir %{py_sitedir}/pyopencl
dc8f5b2d 200%attr(755,root,root) %{py_sitedir}/pyopencl/_cffi.so
a24997d7
JB
201%{py_sitedir}/pyopencl/*.py[co]
202%{py_sitedir}/pyopencl/characterize
f5847243 203%{py_sitedir}/pyopencl/cl
a24997d7
JB
204%{py_sitedir}/pyopencl/compyte
205%{py_sitedir}/pyopencl-%{version}-py*.egg-info
f5847243
JB
206%endif
207
208%if %{with python3}
209%files -n python3-pyopencl
210%defattr(644,root,root,755)
211%doc README.rst
212%dir %{py3_sitedir}/pyopencl
dc8f5b2d 213%attr(755,root,root) %{py3_sitedir}/pyopencl/_cffi.cpython-*.so
f5847243
JB
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
220%endif
221
222%if %{with doc}
223%files apidocs
224%defattr(644,root,root,755)
225%doc doc/_build/html/*
226%endif
227
228%files examples
229%defattr(644,root,root,755)
230%{_examplesdir}/%{name}-%{version}
This page took 0.124847 seconds and 4 git commands to generate.