Skip to content

Commit

Permalink
pyopengl 3.1.8 (switch to github)
Browse files Browse the repository at this point in the history
and update patches: one fix merged, new breakage: version not bumped
  • Loading branch information
totaam committed Nov 10, 2024
1 parent 1e9e6ac commit eb5f228
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 55 deletions.
25 changes: 0 additions & 25 deletions packaging/rpm/patches/pyopengl-py3.12-ctypes.patch

This file was deleted.

4 changes: 2 additions & 2 deletions packaging/rpm/patches/pyopengl-py3.13-nonumpy.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/setup.py 2024-06-13 21:10:17.429866015 +0700
+++ b/setup.py 2024-06-13 21:10:41.883706396 +0700
--- 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 @@
)

Expand Down
6 changes: 6 additions & 0 deletions packaging/rpm/patches/pyopengl-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--- 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"
48 changes: 20 additions & 28 deletions packaging/rpm/python3-pyopengl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
%global srcname PyOpenGL

Name: %{python3}-pyopengl
Version: 3.1.7
Release: 8%{?dist}
Version: 3.1.8
Release: 1%{?dist}
Summary: Python 3 bindings for OpenGL
License: BSD
URL: http://pyopengl.sourceforge.net/
Source0: https://files.pythonhosted.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz
Source1: https://files.pythonhosted.org/packages/source/P/%{srcname}-accelerate/%{srcname}-accelerate-%{version}.tar.gz
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-py3.12-ctypes.patch
Patch2: pyopengl-version.patch

BuildRequires: %{python3}-devel
BuildRequires: %{python3}-setuptools
Expand Down Expand Up @@ -64,40 +63,30 @@ Requires: %{python3}-tkinter

%prep
sha256=`sha256sum %{SOURCE0} | awk '{print $1}'`
if [ "${sha256}" != "eef31a3888e6984fd4d8e6c9961b184c9813ca82604d37fe3da80eb000a76c86" ]; then
if [ "${sha256}" != "78f4016f13705d66dc89d5d046eee660c2f5f0915e5ecfeeed79dffac741bc97" ]; then
echo "invalid checksum for %{SOURCE0}"
exit 1
fi
sha256=`sha256sum %{SOURCE1} | awk '{print $1}'`
if [ "${sha256}" != "2b123621273a939f7fd2ec227541e399f9b5d4e815d69ae0bdb1b6c70a293680" ]; then
echo "invalid checksum for %{SOURCE1}"
exit 1
fi
%setup -q -c -n %{srcname}-%{version} -T -a0 -a1
pushd %{srcname}-%{version}
%setup -q -c -n %{srcname}-%{version}
pushd pyopengl-release-%{version}
%patch -p1 -P 0
# doesn't hurt to apply in all cases:
%patch -p1 -P 2
popd
%if 0%{?fedora}>39
pushd %{srcname}-accelerate-%{version}
%patch -p1 -P 1
%patch -p1 -P 2
popd
%endif


%build
for dir in %{srcname}-%{version} %{srcname}-accelerate-%{version} ; do
pushd $dir
%{python3} setup.py build
for srcdir in pyopengl-release-%{version} pyopengl-release-%{version}/accelerate; do
pushd $srcdir
%{python3} setup.py build
popd
done


%install
for dir in %{srcname}-%{version} %{srcname}-accelerate-%{version} ; do
pushd $dir
%{python3} setup.py install -O1 --skip-build --root %{buildroot}
for srcdir in pyopengl-release-%{version} pyopengl-release-%{version}/accelerate; do
pushd $srcdir
%{python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
done

Expand All @@ -113,19 +102,22 @@ rm -fr %{buildroot}%{python3_sitearch}/UNKNOWN-*.egg-info


%files
%license %{srcname}-%{version}/license.txt
%{python3_sitelib}/%{srcname}-%{version}-py*.egg-info
%license pyopengl-release-%{version}/license.txt
%{python3_sitelib}/OpenGL/
%{python3_sitelib}/PyOpenGL*.egg-info
%exclude %{python3_sitelib}/OpenGL/Tk
%{python3_sitearch}/OpenGL_accelerate/
%{python3_sitearch}/%{srcname}_accelerate-%{version}-py*.egg-info/
%{python3_sitearch}/PyOpenGL_accelerate*.egg-info


%files -n %{python3}-pyopengl-tk
%{python3_sitelib}/OpenGL/Tk


%changelog
* Sat Nov 09 2024 Antoine Martin <[email protected]> - 3.1.8-1
- build new release from github archive, match merged layout

* Sat Aug 17 2024 Antoine Martin <[email protected]> - 3.1.7-8
- added cython dependency to re-generate the C bindings

Expand Down

0 comments on commit eb5f228

Please sign in to comment.