diff --git a/packaging/rpm/patches/pyopengl-egl-open-warning.patch b/packaging/rpm/patches/pyopengl-egl-open-warning.patch deleted file mode 100644 index 62b9d10d80..0000000000 --- a/packaging/rpm/patches/pyopengl-egl-open-warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e727dc530f4abfe0091be068573d7dda311fc575 Mon Sep 17 00:00:00 2001 -From: Antoine Martin -Date: Fri, 27 Oct 2023 15:25:07 +0700 -Subject: [PATCH] fix resource warning - -``` -/usr/lib/python3.11/site-packages/OpenGL/platform/egl.py:76: ResourceWarning: unclosed file <_io.TextIOWrapper -name='/proc/cpuinfo' mode='r' encoding='UTF-8'> - info = open('/proc/cpuinfo').read() -``` ---- - OpenGL/platform/egl.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/OpenGL/platform/egl.py b/OpenGL/platform/egl.py -index 55fbb0be..44b55024 100644 ---- a/OpenGL/platform/egl.py -+++ b/OpenGL/platform/egl.py -@@ -73,7 +73,8 @@ def EGL(self): - # https://github.com/raspberrypi/firmware/issues/110 - import os - if os.path.exists('/proc/cpuinfo'): -- info = open('/proc/cpuinfo').read() -+ with open('/proc/cpuinfo', 'r') as f: -+ info = f.read() - if 'BCM2708' in info or 'BCM2709' in info: - assert self.GLES2 - try: diff --git a/packaging/rpm/patches/pyopengl-py3.13-nonumpy.patch b/packaging/rpm/patches/pyopengl-py3.13-nonumpy.patch index 8c96adb169..c960733ad7 100644 --- a/packaging/rpm/patches/pyopengl-py3.13-nonumpy.patch +++ b/packaging/rpm/patches/pyopengl-py3.13-nonumpy.patch @@ -1,6 +1,6 @@ ---- a/accelerate/setup.py 2024-06-13 21:10:17.429866015 +0700 -+++ b/accelerate/setup.py 2024-06-13 21:10:41.883706396 +0700 -@@ -64,7 +64,7 @@ +--- a/setup.py 2024-06-13 21:10:17.429866015 +0700 ++++ b/setup.py 2024-06-13 21:10:41.883706396 +0700 +@@ -62,7 +62,7 @@ ) try: diff --git a/packaging/rpm/patches/pyopengl-version.patch b/packaging/rpm/patches/pyopengl-version.patch deleted file mode 100644 index 277b8c32aa..0000000000 --- a/packaging/rpm/patches/pyopengl-version.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/OpenGL/version.py 2024-11-10 00:15:51.762734061 +0700 -+++ b/OpenGL/version.py 2024-11-10 00:15:58.159686979 +0700 -@@ -1,2 +1,2 @@ - """Declares the current version for use in setuptools and the like""" --__version__ = "3.1.7" -+__version__ = "3.1.8" ---- a/accelerate/OpenGL_accelerate/__init__.py 2024-11-10 00:15:51.762734061 +0700 -+++ b/accelerate/OpenGL_accelerate/__init__.py 2024-11-10 00:15:58.159686979 +0700 -@@ -6,5 +6,5 @@ - PyOpenGL package and is built via the setupaccel.py - script in the top level of the PyOpenGL source package. - """ --__version__ = "3.1.7" --__version_tuple__ = (3, 1, 7) -+__version__ = "3.1.8" -+__version_tuple__ = (3, 1, 8) diff --git a/packaging/rpm/python3-pyopengl.spec b/packaging/rpm/python3-pyopengl.spec index 456961c77a..dcb230cddd 100644 --- a/packaging/rpm/python3-pyopengl.spec +++ b/packaging/rpm/python3-pyopengl.spec @@ -18,15 +18,14 @@ %global srcname PyOpenGL Name: %{python3}-pyopengl -Version: 3.1.8 -Release: 2%{?dist} +Version: 3.1.9 +Release: 1%{?dist} Summary: Python 3 bindings for OpenGL License: BSD URL: http://pyopengl.sourceforge.net/ -Source0: https://github.com/mcfletch/pyopengl/archive/refs/tags/release-%{version}.tar.gz -Patch0: pyopengl-egl-open-warning.patch -Patch1: pyopengl-py3.13-nonumpy.patch -Patch2: pyopengl-version.patch +Source0: https://files.pythonhosted.org/packages/source/p/pyopengl_accelerate/pyopengl_accelerate-%{version}.tar.gz +Source1: https://files.pythonhosted.org/packages/source/p/pyopengl/pyopengl-%{version}.tar.gz +Patch0: pyopengl-py3.13-nonumpy.patch BuildRequires: coreutils BuildRequires: %{python3}-devel @@ -60,21 +59,24 @@ Requires: %{python3}-tkinter %prep sha256=`sha256sum %{SOURCE0} | awk '{print $1}'` -if [ "${sha256}" != "78f4016f13705d66dc89d5d046eee660c2f5f0915e5ecfeeed79dffac741bc97" ]; then +if [ "${sha256}" != "85957c7c76975818ff759ec9243f9dc7091ef6f373ea37a2eb50c320fd9a86f3" ]; then echo "invalid checksum for %{SOURCE0}" exit 1 fi -%setup -q -c -n %{srcname}-%{version} -pushd pyopengl-release-%{version} +sha256=`sha256sum %{SOURCE1} | awk '{print $1}'` +if [ "${sha256}" != "28ebd82c5f4491a418aeca9672dffb3adbe7d33b39eada4548a5b4e8c03f60c8" ]; then + echo "invalid checksum for %{SOURCE1}" + exit 1 +fi +%setup -q -c -n %{srcname}-%{version} -T -a0 -a1 +pushd pyopengl_accelerate-%{version} %patch -p1 -P 0 -%patch -p1 -P 1 -%patch -p1 -P 2 popd %build NPROCS=${NPROCS:-`nproc`} -for srcdir in pyopengl-release-%{version} pyopengl-release-%{version}/accelerate; do +for srcdir in pyopengl-%{version} pyopengl_accelerate-%{version}; do pushd $srcdir %{python3} setup.py build -j ${NPROCS} popd @@ -82,7 +84,7 @@ done %install -for srcdir in pyopengl-release-%{version} pyopengl-release-%{version}/accelerate; do +for srcdir in pyopengl-%{version} pyopengl_accelerate-%{version}; do pushd $srcdir %{python3} setup.py install -O1 --skip-build --root %{buildroot} popd @@ -100,7 +102,7 @@ rm -fr %{buildroot}%{python3_sitearch}/UNKNOWN-*.egg-info %files -%license pyopengl-release-%{version}/license.txt +%license pyopengl-%{version}/license.txt %{python3_sitelib}/OpenGL/ %{python3_sitelib}/PyOpenGL*.egg-info %exclude %{python3_sitelib}/OpenGL/Tk @@ -113,6 +115,10 @@ rm -fr %{buildroot}%{python3_sitearch}/UNKNOWN-*.egg-info %changelog +* Mon Jan 27 2025 Antoine Martin - 3.1.9-1 +- new upstream release +- switch back to pypi + * Thu Dec 05 2024 Antoine Martin - 3.1.8-2 - also patch accelerate version number