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