From 25a339e965f3b1c8b7a634cbf832255054350624 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 9 Sep 2020 18:34:21 +0200 Subject: [PATCH 01/31] Update to 1.5.7 and modernize --- .gitignore | 1 + pyglet-get-tarball.sh | 10 ++++- python-pyglet.spec | 92 ++++++++++++++++++++++++++++++++----------- sources | 2 +- 4 files changed, 78 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 2896b44..c09caa0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /pyglet-1.3.2-repacked.tar.gz /pyglet-1.4.1-repacked.tar.gz /pyglet-1.4.6-repacked.tar.gz +/pyglet-1.5.7-repacked.tar.gz diff --git a/pyglet-get-tarball.sh b/pyglet-get-tarball.sh index 67f4148..4ac3656 100644 --- a/pyglet-get-tarball.sh +++ b/pyglet-get-tarball.sh @@ -7,12 +7,18 @@ ARCHIVENAME=${VERSIONEDNAME}.tar.gz wget -N https://github.com/pyglet/pyglet/archive/v${VERSION}.tar.gz -O ${ARCHIVENAME} tar xzvf ${ARCHIVENAME} pushd ${VERSIONEDNAME} -rm -rvf examples # includes non-free artwork -rm -rvf tests # includes non-free font rm -rvf tools # random developer tools (*) rm -rvf contrib # again, questionable licensing rm -v pyglet/image/codecs/s3tc.py # patent-encumbered algorithm (**) rm -v pyglet/image/codecs/dds.py # image codec that uses s3tc (**) +rm -rvf examples # includes non-free artwork +rm -rvf tests/data/fonts # includes non-free font +rm -rvf tests/data/images/*.dds # compressed with patent-encumbered algorithm +rm -rvf tests/data/images/dinosaur.gif # questionable origin + +# questionable sound files "retrieved from libpurple": +rm -rvf tests/data/media/{alert,login,logout,receive,send}.wav + popd tar czvf ${VERSIONEDNAME}-repacked.tar.gz ${VERSIONEDNAME} diff --git a/python-pyglet.spec b/python-pyglet.spec index 98d604f..53009fe 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -1,10 +1,12 @@ %global srcname pyglet -%global srcversion 1.4.6 +%global srcversion 1.5.7 %global versionedname %{srcname}-%{srcversion} +%bcond_without tests + Name: python-%{srcname} Version: %{srcversion} -Release: 4%{?dist} +Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -21,9 +23,18 @@ Source1: pyglet-get-tarball.sh BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: pyproject-rpm-macros -%description +# Tests need OpenGL +# See also: https://bugzilla.redhat.com/show_bug.cgi?id=904851 +%global __pytest xvfb-run -s '-screen 0 640x480x24' pytest +%if %{with tests} +BuildRequires: /usr/bin/xvfb-run mesa-dri-drivers +BuildRequires: python3-pytest +%endif + + +%global _description %{expand: This library provides an object-oriented programming interface for developing games and other visually-rich applications with Python. pyglet has virtually no external dependencies. For most applications and game @@ -32,6 +43,13 @@ distribution and installation. It also handles multiple windows and fully aware of multi-monitor setups. pyglet might be seen as an alternative to PyGame. +} + +%generate_buildrequires +%pyproject_buildrequires + + +%description %_description %package -n python3-%{srcname} @@ -39,24 +57,26 @@ Summary: A cross-platform windowing and multimedia library for Python 3 %{?python_provide:%python_provide python3-%{srcname}} -Requires: python3 -Requires: python3-pillow -Requires: python3-future - # The libraries are imported dynamically using ctypes, so rpm can't find them. Requires: libGL Requires: libGLU Requires: libX11 +Requires: fontconfig -%description -n python3-%{srcname} -This library provides an object-oriented programming interface for developing -games and other visually-rich applications with Python 3. -pyglet has virtually no external dependencies. For most applications and game -requirements, pyglet needs nothing else besides Python, simplifying -distribution and installation. It also handles multiple windows and -fully aware of multi-monitor setups. +# 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" +Requires: python3-pillow -pyglet might be seen as an alternative to PyGame. +%if %{with tests} +BuildRequires: libGL +BuildRequires: libGLU +BuildRequires: libX11 +BuildRequires: fontconfig +BuildRequires: python3-pillow +%endif + + +%description -n python3-%{srcname} %_description %prep @@ -66,30 +86,54 @@ pyglet might be seen as an alternative to PyGame. rm pyglet/image/codecs/png.py rm pyglet/extlibs/png.py -# The future library can be unbundled (upstream even does it for the wheel distribution) -rm -r pyglet/extlibs/future - # Get rid of hashbang lines. This is a library, it has no executable scripts. # Also remove Windows newlines find . -name '*.py' | xargs sed --in-place -e's|#!/usr/bin/\(env \)\?python||;s/\r//' %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install -%files -n python3-%{srcname} +%pyproject_save_files pyglet + + +%files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE %doc README.md %doc RELEASE_NOTES %doc NOTICE -%{python3_sitelib}/%{versionedname}-py%{python3_version}.egg-info -%{python3_sitelib}/%{srcname} + + +%if %{with tests} +%check +# Skip flaky tests +export CI=on + +# Interactive tests are skipped for obvious reasons. +# 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_freetype_face tests are is skipped -- they depend on non-free font we remove +# test_no_decoders_available depends on removed possibly-non-free audio file +%pytest \ + -vv \ + --non-interactive \ + --ignore=tests/interactive \ + --ignore=tests/integration/media \ + -m 'not (requires_user_action or requires_user_validation or only_interactive)' \ + -k 'not (test_find_font_match or test_have_font or test_freetype_face or test_no_decoders_available)' \ + tests +%endif %changelog +* Wed Sep 09 2020 Petr Viktorin - 1.5.7-1 +- Update to 1.5.7 +- Switch to pyproject macros +- Run tests + * Wed Jul 29 2020 Fedora Release Engineering - 1.4.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 91c947e..77cae25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.4.6-repacked.tar.gz) = 20f3b5c762de1ae1247109a40af4c659f15ee2e900c44cd072dce6ff2cf0bfd909a84b4581addfe8870af9151e5cc90a06d88e1fbdaa282f8156f2bedd7c6e59 +SHA512 (pyglet-1.5.7-repacked.tar.gz) = 143cb5ed6dbfa11f9d54fdceca357067d35b419aa1870ef25edc40c26cac0d86148ba58af50ef3bced5b60dfc7dcb818e08cd0d240688b145f19ab5f68e9c6a4 From f5c26e11a604a0c366b36d11ded5250ed81c1db2 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 10 Sep 2020 12:50:09 +0200 Subject: [PATCH 02/31] Move the %check section above %files --- python-pyglet.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 53009fe..867230f 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -100,13 +100,6 @@ find . -name '*.py' | xargs sed --in-place -e's|#!/usr/bin/\(env \)\?python||;s/ %pyproject_save_files pyglet -%files -n python3-%{srcname} -f %{pyproject_files} -%license LICENSE -%doc README.md -%doc RELEASE_NOTES -%doc NOTICE - - %if %{with tests} %check # Skip flaky tests @@ -128,6 +121,13 @@ export CI=on %endif +%files -n python3-%{srcname} -f %%{pyproject_files} +%license LICENSE +%doc README.md +%doc RELEASE_NOTES +%doc NOTICE + + %changelog * Wed Sep 09 2020 Petr Viktorin - 1.5.7-1 - Update to 1.5.7 From 02e02edf51b78fff228197367d444d533c1b6daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 10 Sep 2020 13:10:03 +0200 Subject: [PATCH 03/31] Enable test_no_decoders_available with sounds from libpurple --- python-pyglet.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 867230f..ee193ec 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -31,6 +31,8 @@ BuildRequires: pyproject-rpm-macros %if %{with tests} BuildRequires: /usr/bin/xvfb-run mesa-dri-drivers BuildRequires: python3-pytest +# libpurple has sound files unbundled in the repacked tarball +BuildRequires: libpurple %endif @@ -105,18 +107,20 @@ find . -name '*.py' | xargs sed --in-place -e's|#!/usr/bin/\(env \)\?python||;s/ # Skip flaky tests export CI=on +# The files are unbundled in the repacked tarball +ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ + # Interactive tests are skipped for obvious reasons. # 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_freetype_face tests are is skipped -- they depend on non-free font we remove -# test_no_decoders_available depends on removed possibly-non-free audio file %pytest \ -vv \ --non-interactive \ --ignore=tests/interactive \ --ignore=tests/integration/media \ -m 'not (requires_user_action or requires_user_validation or only_interactive)' \ - -k 'not (test_find_font_match or test_have_font or test_freetype_face or test_no_decoders_available)' \ + -k 'not (test_find_font_match or test_have_font or test_freetype_face)' \ tests %endif From a19ecf6e4b5d399119c48983ebce5a5e4cb5d1d5 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 10 Sep 2020 16:55:52 +0200 Subject: [PATCH 04/31] ExcludeArch s390x until tests are fixed upstream --- python-pyglet.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-pyglet.spec b/python-pyglet.spec index ee193ec..e232290 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -22,6 +22,11 @@ Source1: pyglet-get-tarball.sh 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: pyproject-rpm-macros From f7ae4e365ea235dd7d4338b2ab903b5980a92b76 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 25 Nov 2020 14:40:31 +0100 Subject: [PATCH 05/31] Update to 1.5.11 --- .gitignore | 1 + python-pyglet.spec | 8 +++++--- sources | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c09caa0..814f533 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /pyglet-1.4.1-repacked.tar.gz /pyglet-1.4.6-repacked.tar.gz /pyglet-1.5.7-repacked.tar.gz +/pyglet-1.5.11-repacked.tar.gz diff --git a/python-pyglet.spec b/python-pyglet.spec index e232290..d16a0d3 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -1,11 +1,10 @@ %global srcname pyglet -%global srcversion 1.5.7 -%global versionedname %{srcname}-%{srcversion} +%global versionedname %{srcname}-%{version} %bcond_without tests Name: python-%{srcname} -Version: %{srcversion} +Version: 1.5.11 Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python @@ -138,6 +137,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Wed Nov 25 2020 Petr Viktorin - 1.5.11-1 +- Update to 1.5.11 + * Wed Sep 09 2020 Petr Viktorin - 1.5.7-1 - Update to 1.5.7 - Switch to pyproject macros diff --git a/sources b/sources index 77cae25..3af51ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.5.7-repacked.tar.gz) = 143cb5ed6dbfa11f9d54fdceca357067d35b419aa1870ef25edc40c26cac0d86148ba58af50ef3bced5b60dfc7dcb818e08cd0d240688b145f19ab5f68e9c6a4 +SHA512 (pyglet-1.5.11-repacked.tar.gz) = 5b658b11c5ddae223a1aee0db365d65e265f9fde80aa42abbc57272f508bcf26b285b51d66ff0e80da6854128f83d3bcba6457bfbfe5f1082b43ce5ad1288377 From 70b01928452eb1b76d8de52394073fe15eb82642 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 25 Nov 2020 15:15:41 +0100 Subject: [PATCH 06/31] Remove usage of `parser` for Python 3.10 compatibility --- e44509b5e4.patch | 104 +++++++++++++++++++++++++++++++++++++++++++++ python-pyglet.spec | 7 ++- 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 e44509b5e4.patch diff --git a/e44509b5e4.patch b/e44509b5e4.patch new file mode 100644 index 0000000..879c992 --- /dev/null +++ b/e44509b5e4.patch @@ -0,0 +1,104 @@ +From e44509b5e42525f30b62137599e574fdd41f68bc Mon Sep 17 00:00:00 2001 +From: Benjamin Moran +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 diff --git a/python-pyglet.spec b/python-pyglet.spec index d16a0d3..33f6fc7 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -19,6 +19,11 @@ URL: http://www.pyglet.org/ Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh +# Remove usage of the deprecated `parser` module. +# This makes pyglet compatible with Python 3.10a. +# Merged upstream. +Patch0: https://github.com/pyglet/pyglet/commit/e44509b5e4.patch + BuildArch: noarch # Tests (and possibly sound synthesis?) fail on big-endian. @@ -86,7 +91,7 @@ BuildRequires: python3-pillow %prep -%setup -q -n %{versionedname} +%autosetup -p1 -n %{versionedname} # Remove the bundled pypng library (python-pillow provides the same functionality) rm pyglet/image/codecs/png.py From d336dbdaf5cf20b93d7b0ccf51246e1c047ff4df Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 12:35:01 +0000 Subject: [PATCH 07/31] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 33f6fc7..9e7eb9d 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -142,6 +142,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Nov 25 2020 Petr Viktorin - 1.5.11-1 - Update to 1.5.11 From 6ec4b2041c5542d38afa851527f4bd3bf906d87d Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 14 Apr 2021 17:57:09 +0200 Subject: [PATCH 08/31] Update to 1.5.16 --- .gitignore | 2 + e44509b5e4.patch | 104 --------------------------------------------- python-pyglet.spec | 32 ++++++++++---- sources | 2 +- 4 files changed, 27 insertions(+), 113 deletions(-) delete mode 100644 e44509b5e4.patch diff --git a/.gitignore b/.gitignore index 814f533..d1b7169 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ /pyglet-1.4.6-repacked.tar.gz /pyglet-1.5.7-repacked.tar.gz /pyglet-1.5.11-repacked.tar.gz +/pyglet-1.5.16.tar.gz +/pyglet-1.5.16-repacked.tar.gz diff --git a/e44509b5e4.patch b/e44509b5e4.patch deleted file mode 100644 index 879c992..0000000 --- a/e44509b5e4.patch +++ /dev/null @@ -1,104 +0,0 @@ -From e44509b5e42525f30b62137599e574fdd41f68bc Mon Sep 17 00:00:00 2001 -From: Benjamin Moran -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 diff --git a/python-pyglet.spec b/python-pyglet.spec index 9e7eb9d..656d2fe 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -4,8 +4,8 @@ %bcond_without tests Name: python-%{srcname} -Version: 1.5.11 -Release: 2%{?dist} +Version: 1.5.16 +Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -13,16 +13,22 @@ URL: http://www.pyglet.org/ # The upstream tarball includes some non-free files in the examples and tests, # and a patented texture compression algorithm. -# Run the following (in rpmbuild/SOURCES) to generate the distributed tarball: -# $ bash pyglet-get-tarball.sh 1.3.2 +# 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 $(grep Version python-pyglet.spec|cut -c10-) # See the script for details. Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh -# Remove usage of the deprecated `parser` module. -# This makes pyglet compatible with Python 3.10a. -# Merged upstream. -Patch0: https://github.com/pyglet/pyglet/commit/e44509b5e4.patch +# Note that unbundling pypng removes "PNGImageDecoder", which is normally +# available for advanced use cases. Instead of: +# img = image.load(fname, decoder=PNGImageDecoder) # don't use! +# It is enough to let Pyglet choose an appropriate decoder with: +# 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 @@ -74,6 +80,9 @@ Requires: libGLU Requires: libX11 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. # It can open PNG images, so we can remove the bundled "png.py" Requires: python3-pillow @@ -81,6 +90,7 @@ Requires: python3-pillow %if %{with tests} BuildRequires: libGL BuildRequires: libGLU +BuildRequires: libEGL BuildRequires: libX11 BuildRequires: fontconfig BuildRequires: python3-pillow @@ -142,6 +152,12 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Wed Apr 14 2021 Petr Viktorin - 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 - 1.5.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 3af51ca..d83243d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.5.11-repacked.tar.gz) = 5b658b11c5ddae223a1aee0db365d65e265f9fde80aa42abbc57272f508bcf26b285b51d66ff0e80da6854128f83d3bcba6457bfbfe5f1082b43ce5ad1288377 +SHA512 (pyglet-1.5.16-repacked.tar.gz) = 70df7e9f5d5e8c26b040b187b605dd56d4a4c588b99261b68d4a84f5a6154c9b940c17a99ee375cef28ca3b537f85c4ad3937a1e8534a66d81292c9eac0870dd From 88678ca36221ea97c8957ede48a14aa4d0d70139 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:53:31 +0200 Subject: [PATCH 09/31] Rebuilt for Python 3.10 --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 656d2fe..7588912 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -152,6 +152,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jun 04 2021 Python Maint - 1.5.16-2 +- Rebuilt for Python 3.10 + * Wed Apr 14 2021 Petr Viktorin - 1.5.16-1 - Update to 1.5.16 - Add a comment on how to handle unbundled "pypng" From a59df89fd71b4d2448c1fac1bf8d698c2cf4d4e5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 08:34:36 +0000 Subject: [PATCH 10/31] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 7588912..2ed23a8 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.16 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -152,6 +152,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.5.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 1.5.16-2 - Rebuilt for Python 3.10 From 9101d813e96649133ccb6b470d6a09c0d0674c97 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 10 Oct 2021 14:49:25 -0400 Subject: [PATCH 11/31] Backport upstream patch to fix ExcludeArch (fix RHBZ#1877849) --- pyglet-1.5.16-backport-pr-469.patch | 21 +++++++++++++++++++++ python-pyglet.spec | 14 ++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 pyglet-1.5.16-backport-pr-469.patch diff --git a/pyglet-1.5.16-backport-pr-469.patch b/pyglet-1.5.16-backport-pr-469.patch new file mode 100644 index 0000000..e2ef360 --- /dev/null +++ b/pyglet-1.5.16-backport-pr-469.patch @@ -0,0 +1,21 @@ +diff -Naur pyglet-1.5.16-original/tests/unit/media/test_synthesis.py pyglet-1.5.16/tests/unit/media/test_synthesis.py +--- pyglet-1.5.16-original/tests/unit/media/test_synthesis.py 2021-04-13 05:57:56.000000000 -0400 ++++ pyglet-1.5.16/tests/unit/media/test_synthesis.py 2021-10-10 14:46:08.063474857 -0400 +@@ -1,4 +1,5 @@ + import unittest ++import wave + + from ctypes import sizeof + from io import BytesIO +@@ -79,9 +80,8 @@ + source_name = self.source_class.__name__.lower() + filename = "synthesis_{0}_{1}_{2}_1ch.wav".format(source_name, sample_size, sample_rate) + +- with open(get_test_data_file('media', filename), 'rb') as f: +- # discard the wave header: +- loaded_bytes = f.read()[44:] ++ with wave.open(get_test_data_file('media', filename)) as f: ++ loaded_bytes = f.readframes(-1) + source.seek(0) + generated_data = source.get_audio_data(source._max_offset) + bytes_buffer = BytesIO(generated_data.data).getvalue() diff --git a/python-pyglet.spec b/python-pyglet.spec index 2ed23a8..b2efcd7 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.16 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -20,6 +20,10 @@ URL: http://www.pyglet.org/ Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh +# Backport upstream patch for big-endian support to remove ExcludeArch: +# https://github.com/pyglet/pyglet/pull/469 +Patch0: pyglet-1.5.16-backport-pr-469.patch + # Note that unbundling pypng removes "PNGImageDecoder", which is normally # available for advanced use cases. Instead of: # img = image.load(fname, decoder=PNGImageDecoder) # don't use! @@ -32,11 +36,6 @@ Source1: pyglet-get-tarball.sh 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: pyproject-rpm-macros @@ -152,6 +151,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Sun Oct 10 2021 Benjamin A. Beasley - 1.5.16-4 +- Backport upstream patch to fix ExcludeArch (fix RHBZ#1877849) + * Fri Jul 23 2021 Fedora Release Engineering - 1.5.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 01562838d8974cd8d931e9ee156672a2574d1d25 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:32:07 +0000 Subject: [PATCH 12/31] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index b2efcd7..58abd6d 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.16 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -151,6 +151,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1.5.16-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sun Oct 10 2021 Benjamin A. Beasley - 1.5.16-4 - Backport upstream patch to fix ExcludeArch (fix RHBZ#1877849) From 25e845cfca76a6283746e960c9b846688ab56902 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 28 Apr 2022 10:34:44 +0200 Subject: [PATCH 13/31] Update to 1.5.23 --- .gitignore | 1 + pyglet-1.5.16-backport-pr-469.patch | 21 --------------------- python-pyglet.spec | 14 ++++++++------ sources | 2 +- 4 files changed, 10 insertions(+), 28 deletions(-) delete mode 100644 pyglet-1.5.16-backport-pr-469.patch diff --git a/.gitignore b/.gitignore index d1b7169..bd8b7e2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /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 diff --git a/pyglet-1.5.16-backport-pr-469.patch b/pyglet-1.5.16-backport-pr-469.patch deleted file mode 100644 index e2ef360..0000000 --- a/pyglet-1.5.16-backport-pr-469.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -Naur pyglet-1.5.16-original/tests/unit/media/test_synthesis.py pyglet-1.5.16/tests/unit/media/test_synthesis.py ---- pyglet-1.5.16-original/tests/unit/media/test_synthesis.py 2021-04-13 05:57:56.000000000 -0400 -+++ pyglet-1.5.16/tests/unit/media/test_synthesis.py 2021-10-10 14:46:08.063474857 -0400 -@@ -1,4 +1,5 @@ - import unittest -+import wave - - from ctypes import sizeof - from io import BytesIO -@@ -79,9 +80,8 @@ - source_name = self.source_class.__name__.lower() - filename = "synthesis_{0}_{1}_{2}_1ch.wav".format(source_name, sample_size, sample_rate) - -- with open(get_test_data_file('media', filename), 'rb') as f: -- # discard the wave header: -- loaded_bytes = f.read()[44:] -+ with wave.open(get_test_data_file('media', filename)) as f: -+ loaded_bytes = f.readframes(-1) - source.seek(0) - generated_data = source.get_audio_data(source._max_offset) - bytes_buffer = BytesIO(generated_data.data).getvalue() diff --git a/python-pyglet.spec b/python-pyglet.spec index 58abd6d..06d8aa5 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -4,8 +4,8 @@ %bcond_without tests Name: python-%{srcname} -Version: 1.5.16 -Release: 5%{?dist} +Version: 1.5.23 +Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -20,10 +20,6 @@ URL: http://www.pyglet.org/ Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh -# Backport upstream patch for big-endian support to remove ExcludeArch: -# https://github.com/pyglet/pyglet/pull/469 -Patch0: pyglet-1.5.16-backport-pr-469.patch - # Note that unbundling pypng removes "PNGImageDecoder", which is normally # available for advanced use cases. Instead of: # img = image.load(fname, decoder=PNGImageDecoder) # don't use! @@ -151,6 +147,12 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Thu Apr 28 2022 Petr Viktorin - 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 - 1.5.16-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index d83243d..93282d8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.5.16-repacked.tar.gz) = 70df7e9f5d5e8c26b040b187b605dd56d4a4c588b99261b68d4a84f5a6154c9b940c17a99ee375cef28ca3b537f85c4ad3937a1e8534a66d81292c9eac0870dd +SHA512 (pyglet-1.5.23-repacked.tar.gz) = 3385bcfe93ed3b50e1fd8e3c148fc363a72615ece8a2f4ba136df71e480d4c556e0dbd9183911746cdcbe7245aad49f825f6640866e39bd39c204cca6142b3f6 From cc8e511b2494f69eff7c4c2afbb76a308cb32350 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 23:07:33 +0200 Subject: [PATCH 14/31] Rebuilt for Python 3.11 --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 06d8aa5..467544b 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.23 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -147,6 +147,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Mon Jun 13 2022 Python Maint - 1.5.23-2 +- Rebuilt for Python 3.11 + * Thu Apr 28 2022 Petr Viktorin - 1.5.23-1 - Update to 1.5.23 - This version should not attempt to use the incompatible ffmpeg 5.0, From 3a5fafa0258bccd3e7c04a59a22a4f3afaece954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 17 Jun 2022 01:19:11 +0200 Subject: [PATCH 15/31] Skip test_push_handlers_instance --- python-pyglet.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 467544b..c88d512 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -128,13 +128,14 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ # 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_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 %pytest \ -vv \ --non-interactive \ --ignore=tests/interactive \ --ignore=tests/integration/media \ -m 'not (requires_user_action or requires_user_validation or only_interactive)' \ - -k 'not (test_find_font_match or test_have_font or test_freetype_face)' \ + -k 'not (test_find_font_match or test_have_font or test_freetype_face or test_push_handlers_instance)' \ tests %endif From 805c1205f55e6cbc8b5a3121c3b5af69ecc52f9f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 21:15:16 +0000 Subject: [PATCH 16/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index c88d512..90fd18d 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.23 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -148,6 +148,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 1.5.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 1.5.23-2 - Rebuilt for Python 3.11 From 47715f4adb9dad8f937b238687ed0e83396e82ce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 16:04:54 +0000 Subject: [PATCH 17/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 90fd18d..7a6d5b2 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.23 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -148,6 +148,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 1.5.23-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 1.5.23-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 111ed9c4b77eb8efb4cd3dc27ad8323ed6072670 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 16 Jun 2023 18:00:05 +0200 Subject: [PATCH 18/31] Rebuilt for Python 3.12 --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 7a6d5b2..e617c15 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.23 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD @@ -148,6 +148,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jun 16 2023 Python Maint - 1.5.23-5 +- Rebuilt for Python 3.12 + * Fri Jan 20 2023 Fedora Release Engineering - 1.5.23-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 45ba8fa1937101b73184c5c7fd3f8a8c488d0528 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Sat, 17 Jun 2023 08:17:36 -0600 Subject: [PATCH 19/31] Update to 1.5.27 Add patch for Python 3.12 support Use SPDX License --- .gitignore | 1 + python-pyglet-imp.patch | 21 +++++++++++++++++++++ python-pyglet.spec | 19 ++++++++++++++++--- sources | 2 +- 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 python-pyglet-imp.patch diff --git a/.gitignore b/.gitignore index bd8b7e2..0022dd0 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /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 diff --git a/python-pyglet-imp.patch b/python-pyglet-imp.patch new file mode 100644 index 0000000..0ceed8a --- /dev/null +++ b/python-pyglet-imp.patch @@ -0,0 +1,21 @@ +diff -up pyglet-1.5.27/tests/integration/test_toplevel_imports.py.imp pyglet-1.5.27/tests/integration/test_toplevel_imports.py +--- pyglet-1.5.27/tests/integration/test_toplevel_imports.py.imp 2023-06-17 07:55:27.061254060 -0600 ++++ pyglet-1.5.27/tests/integration/test_toplevel_imports.py 2023-06-17 08:01:50.139739485 -0600 +@@ -5,7 +5,7 @@ + This _must_ be the first test run. + ''' + +-import imp ++import importlib + import unittest + + import pyglet +@@ -47,7 +47,7 @@ def add_module_tests(name, bases, dict): + def create_test(components): + def test_module(self): + top = pyglet +- imp.reload(top) ++ importlib.reload(top) + for component in components: + self.assertTrue(hasattr(top, component), + 'Cannot access "%s" in "%s"' % (component, top.__name__)) diff --git a/python-pyglet.spec b/python-pyglet.spec index e617c15..30a02d8 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -4,11 +4,11 @@ %bcond_without tests Name: python-%{srcname} -Version: 1.5.23 -Release: 5%{?dist} +Version: 1.5.27 +Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python -License: BSD +License: BSD-3-Clause URL: http://www.pyglet.org/ # The upstream tarball includes some non-free files in the examples and tests, @@ -20,6 +20,9 @@ URL: http://www.pyglet.org/ Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh +# Use importlib instead of imp +Patch0: python-pyglet-imp.patch + # Note that unbundling pypng removes "PNGImageDecoder", which is normally # available for advanced use cases. Instead of: # img = image.load(fname, decoder=PNGImageDecoder) # don't use! @@ -41,6 +44,9 @@ BuildRequires: pyproject-rpm-macros %if %{with tests} BuildRequires: /usr/bin/xvfb-run mesa-dri-drivers BuildRequires: python3-pytest +# These two for gdkpixbuf2 tests +BuildRequires: gtk2-devel +BuildRequires: gdk-pixbuf2-devel # libpurple has sound files unbundled in the repacked tarball BuildRequires: libpurple %endif @@ -129,6 +135,7 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ # test_find_font_match & test_have_font skipped -- they look for a font named 'arial' # 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 \ -vv \ --non-interactive \ @@ -136,6 +143,7 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ --ignore=tests/integration/media \ -m 'not (requires_user_action or requires_user_validation or only_interactive)' \ -k 'not (test_find_font_match or test_have_font or test_freetype_face or test_push_handlers_instance)' \ + --deselect tests/integration/image/test_gdkpixbuf2.py::GdkPixBufTest::test_load_animation \ tests %endif @@ -148,6 +156,11 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Sat Jun 17 2023 Orion Poplawski - 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 - 1.5.23-5 - Rebuilt for Python 3.12 diff --git a/sources b/sources index 93282d8..102f0ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.5.23-repacked.tar.gz) = 3385bcfe93ed3b50e1fd8e3c148fc363a72615ece8a2f4ba136df71e480d4c556e0dbd9183911746cdcbe7245aad49f825f6640866e39bd39c204cca6142b3f6 +SHA512 (pyglet-1.5.27-repacked.tar.gz) = 496b1b94bde77e2ddf095d021b0736969abd7e70b5fd24ec56e655c41724aa69201d75c63ffc2196197af1ff822f76341c98baaf71170d3b98f37f535ee86660 From 581b07306aee0b40a6f12f0d01ccda75eb5fde71 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:43:35 +0000 Subject: [PATCH 20/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 30a02d8..5a0bb64 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.27 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 1.5.27-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jun 17 2023 Orion Poplawski - 1.5.27-1 - Update to 1.5.27 - Add patch for Python 3.12 support From 24dd2dcfc5b72cea0ff30cf745e523387f9e223c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 05:37:11 +0000 Subject: [PATCH 21/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 5a0bb64..2b549cc 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.27 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 1.5.27-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 1.5.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From fccc5775d238a4e18b6546aef0d28d4302a93f14 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 08:36:11 +0000 Subject: [PATCH 22/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 2b549cc..d5af62e 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 1.5.27 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 1.5.27-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 1.5.27-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e48a0d40a9642bbf0580461c865a9885c8111894 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 16 Jun 2023 17:41:21 -0600 Subject: [PATCH 23/31] Update to 2.0.10 --- .gitignore | 1 + python-pyglet-imp.patch | 21 --------------------- python-pyglet.spec | 23 +++++++++++++---------- sources | 2 +- 4 files changed, 15 insertions(+), 32 deletions(-) delete mode 100644 python-pyglet-imp.patch diff --git a/.gitignore b/.gitignore index 0022dd0..b5b3ee8 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /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 diff --git a/python-pyglet-imp.patch b/python-pyglet-imp.patch deleted file mode 100644 index 0ceed8a..0000000 --- a/python-pyglet-imp.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up pyglet-1.5.27/tests/integration/test_toplevel_imports.py.imp pyglet-1.5.27/tests/integration/test_toplevel_imports.py ---- pyglet-1.5.27/tests/integration/test_toplevel_imports.py.imp 2023-06-17 07:55:27.061254060 -0600 -+++ pyglet-1.5.27/tests/integration/test_toplevel_imports.py 2023-06-17 08:01:50.139739485 -0600 -@@ -5,7 +5,7 @@ - This _must_ be the first test run. - ''' - --import imp -+import importlib - import unittest - - import pyglet -@@ -47,7 +47,7 @@ def add_module_tests(name, bases, dict): - def create_test(components): - def test_module(self): - top = pyglet -- imp.reload(top) -+ importlib.reload(top) - for component in components: - self.assertTrue(hasattr(top, component), - 'Cannot access "%s" in "%s"' % (component, top.__name__)) diff --git a/python-pyglet.spec b/python-pyglet.spec index d5af62e..a4d7805 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -4,8 +4,8 @@ %bcond_without tests Name: python-%{srcname} -Version: 1.5.27 -Release: 4%{?dist} +Version: 2.0.10 +Release: 1%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -20,9 +20,6 @@ URL: http://www.pyglet.org/ Source0: %{versionedname}-repacked.tar.gz Source1: pyglet-get-tarball.sh -# Use importlib instead of imp -Patch0: python-pyglet-imp.patch - # Note that unbundling pypng removes "PNGImageDecoder", which is normally # available for advanced use cases. Instead of: # img = image.load(fname, decoder=PNGImageDecoder) # don't use! @@ -49,6 +46,11 @@ BuildRequires: gtk2-devel BuildRequires: gdk-pixbuf2-devel # libpurple has sound files unbundled in the repacked tarball BuildRequires: libpurple +# These tests fail in koji, likely due to missing devices +#BuildRequires: openal-soft +# Some tests fail if this is present +# https://github.com/pyglet/pyglet/issues/875 +#BuildRequires: python3-pytest-asyncio %endif @@ -133,7 +135,7 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ # Interactive tests are skipped for obvious reasons. # 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_freetype_face tests are is skipped -- they depend on non-free font we remove +# test_font & test_freetype_face tests are 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 \ @@ -142,7 +144,7 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ --ignore=tests/interactive \ --ignore=tests/integration/media \ -m 'not (requires_user_action or requires_user_validation or only_interactive)' \ - -k 'not (test_find_font_match or test_have_font or test_freetype_face or test_push_handlers_instance)' \ + -k 'not (test_find_font_match or test_font or test_have_font or test_freetype_face or test_push_handlers_instance)' \ --deselect tests/integration/image/test_gdkpixbuf2.py::GdkPixBufTest::test_load_animation \ tests %endif @@ -150,12 +152,13 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %files -n python3-%{srcname} -f %%{pyproject_files} %license LICENSE -%doc README.md -%doc RELEASE_NOTES -%doc NOTICE +%doc README.md RELEASE_NOTES %changelog +* Sat Feb 17 2024 Orion Poplawski - 2.0.10-1 +- Update to 2.0.10 + * Fri Jan 26 2024 Fedora Release Engineering - 1.5.27-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 102f0ab..7322f09 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pyglet-1.5.27-repacked.tar.gz) = 496b1b94bde77e2ddf095d021b0736969abd7e70b5fd24ec56e655c41724aa69201d75c63ffc2196197af1ff822f76341c98baaf71170d3b98f37f535ee86660 +SHA512 (pyglet-2.0.10-repacked.tar.gz) = 8c780913435b1c17e43dcc99e729a2ea5d6a6e734cce642b8da82547f734cc9ce43732257e4f241eb3803a9edc941a96a762e869043260ff15adc84ba5c6d813 From 6b74c26aa9b81b81eface36331aad2358d7e3259 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Sat, 8 Jun 2024 10:32:36 +0200 Subject: [PATCH 24/31] Rebuilt for Python 3.13 --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index a4d7805..cc65cc8 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Sat Jun 08 2024 Python Maint - 2.0.10-2 +- Rebuilt for Python 3.13 + * Sat Feb 17 2024 Orion Poplawski - 2.0.10-1 - Update to 2.0.10 From 667c6f86e57d0d62679fb30bf9f425b4f2eeafd5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 14:30:09 +0000 Subject: [PATCH 25/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index cc65cc8..fe4f412 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 2.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jun 08 2024 Python Maint - 2.0.10-2 - Rebuilt for Python 3.13 From 12b9a27507cd658fb83212a46995c9c375d11416 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:46:29 +0000 Subject: [PATCH 26/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index fe4f412..df69608 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 2.0.10-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 19 2024 Fedora Release Engineering - 2.0.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 66ed799c92731b3bcf4f594077c41fa8b4b4910a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 16:25:05 +0200 Subject: [PATCH 27/31] Rebuilt for Python 3.14 --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index df69608..e5e3174 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Tue Jun 03 2025 Python Maint - 2.0.10-5 +- Rebuilt for Python 3.14 + * Sat Jan 18 2025 Fedora Release Engineering - 2.0.10-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 53f7e6738c4ddc316547fe24942d8da499be07e3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:37:34 +0000 Subject: [PATCH 28/31] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index e5e3174..3885df2 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.0.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jun 03 2025 Python Maint - 2.0.10-5 - Rebuilt for Python 3.14 From 4352bae0424698f2f9be44e7903a069ab61e762a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:30:21 +0200 Subject: [PATCH 29/31] Rebuilt for Python 3.14.0rc2 bytecode --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 3885df2..318f700 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -156,6 +156,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Aug 15 2025 Python Maint - 2.0.10-7 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 2.0.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 1b119c95cc023edc0da96d87c44d840cc46bd25b Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 22 Aug 2025 19:43:14 -0600 Subject: [PATCH 30/31] Add BR/R on python3-gobject, skip openal test (FTBFS rhbz#2379002) --- python-pyglet.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 318f700..3a41234 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -48,10 +48,13 @@ BuildRequires: gdk-pixbuf2-devel 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 +Requires: python3-gobject %global _description %{expand: @@ -144,7 +147,7 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ --ignore=tests/interactive \ --ignore=tests/integration/media \ -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_push_handlers_instance)' \ + -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)' \ --deselect tests/integration/image/test_gdkpixbuf2.py::GdkPixBufTest::test_load_animation \ tests %endif @@ -156,6 +159,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Sat Aug 23 2025 Orion Poplawski - 2.0.10-8 +- Add BR/R on python3-gobject, skip openal test (FTBFS rhbz#2379002) + * Fri Aug 15 2025 Python Maint - 2.0.10-7 - Rebuilt for Python 3.14.0rc2 bytecode From d7cb717046092b487bec9f941ae6714af388b927 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:05:42 +0200 Subject: [PATCH 31/31] Rebuilt for Python 3.14.0rc3 bytecode --- python-pyglet.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pyglet.spec b/python-pyglet.spec index 3a41234..6f56fa7 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -5,7 +5,7 @@ Name: python-%{srcname} Version: 2.0.10 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A cross-platform windowing and multimedia library for Python License: BSD-3-Clause @@ -159,6 +159,9 @@ ln -s %{_datadir}/sounds/purple/*.wav tests/data/media/ %changelog +* Fri Sep 19 2025 Python Maint - 2.0.10-9 +- Rebuilt for Python 3.14.0rc3 bytecode + * Sat Aug 23 2025 Orion Poplawski - 2.0.10-8 - Add BR/R on python3-gobject, skip openal test (FTBFS rhbz#2379002)