|
|
7dda42c |
%global srcname pyopencl
|
|
|
7dda42c |
|
|
|
7dda42c |
Name: python-%{srcname}
|
|
|
7dda42c |
Version: 2015.2
|
|
|
f9e3b9e |
Release: 3%{?dist}
|
|
|
7dda42c |
Summary: Python wrapper for OpenCL
|
|
|
7dda42c |
|
|
|
7dda42c |
# https://bugzilla.redhat.com/show_bug.cgi?id=1219819#c16
|
|
|
7dda42c |
# Boost (boost):
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-bessel-j.cl
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-bessel-y.cl
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-eval-tbl.cl
|
|
|
7dda42c |
# GPLv2 (cephes):
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-airy.cl
|
|
|
7dda42c |
# ASL 2.0 (ranluxcl):
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-ranluxcl.cl
|
|
|
7dda42c |
License: MIT and Boost and ASL 2.0 and GPLv2
|
|
|
7dda42c |
URL: http://mathema.tician.de/software/pyopencl
|
|
|
7dda42c |
Source0: https://github.com/pyopencl/pyopencl/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
7dda42c |
# https://github.com/inducer/compyte/pull/24
|
|
|
7dda42c |
# Upstream maintainer not interested to unbundle compyte
|
|
|
7dda42c |
Patch0: 0001-use-system-compyte.patch
|
|
|
7dda42c |
Patch1: 0002-disable-executing-git-submodule.patch
|
|
|
7dda42c |
# Have not asked upstream, but they want to enforce CFLAGS/LDFLAGS
|
|
|
7dda42c |
Patch2: 0003-don-t-hack-distutils-with-C-LDFLAGS.patch
|
|
|
7dda42c |
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-bessel-[j,y].cl and
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-eval-tbl.cl contain snippets taken from boost
|
|
|
7dda42c |
# and cephes. pyopencl/cl/pyopencl-airy.cl contains code taken from
|
|
|
7dda42c |
# cephes.
|
|
|
7dda42c |
Provides: bundled(boost-math)
|
|
|
7dda42c |
Provides: bundled(cephes) = 2.8
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-ranluxcl.cl contains a modified version of the
|
|
|
7dda42c |
# ranluxcl library
|
|
|
7dda42c |
Provides: bundled(ranluxcl) = 1.3.1
|
|
|
7dda42c |
|
|
|
7dda42c |
BuildRequires: git-core
|
|
|
7dda42c |
BuildRequires: boost-devel
|
|
|
7dda42c |
BuildRequires: opencl-headers ocl-icd-devel
|
|
|
7dda42c |
BuildRequires: atlas-devel blas-devel
|
|
|
7dda42c |
BuildRequires: pkgconfig(libffi)
|
|
|
7dda42c |
BuildRequires: pkgconfig(gl)
|
|
|
d08b64d |
%ifarch %{ix86} x86_64
|
|
|
7dda42c |
# Testing requires opencl support
|
|
|
7dda42c |
BuildRequires: pocl
|
|
|
d08b64d |
%endif
|
|
|
7dda42c |
|
|
|
7dda42c |
%description
|
|
|
7dda42c |
PyOpenCL makes it possible to access GPUs and other massively
|
|
|
7dda42c |
parallel compute devices from Python. Specifically, PyOpenCL
|
|
|
7dda42c |
provides Pythonic access to the OpenCL parallel computation
|
|
|
7dda42c |
API in a manner similar to the sister project `PyCUDA`.
|
|
|
7dda42c |
|
|
|
7dda42c |
%package -n python2-%{srcname}
|
|
|
7dda42c |
Summary: Python 2 wrapper for OpenCL
|
|
|
7dda42c |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
7dda42c |
BuildRequires: python2-devel
|
|
|
7dda42c |
BuildRequires: numpy
|
|
|
d08b64d |
BuildRequires: python-cffi
|
|
|
d08b64d |
%ifarch %{ix86} x86_64
|
|
|
7dda42c |
# Test deps
|
|
|
7dda42c |
BuildRequires: scipy
|
|
|
7dda42c |
BuildRequires: python-mako
|
|
|
7dda42c |
BuildRequires: python2-compyte
|
|
|
7dda42c |
BuildRequires: python2-pytools
|
|
|
7dda42c |
BuildRequires: python2-pytest
|
|
|
7dda42c |
BuildRequires: python-six
|
|
|
d08b64d |
%endif
|
|
|
d08b64d |
Requires: numpy
|
|
|
7dda42c |
Requires: python2-compyte
|
|
|
7dda42c |
Requires: python2-pytools
|
|
|
7dda42c |
Requires: python2-pytest
|
|
|
7dda42c |
Requires: python-decorator
|
|
|
7dda42c |
Requires: python2-appdirs
|
|
|
7dda42c |
Requires: python-mako
|
|
|
d08b64d |
Requires: python-cffi
|
|
|
7dda42c |
|
|
|
7dda42c |
%description -n python2-%{srcname}
|
|
|
7dda42c |
PyOpenCL makes it possible to access GPUs and other massively
|
|
|
7dda42c |
parallel compute devices from Python. Specifically, PyOpenCL
|
|
|
7dda42c |
provides Pythonic access to the OpenCL parallel computation
|
|
|
7dda42c |
API in a manner similar to the sister project `PyCUDA`.
|
|
|
7dda42c |
|
|
|
7dda42c |
%package -n python3-%{srcname}
|
|
|
7dda42c |
Summary: Python 3 wrapper for OpenCL
|
|
|
7dda42c |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
7dda42c |
BuildRequires: python3-devel
|
|
|
7dda42c |
BuildRequires: python3-numpy
|
|
|
d08b64d |
BuildRequires: python3-cffi
|
|
|
d08b64d |
%ifarch %{ix86} x86_64
|
|
|
7dda42c |
# Test deps
|
|
|
d08b64d |
BuildRequires: python3-scipy
|
|
|
7dda42c |
BuildRequires: python3-mako
|
|
|
7dda42c |
BuildRequires: python3-compyte
|
|
|
7dda42c |
BuildRequires: python3-scipy
|
|
|
7dda42c |
BuildRequires: python3-pytools
|
|
|
7dda42c |
BuildRequires: python3-pytest
|
|
|
7dda42c |
BuildRequires: python3-six
|
|
|
d08b64d |
%endif
|
|
|
d08b64d |
Requires: python3-numpy
|
|
|
7dda42c |
Requires: python3-compyte
|
|
|
7dda42c |
Requires: python3-pytools
|
|
|
7dda42c |
Requires: python3-pytest
|
|
|
7dda42c |
Requires: python3-decorator
|
|
|
7dda42c |
Requires: python3-appdirs
|
|
|
7dda42c |
Requires: python3-mako
|
|
|
d08b64d |
Requires: python3-cffi
|
|
|
7dda42c |
|
|
|
7dda42c |
%description -n python3-%{srcname}
|
|
|
7dda42c |
PyOpenCL makes it possible to access GPUs and other massively
|
|
|
7dda42c |
parallel compute devices from Python. Specifically, PyOpenCL
|
|
|
7dda42c |
provides Pythonic access to the OpenCL parallel computation
|
|
|
7dda42c |
API in a manner similar to the sister project `PyCUDA`.
|
|
|
7dda42c |
|
|
|
7dda42c |
%prep
|
|
|
7dda42c |
%autosetup -n %{srcname}-%{version} -S git
|
|
|
7dda42c |
|
|
|
7dda42c |
rm -f examples/{.gitignore,download-examples-from-wiki.py}
|
|
|
7dda42c |
|
|
|
7dda42c |
# generate html docs
|
|
|
7dda42c |
#sphinx-build doc/source html
|
|
|
7dda42c |
# remove the sphinx-build leftovers
|
|
|
7dda42c |
#rm -rf html/.{doctrees,buildinfo}
|
|
|
7dda42c |
|
|
|
7dda42c |
rm -rf %{py3dir}
|
|
|
7dda42c |
mkdir -p %{py3dir}
|
|
|
7dda42c |
cp -a . %{py3dir}
|
|
|
7dda42c |
|
|
|
7dda42c |
%build
|
|
|
7dda42c |
%{__python2} configure.py --cl-enable-gl
|
|
|
7dda42c |
%py2_build
|
|
|
7dda42c |
|
|
|
7dda42c |
pushd %{py3dir}
|
|
|
7dda42c |
%{__python3} configure.py --cl-enable-gl
|
|
|
7dda42c |
%py3_build
|
|
|
7dda42c |
popd
|
|
|
7dda42c |
|
|
|
7dda42c |
%install
|
|
|
7dda42c |
%py2_install
|
|
|
7dda42c |
pushd %{py3dir}
|
|
|
7dda42c |
%py3_install
|
|
|
7dda42c |
popd
|
|
|
7dda42c |
|
|
|
7dda42c |
find %{buildroot}%{python2_sitearch}/%{srcname} -name '*.so' -exec chmod 755 {} ';'
|
|
|
7dda42c |
find %{buildroot}%{python3_sitearch}/%{srcname} -name '*.so' -exec chmod 755 {} ';'
|
|
|
7dda42c |
|
|
|
7dda42c |
%check
|
|
|
d08b64d |
%ifarch %{ix86} x86_64
|
|
|
7dda42c |
pushd test/
|
|
|
7dda42c |
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
|
|
7dda42c |
find -name '*.py' -exec py.test-%{python2_version} -v {} ';'
|
|
|
7dda42c |
popd
|
|
|
7dda42c |
pushd %{py3dir}/test/
|
|
|
7dda42c |
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
|
|
7dda42c |
find -name '*.py' -exec py.test-%{python3_version} -v {} ';'
|
|
|
7dda42c |
popd
|
|
|
d08b64d |
%endif
|
|
|
7dda42c |
|
|
|
7dda42c |
%files -n python2-%{srcname}
|
|
|
7dda42c |
%license LICENSE
|
|
|
7dda42c |
%doc examples
|
|
|
7dda42c |
%{python2_sitearch}/%{srcname}
|
|
|
7dda42c |
%{python2_sitearch}/%{srcname}-%{version}-*egg-info
|
|
|
7dda42c |
|
|
|
7dda42c |
%files -n python3-%{srcname}
|
|
|
7dda42c |
%license LICENSE
|
|
|
7dda42c |
%doc examples
|
|
|
7dda42c |
%{python3_sitearch}/%{srcname}
|
|
|
7dda42c |
%{python3_sitearch}/%{srcname}-%{version}-*egg-info
|
|
|
7dda42c |
|
|
|
7dda42c |
%changelog
|
|
|
f9e3b9e |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2015.2-3
|
|
|
f9e3b9e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
f9e3b9e |
|
|
|
b5db207 |
* Sun Nov 15 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2015.2-2
|
|
|
b5db207 |
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
b5db207 |
|
|
|
7dda42c |
* Thu Nov 05 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2015.2-1
|
|
|
7dda42c |
- Update to 2015.2
|
|
|
7dda42c |
- Add some description to bundled libs providing
|
|
|
7dda42c |
- Provide exact version of bundled cephes
|
|
|
7dda42c |
- Force tests passed
|
|
|
7dda42c |
- Fixed dependencies list
|
|
|
7dda42c |
|
|
|
7dda42c |
* Wed Nov 04 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2015.1-4
|
|
|
7dda42c |
- Fixed license tag
|
|
|
7dda42c |
- Run tests
|
|
|
7dda42c |
- Add license
|
|
|
7dda42c |
|
|
|
7dda42c |
* Sat Oct 24 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2015.1-3
|
|
|
7dda42c |
- Fix errors during review
|
|
|
7dda42c |
|
|
|
7dda42c |
* Sat Oct 24 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2015.1-2
|
|
|
7dda42c |
- Trivial fixes in spec
|
|
|
7dda42c |
|
|
|
7dda42c |
* Fri May 08 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2015.1-1
|
|
|
7dda42c |
- Initial package
|