Compare commits

..

2 commits

Author SHA1 Message Date
Petr Viktorin
eae33aaf1e Update changelog.
Yes, I skipped releases 1 and 2 by mistake
2018-11-05 15:51:52 +01:00
Petr Viktorin
ec7a429d6b Update to 1.3.2 2018-11-05 13:22:43 +01:00
4 changed files with 87 additions and 243 deletions

10
.gitignore vendored
View file

@ -4,13 +4,3 @@
/pyglet-1.2.4-repacked.tar.gz
/pyglet-1.3.0-repacked.tar.gz
/pyglet-1.3.1-repacked.tar.gz
/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
/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

View file

@ -1,24 +1,16 @@
#! /bin/bash
VERSION=$1
VERSIONEDNAME=$1
VERSIONEDNAME=pyglet-${VERSION}
ARCHIVENAME=${VERSIONEDNAME}.tar.gz
wget -N https://github.com/pyglet/pyglet/archive/v${VERSION}.tar.gz -O ${ARCHIVENAME}
tar xzvf ${ARCHIVENAME}
wget -N https://files.pythonhosted.org/packages/source/p/pyglet/${VERSIONEDNAME}.tar.gz
tar xzvf ${VERSIONEDNAME}.tar.gz
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}

View file

@ -1,63 +1,35 @@
%global srcname pyglet
%global versionedname %{srcname}-%{version}
%global with_python2 1
%bcond_without tests
%global srcname pyglet
%global srcversion 1.3.2
%global versionedname %{srcname}-%{srcversion}
Name: python-%{srcname}
Version: 2.0.10
Release: 9%{?dist}
Version: %{srcversion}
Release: 3%{?dist}
Summary: A cross-platform windowing and multimedia library for Python
License: BSD-3-Clause
License: BSD
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
# (the subcommand outputs a version number like 1.5.16):
# $ bash pyglet-get-tarball.sh $(grep Version python-pyglet.spec|cut -c10-)
# Run the following (in rpmbuild/SOURCES) to generate the distributed tarball:
# $ bash pyglet-get-tarball.sh pyglet-1.3.2
# See the script for details.
Source0: %{versionedname}-repacked.tar.gz
Source1: pyglet-get-tarball.sh
# 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
%if %{with python2}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%endif
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python3-setuptools
# 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
# These two for gdkpixbuf2 tests
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
# 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:
%description
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
@ -66,13 +38,33 @@ 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
%if %{with python2}
%package -n python2-%{srcname}
Summary: A cross-platform windowing and multimedia library for Python 3
%{?python_provide:%python_provide python2-%{srcname}}
Requires: python2
Requires: python2-pillow
Requires: python2-future
# The libraries are imported dynamically using ctypes, so rpm can't find them.
Requires: libGL
Requires: libGLU
Requires: libX11
%description -n python2-%{srcname}
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
requirements, pyglet needs nothing else besides Python, simplifying
distribution and installation. It also handles multiple windows and
fully aware of multi-monitor setups.
pyglet might be seen as an alternative to PyGame.
%endif
%package -n python3-%{srcname}
@ -80,207 +72,77 @@ 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
# Needed for experimental headless mode; see: https://github.com/pyglet/pyglet/issues/51
Suggests: libEGL
%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
%if %{with tests}
BuildRequires: libGL
BuildRequires: libGLU
BuildRequires: libEGL
BuildRequires: libX11
BuildRequires: fontconfig
BuildRequires: python3-pillow
%endif
%description -n python3-%{srcname} %_description
pyglet might be seen as an alternative to PyGame.
%prep
%autosetup -p1 -n %{versionedname}
%setup -q -n %{versionedname}
# Remove the bundled pypng library (python-pillow provides the same functionality)
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
%pyproject_wheel
%if %{with python2}
%py2_build
%endif
%py3_build
%install
%pyproject_install
%pyproject_save_files pyglet
%if %{with python2}
%py2_install
%endif
%py3_install
%if %{with tests}
%check
# 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_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 \
-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_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
%if %{with python2}
%files -n python2-%{srcname}
%license LICENSE
%doc README
%doc NOTICE
%doc PKG-INFO
%{python2_sitelib}/%{versionedname}-py2.7.egg-info
%{python2_sitelib}/%{srcname}
%endif
%files -n python3-%{srcname} -f %%{pyproject_files}
%files -n python3-%{srcname}
%license LICENSE
%doc README.md RELEASE_NOTES
%doc README
%doc NOTICE
%doc PKG-INFO
%{python3_sitelib}/%{versionedname}-py%{python3_version}.egg-info
%{python3_sitelib}/%{srcname}
%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
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 1.5.11-1
- Update to 1.5.11
* Wed Sep 09 2020 Petr Viktorin <pviktori@redhat.com> - 1.5.7-1
- Update to 1.5.7
- Switch to pyproject macros
- Run tests
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.6-3
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Oct 23 2019 Petr Viktorin <pviktori@redhat.com> - 1.4.6-1
- Update to release 1.4.6
- Update upstream release URL
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.1-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.1-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jul 23 2019 Petr Viktorin <pviktori@redhat.com> - 1.4.1-1
- Update to release 1.4.1
* Tue Jul 23 2019 Petr Viktorin <pviktori@redhat.com> - 1.3.2-3
- Bump release for to fix upgrade from 29
https://bugzilla.redhat.com/show_bug.cgi?id=1695261
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Nov 02 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.2-1
- Update to 1.3.2 and drop Python 2 subpackage
* Mon Nov 05 2018 Petr Viktorin <pviktori@redhat.com> - 1.3.2-3
- Update to 1.3.2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (pyglet-2.0.10-repacked.tar.gz) = 8c780913435b1c17e43dcc99e729a2ea5d6a6e734cce642b8da82547f734cc9ce43732257e4f241eb3803a9edc941a96a762e869043260ff15adc84ba5c6d813
SHA512 (pyglet-1.3.2-repacked.tar.gz) = 06638744f24d08d1df3ada15c2a367749e2d0dfcf4aa8528e3c189778bba38e5bb55c0c2bbf55e8860d063b9240369062bbe565d8af0d4f1ad896de74a7ffd64