|
|
7dda42c |
%global srcname pyopencl
|
|
|
863a90a |
# POCL arches
|
|
|
f24472a |
%ifarch aarch64 ppc64 ppc64le s390 s390x
|
|
|
863a90a |
%bcond_with tests
|
|
|
863a90a |
%else
|
|
|
863a90a |
%bcond_without tests
|
|
|
863a90a |
%endif
|
|
|
7dda42c |
|
|
|
7dda42c |
Name: python-%{srcname}
|
|
|
05adedc |
Version: 2017.2
|
|
|
05adedc |
Release: 1%{?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
|
|
Igor Gnatenko |
05edff3 |
# ASL 2.0 (ranluxcl), will be removed in 2018.x:
|
|
|
7dda42c |
# pyopencl/cl/pyopencl-ranluxcl.cl
|
|
Igor Gnatenko |
05edff3 |
# ASL 2.0:
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/scan.py
|
|
Igor Gnatenko |
05edff3 |
# BSD (random123):
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/cl/pyopencl-random123/array.h
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/cl/pyopencl-random123/openclfeatures.h
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/cl/pyopencl-random123/philox.cl
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/cl/pyopencl-random123/threefry.cl
|
|
Igor Gnatenko |
05edff3 |
# BSD:
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/bitonic_sort.py
|
|
Igor Gnatenko |
05edff3 |
# pyopencl/bitonic_sort_templates.py
|
|
Igor Gnatenko |
05edff3 |
|
|
Igor Gnatenko |
05edff3 |
License: MIT and Boost and ASL 2.0 and GPLv2 and BSD
|
|
|
7dda42c |
URL: http://mathema.tician.de/software/pyopencl
|
|
|
863a90a |
Source0: https://github.com/pyopencl/pyopencl/archive/v%{version}/%{srcname}-%{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: boost-devel
|
|
|
7dda42c |
BuildRequires: opencl-headers ocl-icd-devel
|
|
|
7dda42c |
BuildRequires: atlas-devel blas-devel
|
|
|
7dda42c |
BuildRequires: pkgconfig(libffi)
|
|
|
7dda42c |
BuildRequires: pkgconfig(gl)
|
|
|
863a90a |
%if %{with tests}
|
|
|
7dda42c |
BuildRequires: pocl
|
|
|
d08b64d |
%endif
|
|
|
7dda42c |
|
|
|
863a90a |
%global _description \
|
|
|
863a90a |
PyOpenCL makes it possible to access GPUs and other massively\
|
|
|
863a90a |
parallel compute devices from Python. Specifically, PyOpenCL\
|
|
|
863a90a |
provides Pythonic access to the OpenCL parallel computation\
|
|
|
7dda42c |
API in a manner similar to the sister project `PyCUDA`.
|
|
|
7dda42c |
|
|
|
863a90a |
%description %{_description}
|
|
|
863a90a |
|
|
|
7dda42c |
%package -n python2-%{srcname}
|
|
|
7dda42c |
Summary: Python 2 wrapper for OpenCL
|
|
|
7dda42c |
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
7dda42c |
BuildRequires: python2-devel
|
|
|
863a90a |
BuildRequires: python2-setuptools
|
|
|
863a90a |
BuildRequires: python2-numpy
|
|
|
863a90a |
BuildRequires: python2-cffi
|
|
|
863a90a |
%if %{with tests}
|
|
|
863a90a |
BuildRequires: python2-pytest
|
|
|
7dda42c |
BuildRequires: python2-compyte
|
|
|
05adedc |
BuildRequires: python2-pytools >= 2017.2
|
|
|
863a90a |
BuildRequires: python2-decorator
|
|
|
863a90a |
BuildRequires: python2-appdirs
|
|
|
863a90a |
BuildRequires: python2-six
|
|
|
863a90a |
BuildRequires: python-mako
|
|
|
863a90a |
BuildRequires: python2-scipy
|
|
|
d08b64d |
%endif
|
|
|
7dda42c |
Requires: python2-compyte
|
|
|
863a90a |
Requires: python2-numpy
|
|
|
05adedc |
Requires: python2-pytools >= 2017.2
|
|
|
863a90a |
Requires: python2-decorator
|
|
|
863a90a |
Requires: python2-cffi
|
|
|
7dda42c |
Requires: python2-appdirs
|
|
|
863a90a |
Requires: python2-six
|
|
|
7dda42c |
Requires: python-mako
|
|
|
7dda42c |
|
|
|
863a90a |
%description -n python2-%{srcname} %{_description}
|
|
|
863a90a |
|
|
|
863a90a |
Python 2 version.
|
|
|
7dda42c |
|
|
|
7dda42c |
%package -n python3-%{srcname}
|
|
|
7dda42c |
Summary: Python 3 wrapper for OpenCL
|
|
|
7dda42c |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
7dda42c |
BuildRequires: python3-devel
|
|
|
863a90a |
BuildRequires: python3-setuptools
|
|
|
7dda42c |
BuildRequires: python3-numpy
|
|
|
d08b64d |
BuildRequires: python3-cffi
|
|
|
863a90a |
%if %{with tests}
|
|
|
863a90a |
BuildRequires: python3-pytest
|
|
|
7dda42c |
BuildRequires: python3-compyte
|
|
|
05adedc |
BuildRequires: python3-pytools >= 2017.2
|
|
|
863a90a |
BuildRequires: python3-decorator
|
|
|
863a90a |
BuildRequires: python3-appdirs
|
|
|
7dda42c |
BuildRequires: python3-six
|
|
|
863a90a |
BuildRequires: python3-mako
|
|
|
863a90a |
BuildRequires: python3-scipy
|
|
|
d08b64d |
%endif
|
|
|
7dda42c |
Requires: python3-compyte
|
|
|
863a90a |
Requires: python3-numpy
|
|
|
05adedc |
Requires: python3-pytools >= 2017.2
|
|
|
7dda42c |
Requires: python3-decorator
|
|
|
863a90a |
Requires: python3-cffi
|
|
|
7dda42c |
Requires: python3-appdirs
|
|
|
863a90a |
Requires: python3-six
|
|
|
7dda42c |
Requires: python3-mako
|
|
|
7dda42c |
|
|
|
863a90a |
%description -n python3-%{srcname} %{_description}
|
|
|
863a90a |
|
|
|
863a90a |
Python 3 version.
|
|
|
7dda42c |
|
|
|
7dda42c |
%prep
|
|
|
863a90a |
%autosetup -n %{srcname}-%{version} -p1
|
|
|
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 |
%build
|
|
|
863a90a |
%{__python} configure.py --cl-enable-gl
|
|
|
7dda42c |
%py2_build
|
|
|
7dda42c |
%py3_build
|
|
|
7dda42c |
|
|
|
7dda42c |
%install
|
|
|
7dda42c |
%py2_install
|
|
|
7dda42c |
%py3_install
|
|
|
7dda42c |
|
|
|
7dda42c |
find %{buildroot}%{python2_sitearch}/%{srcname} -name '*.so' -exec chmod 755 {} ';'
|
|
|
7dda42c |
find %{buildroot}%{python3_sitearch}/%{srcname} -name '*.so' -exec chmod 755 {} ';'
|
|
|
7dda42c |
|
|
|
863a90a |
%if %{with tests}
|
|
|
7dda42c |
%check
|
|
|
7dda42c |
pushd test/
|
|
|
7dda42c |
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
|
|
7dda42c |
find -name '*.py' -exec py.test-%{python2_version} -v {} ';'
|
|
|
863a90a |
|
|
|
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
|
|
|
863a90a |
%{python2_sitearch}/%{srcname}/
|
|
|
863a90a |
%{python2_sitearch}/%{srcname}-*.egg-info/
|
|
|
7dda42c |
|
|
|
7dda42c |
%files -n python3-%{srcname}
|
|
|
7dda42c |
%license LICENSE
|
|
|
7dda42c |
%doc examples
|
|
|
863a90a |
%{python3_sitearch}/%{srcname}/
|
|
|
863a90a |
%{python3_sitearch}/%{srcname}-*.egg-info/
|
|
|
7dda42c |
|
|
|
7dda42c |
%changelog
|
|
|
05adedc |
* Sat Jul 15 2017 Igor Gnatenko <ignatenko@redhat.com> - 2017.2-1
|
|
|
05adedc |
- Update to 2017.2
|
|
|
05adedc |
|
|
|
26477d1 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2016.2.1-2
|
|
|
26477d1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
26477d1 |
|
|
Igor Gnatenko |
95988e3 |
* Thu Jan 19 2017 Igor Gnatenko <ignatenko@redhat.com> - 2016.2.1-1
|
|
Igor Gnatenko |
95988e3 |
- Upate to 2016.2.1
|
|
Igor Gnatenko |
95988e3 |
|
|
|
f24472a |
* Tue Jan 17 2017 Than Ngo <than@redhat.com> - 2016.1-6
|
|
|
f24472a |
- fix the conditionalize tests support
|
|
|
d3d7f73 |
- switching to gnu++11 to fix the build failure on ppc64le
|
|
|
f24472a |
|
|
|
bb9e695 |
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 2016.1-5
|
|
|
bb9e695 |
- Rebuild for Python 3.6
|
|
|
bb9e695 |
|
|
|
863a90a |
* Wed Aug 31 2016 Igor Gnatenko <ignatenko@redhat.com> - 2016.1-4
|
|
|
863a90a |
- Update to 2016.1
|
|
|
863a90a |
- Cleanups in packaging
|
|
|
863a90a |
|
|
|
1377aba |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2015.2-4
|
|
|
1377aba |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
1377aba |
|
|
|
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
|