Compare commits
No commits in common. "rawhide" and "f34" have entirely different histories.
4 changed files with 124 additions and 119 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -9,8 +9,3 @@
|
||||||
/pyglet-1.4.6-repacked.tar.gz
|
/pyglet-1.4.6-repacked.tar.gz
|
||||||
/pyglet-1.5.7-repacked.tar.gz
|
/pyglet-1.5.7-repacked.tar.gz
|
||||||
/pyglet-1.5.11-repacked.tar.gz
|
/pyglet-1.5.11-repacked.tar.gz
|
||||||
/pyglet-1.5.16.tar.gz
|
|
||||||
/pyglet-1.5.16-repacked.tar.gz
|
|
||||||
/pyglet-1.5.23-repacked.tar.gz
|
|
||||||
/pyglet-1.5.27-repacked.tar.gz
|
|
||||||
/pyglet-2.0.10-repacked.tar.gz
|
|
||||||
|
|
|
||||||
104
e44509b5e4.patch
Normal file
104
e44509b5e4.patch
Normal file
|
|
@ -0,0 +1,104 @@
|
||||||
|
From e44509b5e42525f30b62137599e574fdd41f68bc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Benjamin Moran <benmoran@protonmail.com>
|
||||||
|
Date: Tue, 24 Nov 2020 11:42:02 +0900
|
||||||
|
Subject: [PATCH] Simplify UBO code, and revert some experimental code.
|
||||||
|
|
||||||
|
---
|
||||||
|
RELEASE_NOTES | 8 ++++++
|
||||||
|
pyglet/text/formats/attributed.py | 41 +++++++------------------------
|
||||||
|
2 files changed, 17 insertions(+), 32 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
|
||||||
|
index 5c4fe67a..f084a013 100644
|
||||||
|
--- a/RELEASE_NOTES
|
||||||
|
+++ b/RELEASE_NOTES
|
||||||
|
@@ -1,3 +1,11 @@
|
||||||
|
+pyglet 1.5.12
|
||||||
|
+Bugfix and feature release
|
||||||
|
+
|
||||||
|
+Bugfixes
|
||||||
|
+--------
|
||||||
|
+- Remove usage of deprecated `parser` module. (#312)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
pyglet 1.5.11
|
||||||
|
Bugfix release
|
||||||
|
|
||||||
|
diff --git a/pyglet/text/formats/attributed.py b/pyglet/text/formats/attributed.py
|
||||||
|
index 350e0844..3eb815c6 100644
|
||||||
|
--- a/pyglet/text/formats/attributed.py
|
||||||
|
+++ b/pyglet/text/formats/attributed.py
|
||||||
|
@@ -38,11 +38,7 @@
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
-import token
|
||||||
|
-import parser
|
||||||
|
-import operator
|
||||||
|
-
|
||||||
|
-from functools import reduce
|
||||||
|
+import ast
|
||||||
|
|
||||||
|
import pyglet
|
||||||
|
|
||||||
|
@@ -63,11 +59,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
class AttributedTextDecoder(pyglet.text.DocumentDecoder):
|
||||||
|
- def decode(self, text, location=None):
|
||||||
|
- self.doc = pyglet.text.document.FormattedDocument()
|
||||||
|
|
||||||
|
+ def __init__(self):
|
||||||
|
+ self.doc = pyglet.text.document.FormattedDocument()
|
||||||
|
self.length = 0
|
||||||
|
self.attributes = {}
|
||||||
|
+
|
||||||
|
+ def decode(self, text, location=None):
|
||||||
|
next_trailing_space = True
|
||||||
|
trailing_newline = True
|
||||||
|
|
||||||
|
@@ -90,22 +88,15 @@ def decode(self, text, location=None):
|
||||||
|
self.append(m.group('nl_para')[1:]) # ignore the first \n
|
||||||
|
trailing_newline = True
|
||||||
|
elif group == 'attr':
|
||||||
|
- try:
|
||||||
|
- ast = parser.expr(m.group('attr_val'))
|
||||||
|
- if self.safe(ast):
|
||||||
|
- val = eval(ast.compile())
|
||||||
|
- else:
|
||||||
|
- val = None
|
||||||
|
- except (parser.ParserError, SyntaxError):
|
||||||
|
- val = None
|
||||||
|
+ value = ast.literal_eval(m.group('attr_val'))
|
||||||
|
name = m.group('attr_name')
|
||||||
|
if name[0] == '.':
|
||||||
|
if trailing_newline:
|
||||||
|
- self.attributes[name[1:]] = val
|
||||||
|
+ self.attributes[name[1:]] = value
|
||||||
|
else:
|
||||||
|
- self.doc.set_paragraph_style(self.length, self.length, {name[1:]: val})
|
||||||
|
+ self.doc.set_paragraph_style(self.length, self.length, {name[1:]: value})
|
||||||
|
else:
|
||||||
|
- self.attributes[name] = val
|
||||||
|
+ self.attributes[name] = value
|
||||||
|
elif group == 'escape_dec':
|
||||||
|
self.append(chr(int(m.group('escape_dec_val'))))
|
||||||
|
elif group == 'escape_hex':
|
||||||
|
@@ -122,17 +113,3 @@ def append(self, text):
|
||||||
|
self.doc.insert_text(self.length, text, self.attributes)
|
||||||
|
self.length += len(text)
|
||||||
|
self.attributes.clear()
|
||||||
|
-
|
||||||
|
- _safe_names = ('True', 'False', 'None')
|
||||||
|
-
|
||||||
|
- def safe(self, ast):
|
||||||
|
- tree = ast.totuple()
|
||||||
|
- return self.safe_node(tree)
|
||||||
|
-
|
||||||
|
- def safe_node(self, node):
|
||||||
|
- if token.ISNONTERMINAL(node[0]):
|
||||||
|
- return reduce(operator.and_, map(self.safe_node, node[1:]))
|
||||||
|
- elif node[0] == token.NAME:
|
||||||
|
- return node[1] in self._safe_names
|
||||||
|
- else:
|
||||||
|
- return True
|
||||||
|
|
@ -4,34 +4,33 @@
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 2.0.10
|
Version: 1.5.11
|
||||||
Release: 9%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A cross-platform windowing and multimedia library for Python
|
Summary: A cross-platform windowing and multimedia library for Python
|
||||||
|
|
||||||
License: BSD-3-Clause
|
License: BSD
|
||||||
URL: http://www.pyglet.org/
|
URL: http://www.pyglet.org/
|
||||||
|
|
||||||
# The upstream tarball includes some non-free files in the examples and tests,
|
# The upstream tarball includes some non-free files in the examples and tests,
|
||||||
# and a patented texture compression algorithm.
|
# and a patented texture compression algorithm.
|
||||||
# Run the following (in rpmbuild/SOURCES) to generate the distributed tarball
|
# Run the following (in rpmbuild/SOURCES) to generate the distributed tarball:
|
||||||
# (the subcommand outputs a version number like 1.5.16):
|
# $ bash pyglet-get-tarball.sh 1.3.2
|
||||||
# $ bash pyglet-get-tarball.sh $(grep Version python-pyglet.spec|cut -c10-)
|
|
||||||
# See the script for details.
|
# See the script for details.
|
||||||
Source0: %{versionedname}-repacked.tar.gz
|
Source0: %{versionedname}-repacked.tar.gz
|
||||||
Source1: pyglet-get-tarball.sh
|
Source1: pyglet-get-tarball.sh
|
||||||
|
|
||||||
# Note that unbundling pypng removes "PNGImageDecoder", which is normally
|
# Remove usage of the deprecated `parser` module.
|
||||||
# available for advanced use cases. Instead of:
|
# This makes pyglet compatible with Python 3.10a.
|
||||||
# img = image.load(fname, decoder=PNGImageDecoder) # don't use!
|
# Merged upstream.
|
||||||
# It is enough to let Pyglet choose an appropriate decoder with:
|
Patch0: https://github.com/pyglet/pyglet/commit/e44509b5e4.patch
|
||||||
# img = image.load(fname)
|
|
||||||
# Pyglet docs even discourage hard-coding the decoder "unless your application
|
|
||||||
# has to work around specific deficiences in an operating system decoder":
|
|
||||||
# https://pyglet.readthedocs.io/en/latest/programming_guide/image.html?highlight=PILImageDecoder#loading-an-image
|
|
||||||
# If you do find an issue with the default decoder on Fedora, file a bug.
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
# Tests (and possibly sound synthesis?) fail on big-endian.
|
||||||
|
# Reported: https://github.com/pyglet/pyglet/issues/278
|
||||||
|
# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1877849
|
||||||
|
ExcludeArch: s390x
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: pyproject-rpm-macros
|
BuildRequires: pyproject-rpm-macros
|
||||||
|
|
||||||
|
|
@ -41,20 +40,9 @@ BuildRequires: pyproject-rpm-macros
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: /usr/bin/xvfb-run mesa-dri-drivers
|
BuildRequires: /usr/bin/xvfb-run mesa-dri-drivers
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
# These two for gdkpixbuf2 tests
|
|
||||||
BuildRequires: gtk2-devel
|
|
||||||
BuildRequires: gdk-pixbuf2-devel
|
|
||||||
# libpurple has sound files unbundled in the repacked tarball
|
# libpurple has sound files unbundled in the repacked tarball
|
||||||
BuildRequires: libpurple
|
BuildRequires: libpurple
|
||||||
# These tests fail in koji, likely due to missing devices
|
|
||||||
#BuildRequires: openal-soft
|
|
||||||
# These are not specified by upstream
|
|
||||||
BuildRequires: python3-gobject
|
|
||||||
# Some tests fail if this is present
|
|
||||||
# https://github.com/pyglet/pyglet/issues/875
|
|
||||||
#BuildRequires: python3-pytest-asyncio
|
|
||||||
%endif
|
%endif
|
||||||
Requires: python3-gobject
|
|
||||||
|
|
||||||
|
|
||||||
%global _description %{expand:
|
%global _description %{expand:
|
||||||
|
|
@ -86,9 +74,6 @@ Requires: libGLU
|
||||||
Requires: libX11
|
Requires: libX11
|
||||||
Requires: fontconfig
|
Requires: fontconfig
|
||||||
|
|
||||||
# Needed for experimental headless mode; see: https://github.com/pyglet/pyglet/issues/51
|
|
||||||
Suggests: libEGL
|
|
||||||
|
|
||||||
# Pillow is technically optional, but in Fedora we always pull it in.
|
# Pillow is technically optional, but in Fedora we always pull it in.
|
||||||
# It can open PNG images, so we can remove the bundled "png.py"
|
# It can open PNG images, so we can remove the bundled "png.py"
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
|
|
@ -96,7 +81,6 @@ Requires: python3-pillow
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
BuildRequires: libGL
|
BuildRequires: libGL
|
||||||
BuildRequires: libGLU
|
BuildRequires: libGLU
|
||||||
BuildRequires: libEGL
|
|
||||||
BuildRequires: libX11
|
BuildRequires: libX11
|
||||||
BuildRequires: fontconfig
|
BuildRequires: fontconfig
|
||||||
BuildRequires: python3-pillow
|
BuildRequires: python3-pillow
|
||||||
|
|
@ -138,104 +122,26 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/
|
||||||
# Interactive tests are skipped for obvious reasons.
|
# Interactive tests are skipped for obvious reasons.
|
||||||
# Media player tests are skipped -- we don't have PulseAudio running.
|
# Media player tests are skipped -- we don't have PulseAudio running.
|
||||||
# test_find_font_match & test_have_font skipped -- they look for a font named 'arial'
|
# test_find_font_match & test_have_font skipped -- they look for a font named 'arial'
|
||||||
# test_font & test_freetype_face tests are skipped -- they depend on non-free font we remove
|
# test_freetype_face tests are is skipped -- they depend on non-free font we remove
|
||||||
# test_push_handlers_instance has broken mocking: https://github.com/pyglet/pyglet/issues/606
|
|
||||||
# GdkPixBufTest.test_load_animation uses dinosaur.gif which we remove
|
|
||||||
%pytest \
|
%pytest \
|
||||||
-vv \
|
-vv \
|
||||||
--non-interactive \
|
--non-interactive \
|
||||||
--ignore=tests/interactive \
|
--ignore=tests/interactive \
|
||||||
--ignore=tests/integration/media \
|
--ignore=tests/integration/media \
|
||||||
-m 'not (requires_user_action or requires_user_validation or only_interactive)' \
|
-m 'not (requires_user_action or requires_user_validation or only_interactive)' \
|
||||||
-k 'not (test_find_font_match or test_font or test_have_font or test_freetype_face or test_openal_listener or test_push_handlers_instance)' \
|
-k 'not (test_find_font_match or test_have_font or test_freetype_face)' \
|
||||||
--deselect tests/integration/image/test_gdkpixbuf2.py::GdkPixBufTest::test_load_animation \
|
|
||||||
tests
|
tests
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{srcname} -f %%{pyproject_files}
|
%files -n python3-%{srcname} -f %%{pyproject_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md RELEASE_NOTES
|
%doc README.md
|
||||||
|
%doc RELEASE_NOTES
|
||||||
|
%doc NOTICE
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.0.10-9
|
|
||||||
- Rebuilt for Python 3.14.0rc3 bytecode
|
|
||||||
|
|
||||||
* Sat Aug 23 2025 Orion Poplawski <orion@nwra.com> - 2.0.10-8
|
|
||||||
- Add BR/R on python3-gobject, skip openal test (FTBFS rhbz#2379002)
|
|
||||||
|
|
||||||
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.0.10-7
|
|
||||||
- Rebuilt for Python 3.14.0rc2 bytecode
|
|
||||||
|
|
||||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 2.0.10-5
|
|
||||||
- Rebuilt for Python 3.14
|
|
||||||
|
|
||||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 2.0.10-2
|
|
||||||
- Rebuilt for Python 3.13
|
|
||||||
|
|
||||||
* Sat Feb 17 2024 Orion Poplawski <orion@nwra.com> - 2.0.10-1
|
|
||||||
- Update to 2.0.10
|
|
||||||
|
|
||||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.27-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.27-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.27-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jun 17 2023 Orion Poplawski <orion@nwra.com> - 1.5.27-1
|
|
||||||
- Update to 1.5.27
|
|
||||||
- Add patch for Python 3.12 support
|
|
||||||
- Use SPDX License
|
|
||||||
|
|
||||||
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 1.5.23-5
|
|
||||||
- Rebuilt for Python 3.12
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.23-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.23-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.5.23-2
|
|
||||||
- Rebuilt for Python 3.11
|
|
||||||
|
|
||||||
* Thu Apr 28 2022 Petr Viktorin <pviktori@redhat.com> - 1.5.23-1
|
|
||||||
- Update to 1.5.23
|
|
||||||
- This version should not attempt to use the incompatible ffmpeg 5.0,
|
|
||||||
and fall back to another sound backend if available.
|
|
||||||
Resolves: RHBZ#2075965
|
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Oct 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.5.16-4
|
|
||||||
- Backport upstream patch to fix ExcludeArch (fix RHBZ#1877849)
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.16-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.5.16-2
|
|
||||||
- Rebuilt for Python 3.10
|
|
||||||
|
|
||||||
* Wed Apr 14 2021 Petr Viktorin <pviktori@redhat.com> - 1.5.16-1
|
|
||||||
- Update to 1.5.16
|
|
||||||
- Add a comment on how to handle unbundled "pypng"
|
|
||||||
- Suggest libEGL for new headless mode (experimental, undocumented)
|
|
||||||
- Remove patch that's now upstream
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.11-2
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.11-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (pyglet-2.0.10-repacked.tar.gz) = 8c780913435b1c17e43dcc99e729a2ea5d6a6e734cce642b8da82547f734cc9ce43732257e4f241eb3803a9edc941a96a762e869043260ff15adc84ba5c6d813
|
SHA512 (pyglet-1.5.11-repacked.tar.gz) = 5b658b11c5ddae223a1aee0db365d65e265f9fde80aa42abbc57272f508bcf26b285b51d66ff0e80da6854128f83d3bcba6457bfbfe5f1082b43ce5ad1288377
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue