[packages/python3-pyopencl] Up to 2025.1 (but one FIXME needed)

arekm arekm at pld-linux.org
Sun May 4 12:27:08 CEST 2025


commit 6085809b3d06853ad26b24434779aa460bf6b566
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun May 4 11:29:56 2025 +0200

    Up to 2025.1 (but one FIXME needed)

 python-pyopencl.spec => python3-pyopencl.spec | 138 +++++---------------------
 1 file changed, 23 insertions(+), 115 deletions(-)
---
diff --git a/python-pyopencl.spec b/python3-pyopencl.spec
similarity index 53%
rename from python-pyopencl.spec
rename to python3-pyopencl.spec
index 408aa77..2568ebf 100644
--- a/python-pyopencl.spec
+++ b/python3-pyopencl.spec
@@ -1,49 +1,32 @@
 #
 # Conditional build:
-%bcond_without	python2	# CPython 2.x module
-%bcond_without	python3	# CPython 3.x module
 %bcond_without	doc	# Sphinx documentation
 %bcond_with	tests	# py.test calls
 
-%define		pytools_ver	2018.0.0
+# FIXME - somehow make build process to leave source C files, so debuginfo will pick these up. For now just disable debuginfo packages
+%define		_enable_debug_packages 0
 
-%if %{without python2}
-%undefine	with_doc
-%endif
+%define		pytools_ver	2025.1.2
 %define		pypi_name	pyopencl
 Summary:	Python 2 wrapper for OpenCL
 Summary(pl.UTF-8):	Interfejs Pythona 2 do OpenCL
-Name:		python-pyopencl
-Version:	2018.1.1
-Release:	9
+Name:		python3-pyopencl
+Version:	2025.1
+Release:	1
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.python.org/simple/pyopencl/
 Source0:	https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
-# Source0-md5:	4a834f4e0e60016c216b3d039a2952ee
+# Source0-md5:	405536951035e143f97a415edb64900d
 URL:		http://mathema.tician.de/software/pyopencl
 BuildRequires:	OpenCL-devel >= 1.2
 BuildRequires:	libstdc++-devel >= 6:4.3
 BuildRequires:	rpmbuild(macros) >= 1.710
-%if %{with python2}
-BuildRequires:	python-cffi >= 1.1.0
-BuildRequires:	python-devel >= 1:2.6
-BuildRequires:	python-numpy-devel
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-Mako >= 0.3.6
-BuildRequires:	python-appdirs >= 1.4.0
-BuildRequires:	python-decorator >= 3.2.0
-BuildRequires:	python-pytest >= 2
-BuildRequires:	python-pytools >= %{pytools_ver}
-BuildRequires:	python-six >= 1.9.0
-%endif
-%endif
-%if %{with python3}
+BuildRequires:	python3-build
 BuildRequires:	python3-cffi >= 1.1.0
+BuildRequires:	python3-installer
 BuildRequires:	python3-devel >= 1:3.2
 BuildRequires:	python3-numpy-devel
-BuildRequires:	python3-setuptools
 %if %{with tests}
 BuildRequires:	python3-Mako >= 0.3.6
 BuildRequires:	python3-appdirs >= 1.4.0
@@ -59,43 +42,20 @@ BuildRequires:	python3-six >= 1.9.0
 BuildRequires:	python3-sphinx_bootstrap_theme
 BuildRequires:	sphinx-pdg-3
 %endif
-%endif
-Requires:	OpenCL >= 1.1
-Requires:	python-appdirs >= 1.4.0
-Requires:	python-decorator >= 3.2.0
-Requires:	python-numpy
-Requires:	python-pytools >= %{pytools_ver}
-Suggests:	python-Mako >= 0.3.6
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-PyOpenCL lets you access GPUs and other massively parallel compute
-devices from Python. It tries to offer computing goodness in the
-spirit of its sister project PyCUDA.
-
-%description -l pl.UTF-8
-PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
-zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
-możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
-PyCUDA.
-
-%package -n python3-pyopencl
-Summary:	Python 3 wrapper for OpenCL
-Summary(pl.UTF-8):	Interfejs Pythona 3 do OpenCL
-Group:		Libraries/Python
 Requires:	OpenCL >= 1.1
 Requires:	python3-appdirs >= 1.4.0
 Requires:	python3-decorator >= 3.2.0
 Requires:	python3-numpy
 Requires:	python3-pytools >= %{pytools_ver}
 Suggests:	python3-Mako >= 0.3.6
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%description -n python3-pyopencl
+%description
 PyOpenCL lets you access GPUs and other massively parallel compute
 devices from Python. It tries to offer computing goodness in the
 spirit of its sister project PyCUDA.
 
-%description -n python3-pyopencl -l pl.UTF-8
+%description -l pl.UTF-8
 PyOpenCL pozwala na dostęp z poziomu Pythona do GPU i innych znacznie
 zrównoleglonych jednostek obliczeniowych. Próbuje zaoferować
 możliwości obliczeniowe w tym samym stylu, co siostrzany projekt
@@ -130,64 +90,27 @@ Przykłady do modułu PyOpenCL.
 %{__sed} -i -e '1s,/usr/bin/env python,%{__python},' examples/*.py
 
 %build
-%define	configopts \\\
-	CXXFLAGS="%{rpmcxxflags}" \\\
-	LDFLAGS="%{rpmldflags}" \\\
-	--cl-enable-gl \\\
-	%{nil}
-
-%if %{with python2}
-install -d build-2
-./configure.py \
-	%{configopts} \
-	--python-exe=%{__python}
-
-%py_build
+%py3_build_pyproject
 
 %if %{with tests}
-PYTHONPATH="$(echo build-2/lib.*):." \
-%{__python} -m pytest test
-%endif
-
-%{__mv} siteconf.py siteconf-2.py
-%endif
-
-%if %{with python3}
-install -d build-3
-./configure.py \
-	%{configopts} \
-	--python-exe=%{__python3}
-
-%py3_build
-
-%if %{with tests}
-PYTHONPATH="$(echo build-3/lib.*):." \
-%{__python3} -m pytest test
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS= \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
 %endif
 
 %if %{with doc}
+%{__python3} -m zipfile -e build-3/*.whl build-3-doc
 %{__make} -C doc html \
-	PYTHONPATH="$(echo $(pwd)/build-3/lib.*):$(pwd)" \
+	PYTHONPATH="$(pwd)/build-3-doc" \
 	SPHINXBUILD=sphinx-build-3
 %endif
 
-%{__mv} siteconf.py siteconf-3.py
-%endif
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-cp -af siteconf-2.py siteconf.py
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-cp -af siteconf-3.py siteconf.py
-%py3_install
-%endif
+%py3_install_pyproject
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
@@ -195,32 +118,17 @@ cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README.rst
-%dir %{py_sitedir}/pyopencl
-%attr(755,root,root) %{py_sitedir}/pyopencl/_cffi.so
-%{py_sitedir}/pyopencl/*.py[co]
-%{py_sitedir}/pyopencl/characterize
-%{py_sitedir}/pyopencl/cl
-%{py_sitedir}/pyopencl/compyte
-%{py_sitedir}/pyopencl-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-pyopencl
-%defattr(644,root,root,755)
-%doc README.rst
 %dir %{py3_sitedir}/pyopencl
-%attr(755,root,root) %{py3_sitedir}/pyopencl/_cffi.*.so
+%attr(755,root,root) %{py3_sitedir}/pyopencl/_cl.*.so
 %{py3_sitedir}/pyopencl/*.py
 %{py3_sitedir}/pyopencl/__pycache__
 %{py3_sitedir}/pyopencl/characterize
 %{py3_sitedir}/pyopencl/cl
 %{py3_sitedir}/pyopencl/compyte
-%{py3_sitedir}/pyopencl-%{version}-py*.egg-info
-%endif
+%{py3_sitedir}/pyopencl-%{version}.dist-info
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pyopencl.git/commitdiff/6085809b3d06853ad26b24434779aa460bf6b566



More information about the pld-cvs-commit mailing list