14
0
forked from pool/python-pyglet

- delete pyglet-1.2.4-fix-image-import.patch

- Update to 2.0.4
  - input.win32: ControlManager now supports both DirectInput and
    XInput devices.
  - input: Many cleanups and reorganization.
  - math: Add Vec2.reflect method.
  - shapes: Add new BezierCurve shape.
  - gl: Add support for GL sync functions.
  - gui: Prevent two TextEntry widgets from being active at the same
    time. #747
  - win32: Fix broken lib debug, and multiple related bugs due to
    depreacted functions.
  - input: Controller mappings now indexed correctly on macOS and
    Windows.
- pyglet 2.0.3
  - shapes: Batch and Group can now be changed on shapes after
    instantiation, similar to Sprites.
  - font: DirectWrite & Freetype fonts now expose a `filename`
    attribute. macOS not yet implemented.
  - Windows: DirectWrite fonts parse font names in a more correct
    manner. Setting `pyglet.options['dw_legacy_naming']` to True will
    restore the old behavior, but this may be removed at a later date.
  - math: Vec types can now be updated with slices (`velocity[:] = 1,
    2`)
  - math: Matrix operations now behave more like GLSL.
  - macOS: fix crash when supplying OpenGL Config without explicit
    major/minor versions #739
  - To prevent crashing on many OpenGL drivers, Textures are no longer
    initialized with empty data.
  - fixed `font_comparison.py` example.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=42
This commit is contained in:
2023-02-23 11:51:05 +00:00
committed by Git OBS Bridge
parent c383e07112
commit 2bd05a65c6
5 changed files with 85 additions and 34 deletions

View File

@@ -1,13 +0,0 @@
Index: pyglet/image/codecs/pil.py
===================================================================
--- pyglet/image/codecs/pil.py.orig
+++ pyglet/image/codecs/pil.py
@@ -48,7 +48,7 @@ from pyglet.image.codecs import *
try:
import Image
-except ImportError:
+except (ImportError, ValueError):
from PIL import Image, ImageSequence

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d00e067451f3b10fd51b69764fddab65444372a2da344ee2b35f0a8e6ebf005
size 6978692

3
pyglet-2.0.4.zip Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f891808c1bf65c7cc5131b0b26b047eae5cf37c7e253270964ac4b2f014774f2
size 6491357

View File

@@ -1,3 +1,72 @@
-------------------------------------------------------------------
Thu Feb 23 11:46:51 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- delete pyglet-1.2.4-fix-image-import.patch
- Update to 2.0.4
- input.win32: ControlManager now supports both DirectInput and
XInput devices.
- input: Many cleanups and reorganization.
- math: Add Vec2.reflect method.
- shapes: Add new BezierCurve shape.
- gl: Add support for GL sync functions.
- gui: Prevent two TextEntry widgets from being active at the same
time. #747
- win32: Fix broken lib debug, and multiple related bugs due to
depreacted functions.
- input: Controller mappings now indexed correctly on macOS and
Windows.
- pyglet 2.0.3
- shapes: Batch and Group can now be changed on shapes after
instantiation, similar to Sprites.
- font: DirectWrite & Freetype fonts now expose a `filename`
attribute. macOS not yet implemented.
- Windows: DirectWrite fonts parse font names in a more correct
manner. Setting `pyglet.options['dw_legacy_naming']` to True will
restore the old behavior, but this may be removed at a later date.
- math: Vec types can now be updated with slices (`velocity[:] = 1,
2`)
- math: Matrix operations now behave more like GLSL.
- macOS: fix crash when supplying OpenGL Config without explicit
major/minor versions #739
- To prevent crashing on many OpenGL drivers, Textures are no longer
initialized with empty data.
- fixed `font_comparison.py` example.
- pyglet 2.0.2
- Fix Config.opengl_api being always set to None.
- Windows: fix Display.get_default_screen() always returning the
first index.
- Remove legacy Xlib backend code.
- Add initial support for Compute Shaders.
- Windows: a high performance event timer is requested by the
PlatformEventLoop.
- pyglet 2.0.1
- Windows: only enable DirectWrite color font for supported OSes.
- gui: don't unset TextEntry widget focus on mouse motion.
- image: Prevent BufferManager crash when stencil buffer query fails
#703
- macOS input: fix broken get_guid link for Controllers.
- math: fix Mat4.look_at. #708
- shader: fix vertex_list passing id instead of self to
Batch.get_domain
- shapes: fix crash when setting Arc.visible = False
- shapes: add Arc.start_angle setter
- graphics: Various default Group changes to help improve Group
consolidation
- pyglet 2.0.0
- pyglet has been upgraded to use use OpenGL 3.3+ core
functionality.
- All high level modules have been internally updated to use modern
OpenGL.
- A large number of cleanups and optimizations.
- New `pyglet.math` module including common Matrix and Vector
operations.
- New `pyglet.graphics.shader` module for easily managing Shader
objects.
- New OpenGL bindings, and binding tools.
- New Game Controller API for modern game controllers, including
rumble and automapping.
- New Framebuffer classes.
-------------------------------------------------------------------
Fri Nov 4 06:47:54 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyglet
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,6 @@
%define X_display :98
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%ifarch %{arm} aarch64 x86_64 %{ix86} ppc64le
%bcond_without gtk2
%bcond_without test
@@ -32,16 +31,14 @@
%define skip_python2 1
%bcond_with pytest_helpers
Name: python-pyglet
Version: 1.5.27
Version: 2.0.4
Release: 0
Summary: Windowing and multimedia library
License: BSD-3-Clause AND MIT
Group: Development/Languages/Python
URL: https://bitbucket.org/pyglet/pyglet
URL: https://github.com/pyglet/pyglet
Source0: https://files.pythonhosted.org/packages/source/p/pyglet/pyglet-%{version}.zip
Source1: %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE pyglet-1.2.4-fix-image-import.patch -- fix "import Image"
Patch0: pyglet-1.2.4-fix-image-import.patch
BuildRequires: %{python_module setuptools}
BuildRequires: dos2unix
BuildRequires: fdupes
@@ -94,8 +91,7 @@ Pyglet provides an object-oriented programming interface for
developing games and other visually-rich applications.
%prep
%setup -q -n pyglet-%{version}
%patch0
%autosetup -p1 -n pyglet-%{version}
# Windows only, and is a vendored module
rm pyglet/font/win32*.py
@@ -110,7 +106,6 @@ sed -i 's/import pyglet.extlibs.png as pypng/import png as pypng/' pyglet/image/
rm -r \
pyglet/gl/lib_agl.py pyglet/gl/lib_wgl.py pyglet/gl/wgl*.py \
pyglet/*/cocoa.py pyglet/*/quartz.py pyglet/*/win32.py \
pyglet/input/darwin_hid.py pyglet/input/directinput.py pyglet/input/wintab.py \
pyglet/image/codecs/quartz.py pyglet/image/codecs/gdiplus.py \
pyglet/window/cocoa/ pyglet/window/win32/ \
pyglet/libs/darwin/ pyglet/libs/win32/ \
@@ -147,10 +142,6 @@ sed -i 's/arial/freeserif/g;s/Arial/FreeSerif/g' \
sed -i "s/@unittest.skip('Requires changes to events from fork by Leif')/@pytest.mark.leif_fork/" tests/unit/test_events.py
sed -i 's/import unittest/import unittest, pytest/' tests/unit/test_events.py
# https://bitbucket.org/pyglet/pyglet/issues/223/clock-test-failures
# Occasional errors on all platforms, and test_clock.py fails on Python 2 only
rm tests/unit/test_clock_fps.py
## Integration tests
# Test fails on all platforms
@@ -179,9 +170,6 @@ rm tests/base/test_interactive_test_base.py
# Final tidy up
# Only useful to creates Windows or MacOS apps
rm examples/astraea/setup.py
# Convert to unix line endings
find pyglet -name "*.py" -exec dos2unix "{}" "+"
@@ -219,6 +207,8 @@ pytest_k_list="test_openal or test_pulse or test_arb or \
test_multitexture or test_clock or test_get_animation_no_video or \
leif_fork or test_load_privatefont or test_load_privatefont_from_list or test_directsound_listener or \
test_gdiplus_loading or test_quartz_loading or test_quicktime_loading or test_multiple_start_stop or test_pause_resume"
# Disable beause broken in python 3.11, gh#pyglet/pyglet#606
pytest_k_list+=" or test_push_handlers_instance"
%if %{without gtk2}
pytest_k_list="$pytest_k_list or test_gdkpixbuf2 or test_gdkpixbuf2_loading"
@@ -229,6 +219,7 @@ pytest_addopts="--instafail --error-for-skips --timeout=30 "
%endif
pytest_addopts="$pytest_addopts tests/unit tests/integration"
pytest_image_loading="test_resource_image_loading"
%{python_expand #
# These are only problematic on Python 2, and are restored after Python 2 tests
@@ -237,7 +228,11 @@ if [ $python = python2 ]; then
mv tests/unit/test_clock.py tests/unit/.test_clock.py
fi
$python -m pytest $pytest_addopts -k "not ($pytest_k_list)"
$python -m pytest $pytest_addopts -k "not ($pytest_k_list or $pytest_image_loading)"
# Run test_resource_image_loading tests in a second steps, this fails
# if run with the other tests, possible because a test not cleaning
# correctly
$python -m pytest $pytest_addopts -k "$pytest_image_loading"
if [ -x tests/unit/.test_clock.py ]; then
mv tests/unit/.test_clock.py tests/unit/test_clock.py
@@ -249,7 +244,7 @@ fi
%files %{python_files}
%license LICENSE
%doc NOTICE README.md RELEASE_NOTES examples
%doc README.md RELEASE_NOTES examples
%{python_sitelib}/pyglet
%{python_sitelib}/pyglet-%{version}-py*.egg-info