From 3fe79117bc89fcda6d82143127a40e302a700e1f3f7a7cb656c2ff99e42360f5 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 24 Mar 2021 08:03:06 +0000 Subject: [PATCH 1/2] Accepting request 880826 from home:bnavigator:branches:devel:languages:python - Update to 2.0.1 The Age Of Aquarius release * This is a bug fix release, with a bunch of features and optimizations thrown in for good measure. * Backwards compatibility fixes * Major event refactor * Color.update() and Rect.update() * SDL 2.0.14 * Xbox One port * pathlib support for image, sound, and font loading. * Cursor object API * pygame.draw.rect fixes. - pygame 2.0 - the happy dance birthday release * Support for Metal, Direct 3d, Vulkan, OpenGL 3.0+ in various profiles (core, compatibility, debug, robust, etc), OpenGL ES, and other modern hardware accelerated video APIs across many platforms. * SSE2/Neon assembly image drawing. Much faster drawing routines, image loading, and alpha blending. * Type Hints, for code completion (and to help you make the squiggly lines disappear) in editors and IDEs. * Code cleanup, using lots of code robustness tools like static analyzers, and automated CI/CD. We've been able to help dozens of people new to community projects contribute. We have lots of work to go on code quality, but we're currently the highest rated Python and highest rate C large project on LGTM. * Many, many bug fixes including in our pygame.draw routines, pygame.math(for vectors), and pygame.mask for pixel perfect collision detection. * better support for PyPy (the fast JIT based implementation of python). See our milestone Are we pypy yet? No. for our progress on making PyPy the best python for games. * libsdl version 2 support. Technically pygame 2.0 still works with SDL 1, but we recommend SDL2 which is vastly improved over SDL1 for most use cases. Probably we will remove SDL 1 support starting pygame 2.1. * Touch support (multitouch, gestures, etc) * Audio input support (make games with your microphone!). * Message alert boxes (Press OK, or Cancel). * Better keyboard support. Proper unicode input and IME support. * Much improved game controller support. * Better image and audio format support. Including: webp, 32bit wav files, and much more reliable mp3 support. * Multiple display support, and multiple window support (multi window support is still experimental, more will come in pygame 2.1). * Android support through python for android (fork of pygame subset for android). Better documentation, and better support will come in future releases. * to make distributing your apps easier, a built in "pyinstaller hook"and compatibility with cxfreeze. * binary "wheels" on many platforms and versions of python from the old python 2.7 - to the latest python 3.9 (and with pypy!). * lots of quality of life improvements like Surface.fill ('black') instead of Surface.fill(pygame.Color(0, 0, 0)). Also keywords are supported for many more function arguments. You can draw rounded corners on rects. * plenty of new examples, like python3 -m pygame.examples. font_viewer, and python3 -m pygame.examples.music_drop_fade. Additionally the example source code has been cleaned up a lot to follow a more current python style. * Hundreds of documentation improvements, include a new Korean tutorial. * a special SCALED mode which takes low pixel games and automatically translates them to a larger window. Imagine your 320x200 resolution game of glorious pixel art... on modern screens that would be a very tiny windows. Now with SCALED it shows up big on a Full HD screen, or even a 4K/8K screen and the translation of mouse coordinates and up-scaling of pixels is done for you (hardware accelerated of course). - Full release notes on https://github.com/pygame/pygame/releases - Skip python36 build. python36-numpy is not available on TW. - Drop python-pygame-test-no-mp3.patch and python-pygame-python38-import.patch ------------------------------------------------------------------ - Add python-pygame-python38-import.patch from upstream to fix a build failure with Python 3.8. - Use autopatch macro rather than patch0, due to multiple patches. - version update to 1.9.6 * mixer thread deadlock issue when controlling it from different threads. * pygame.version.vernum now has major, minor, and patch attributes. - added patches Do not test mp3 format. + python-pygame-test-no-mp3.patch - Clean up SPEC, avoid warnings. - Update to 1.9.4 * python 3.7 support. * beta pypy support. * pygame.draw fixes * pygame.math is not experimental anymore. Speedups and bugfixes. * Debian, Mac homebrew, mac virtualenv, manylinux and other platform fixes. * documentation fixes, jedi support for type ahead in editors like VSCode and VIM. * Surface.blits for blitting many surfaces at once more quickly. - Get tests working. - Fix RPM group. - Update to version 1.9.3 * This is a bugfix release which fixes a couple of key issues which came up with 1.9.2 - Update to version 1.9.2 - Implement single-spec version - Fix source URL - Fix shebangs - Remove pygame-v4l-2.6.38.patch No longer needed - fixed rpmlint error devel-file-in-non-devel-package - patch1 could need a tag - fixed rpmlint warning self-obsoletion pygame-doc - ignore missing executable flags in the -docs package - added missing build requires for portmidi - fixed rpmlint warning files-duplicate with fdupes - added rpmlintrc to whitelist the warnings about sample code - avoid redundancy in the %description - Add pygame-v4l-2.6.38.patch: use new v4l interface - updated to 1.9.1 * add missing readme.html * bugfixes - update to 1.9.0 * many bugfixes * full python-post-2.5 compatibility, py3k compatibility - patched setup to workaround broken source tarball (missing readme.html) - removed py2.5 compatibility patch - buildrequires: replace python-numeric by python-numpy for >= 11.2 - (re)added libpng-devel and libjpeg-devel for image format support - update to 1.8.1 * lots of changes and fixes - see WHATSNEW for details - needs fno-strict-aliasing - updated to 1.8.0 * lots of changes and fixes - see WHATSNEW for details - rewrite pep353.diff - buildrequire SDL_ttf -> SDL_ttf-devel - changes according to PEP353 (pep353.diff) - updated to reflect python changes due to #149809 - converted neededforbuild to BuildRequires - update to 1.7.1release - removed readme.html, which is no longer provided - fix build - update to 1.6.2, this (among others) fixes brokeness on x86_64 - bug #45731 - fixed documentation installation - update to 1.6 (This new release mainly contains stability and internal fixes, small fixes for line and circle primitives, many fixes for locating system TrueType fonts, an updated Mac OS X environment, and bigger integer storage for Rect objects.) - patch was included in upstream - no root for build - fixed mode related functions that failed on AMD64, thanks to gpayer@suse.de (bug #31709) - use record-rpm - updated to 1.5.6 - use versioned dependency on python - added obsoletes and provides for rename - moved doc into %{_defaultdocdir}/python-pygame - some doc is in base package with info where to find more - update to 1.5.5 * improved Unicode support * fixed some bugs - renamed to python-pygame - update to 1.5 to get rid of conflict with pause() from unistd - pygame now requires python - update to 1.4 - new package, version 1.3 OBS-URL: https://build.opensuse.org/request/show/880826 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=28 --- pygame-1.9.6.tar.gz | 3 -- pygame-2.0.1.tar.gz | 3 ++ python-pygame-python38-import.patch | 22 -------- python-pygame-test-no-mp3.patch | 13 ----- python-pygame.changes | 81 ++++++++++++++++++++++++++++- python-pygame.spec | 52 +++++++++--------- 6 files changed, 107 insertions(+), 67 deletions(-) delete mode 100644 pygame-1.9.6.tar.gz create mode 100644 pygame-2.0.1.tar.gz delete mode 100644 python-pygame-python38-import.patch delete mode 100644 python-pygame-test-no-mp3.patch diff --git a/pygame-1.9.6.tar.gz b/pygame-1.9.6.tar.gz deleted file mode 100644 index a3eed85..0000000 --- a/pygame-1.9.6.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957 -size 3223131 diff --git a/pygame-2.0.1.tar.gz b/pygame-2.0.1.tar.gz new file mode 100644 index 0000000..12af39c --- /dev/null +++ b/pygame-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b1e7b63f47aafcdd8849933b206778747ef1802bd3d526aca45ed77141e4001 +size 5536907 diff --git a/python-pygame-python38-import.patch b/python-pygame-python38-import.patch deleted file mode 100644 index f208a81..0000000 --- a/python-pygame-python38-import.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9b5f88bca562f37d30eb7ac0f8f4ebdda68cb494 Mon Sep 17 00:00:00 2001 -From: Christoph Gohlke -Date: Wed, 14 Aug 2019 14:01:06 -0700 -Subject: [PATCH] Fix test error on Python 3.8.0b3 - -Fix `ImportError: cannot import name 'clock' from 'time' (unknown location)` ---- - test/math_test.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/test/math_test.py b/test/math_test.py -index c0bb84eb3..f22ba5e12 100644 ---- a/test/math_test.py -+++ b/test/math_test.py -@@ -2,7 +2,6 @@ - import sys - import unittest - import math --from time import clock - import platform - - import pygame.math diff --git a/python-pygame-test-no-mp3.patch b/python-pygame-test-no-mp3.patch deleted file mode 100644 index b528e09..0000000 --- a/python-pygame-test-no-mp3.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: pygame-1.9.6/test/mixer_music_test.py -=================================================================== ---- pygame-1.9.6.orig/test/mixer_music_test.py 2019-04-25 08:14:48.000000000 +0200 -+++ pygame-1.9.6/test/mixer_music_test.py 2019-05-20 10:36:59.969907416 +0200 -@@ -33,7 +33,7 @@ class MixerMusicModuleTest(unittest.Test - # Load a music file for playback - - data_fname = example_path('data') -- formats = ['mp3', 'ogg', 'wav'] -+ formats = ['ogg', 'wav'] - - for f in formats: - path = os.path.join(data_fname, 'house_lo.%s' % f) diff --git a/python-pygame.changes b/python-pygame.changes index a014f9d..da1492c 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,7 +1,84 @@ +------------------------------------------------------------------- +Tue Mar 23 20:56:42 UTC 2021 - Ben Greiner + +- Update to 2.0.1 The Age Of Aquarius release + * This is a bug fix release, with a bunch of features and + optimizations thrown in for good measure. + * Backwards compatibility fixes + * Major event refactor + * Color.update() and Rect.update() + * SDL 2.0.14 + * Xbox One port + * pathlib support for image, sound, and font loading. + * Cursor object API + * pygame.draw.rect fixes. +- pygame 2.0 - the happy dance birthday release + * Support for Metal, Direct 3d, Vulkan, OpenGL 3.0+ in various + profiles (core, compatibility, debug, robust, etc), OpenGL ES, + and other modern hardware accelerated video APIs across many + platforms. + * SSE2/Neon assembly image drawing. Much faster drawing + routines, image loading, and alpha blending. + * Type Hints, for code completion (and to help you make the + squiggly lines disappear) in editors and IDEs. + * Code cleanup, using lots of code robustness tools like static + analyzers, and automated CI/CD. We've been able to help dozens + of people new to community projects contribute. We have lots + of work to go on code quality, but we're currently the highest + rated Python and highest rate C large project on LGTM. + * Many, many bug fixes including in our pygame.draw routines, + pygame.math(for vectors), and pygame.mask for pixel perfect + collision detection. + * better support for PyPy (the fast JIT based implementation of + python). See our milestone Are we pypy yet? No. for our + progress on making PyPy the best python for games. + * libsdl version 2 support. Technically pygame 2.0 still works + with SDL 1, but we recommend SDL2 which is vastly improved + over SDL1 for most use cases. Probably we will remove SDL 1 + support starting pygame 2.1. + * Touch support (multitouch, gestures, etc) + * Audio input support (make games with your microphone!). + * Message alert boxes (Press OK, or Cancel). + * Better keyboard support. Proper unicode input and IME support. + * Much improved game controller support. + * Better image and audio format support. Including: webp, 32bit + wav files, and much more reliable mp3 support. + * Multiple display support, and multiple window support (multi + window support is still experimental, more will come in pygame + 2.1). + * Android support through python for android (fork of pygame + subset for android). Better documentation, and better support + will come in future releases. + * to make distributing your apps easier, a built in "pyinstaller + hook"and compatibility with cxfreeze. + * binary "wheels" on many platforms and versions of python from + the old python 2.7 - to the latest python 3.9 (and with pypy!). + * lots of quality of life improvements like Surface.fill + ('black') instead of Surface.fill(pygame.Color(0, 0, 0)). Also + keywords are supported for many more function arguments. You + can draw rounded corners on rects. + * plenty of new examples, like python3 -m pygame.examples. + font_viewer, and python3 -m pygame.examples.music_drop_fade. + Additionally the example source code has been cleaned up a lot + to follow a more current python style. + * Hundreds of documentation improvements, include a new Korean + tutorial. + * a special SCALED mode which takes low pixel games and + automatically translates them to a larger window. Imagine your + 320x200 resolution game of glorious pixel art... on modern + screens that would be a very tiny windows. Now with SCALED it + shows up big on a Full HD screen, or even a 4K/8K screen and + the translation of mouse coordinates and up-scaling of pixels + is done for you (hardware accelerated of course). +- Full release notes on https://github.com/pygame/pygame/releases +- Skip python36 build. python36-numpy is not available on TW. +- Drop python-pygame-test-no-mp3.patch and + python-pygame-python38-import.patch + ------------------------------------------------------------------ Tue Oct 15 04:11:07 UTC 2019 - Steve Kowalik -- Add python-pygame-python38-import.patch from upstream to fix a build +- Add python-pygame-python38-import.patch from upstream to fix a build failure with Python 3.8. - Use autopatch macro rather than patch0, due to multiple patches. @@ -71,7 +148,7 @@ Sun Oct 12 09:49:51 UTC 2014 - mailaender@opensuse.org ------------------------------------------------------------------- Thu Jul 7 11:01:11 UTC 2011 - idonmez@novell.com -- Add pygame-v4l-2.6.38.patch: use new v4l interface +- Add pygame-v4l-2.6.38.patch: use new v4l interface ------------------------------------------------------------------- Tue Jun 8 12:52:19 UTC 2010 - prusnak@opensuse.org diff --git a/python-pygame.spec b/python-pygame.spec index 73f4cae..04014fc 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -1,7 +1,7 @@ # # spec file for package python-pygame # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,25 +12,24 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python36 1 Name: python-pygame -Version: 1.9.6 +Version: 2.0.1 Release: 0 Summary: A Python Module for Interfacing with the SDL Multimedia Library License: LGPL-2.1-or-later Group: Development/Libraries/Python -Url: https://github.com/pygame/pygame +URL: https://github.com/pygame/pygame Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz -# Do not test mp3 format; whe have that support disabled in SDL1 -Patch0: python-pygame-test-no-mp3.patch -Patch1: python-pygame-python38-import.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy} BuildRequires: %{python_module setuptools} +BuildRequires: bitstream-vera-fonts BuildRequires: fdupes BuildRequires: fontconfig BuildRequires: libtiff-devel @@ -46,13 +45,13 @@ BuildRequires: xorg-x11-fonts-75dpi BuildRequires: xorg-x11-fonts-core BuildRequires: xorg-x11-fonts-cyrillic BuildRequires: config(fluid-soundfont-gm) -BuildRequires: pkgconfig(SDL_image) -BuildRequires: pkgconfig(SDL_mixer) -BuildRequires: pkgconfig(SDL_ttf) +BuildRequires: pkgconfig(SDL2_image) +BuildRequires: pkgconfig(SDL2_mixer) +BuildRequires: pkgconfig(SDL2_ttf) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(sdl) +BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(x11) Requires: fontconfig Requires: python-numpy @@ -93,10 +92,11 @@ This package contains documentation and example programs for Pygame. %autopatch -p1 sed -i 's/\r$//' docs/reST/ref/code_examples/draw_module_example.py sed -i 's/\r$//' docs/reST/ref/code_examples/joystick_calls.py +sed -i 's/\r$//' docs/licenses/LICENSE*.txt # Fix wrong-script-interpreter -find examples -name '*.py' -exec sed -i "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" {} \; -find examples -name '*.py' -exec sed -i "s|^#! %{_bindir}/env python$|#!%{_bindir}/python3|" {} \; +find examples -name '*.py' -exec sed -i "s|^#!.*env python.*$|#!%{_bindir}/python3|" {} \; chmod a+x examples/*.py +chmod a-x docs/licenses/LICENSE.sdl_gfx.txt %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -106,20 +106,19 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" export CFLAGS="%{optflags} -fno-strict-aliasing" %python_install %{python_expand pushd %{buildroot}%{$python_sitearch} -sed -i "s|^#!%{_bindir}/env python$|#!%{_bindir}/python3|" pygame/tests/test_utils/png.py +sed -i "s|^#!.*env python.*$|#!%{_bindir}/$python|" pygame/tests/test_utils/png.py chmod a+x pygame/tests/test_utils/png.py -chmod a+x pygame/examples/macosx/aliens_app_example/aliens.py chmod a+x pygame/examples/*.py chmod a-x pygame/examples/__init__.py -chmod a-x pygame/examples/prevent_display_stretching.py -chmod a-x pygame/examples/freetype_misc.py -$python -m compileall -d %{$python_sitearch} pygame/tests/test_utils/ -$python -O -m compileall -d %{$python_sitearch} pygame/tests/test_utils/ -%fdupes %{buildroot}%{$python_sitearch} popd } -%fdupes docs -%fdupes examples +%python_compileall +%python_expand %fdupes %{buildroot}%{$python_sitearch} +# install docs and examples for doc package and deduplicate +mkdir -p %{buildroot}%{_docdir}/%{name}-doc +cp -r examples docs %{buildroot}%{_docdir}/%{name}-doc/ +rm %{buildroot}%{_docdir}/%{name}-doc/examples/.editorconfig +%fdupes %{buildroot}%{_docdir}/%{name}-doc/ %check export SDL_VIDEODRIVER=dummy @@ -131,16 +130,15 @@ $python -m pygame.tests.__main__ --exclude opengl --time_out 300 %files %{python_files} %doc README.rst -%license docs/LGPL +%license docs/LGPL.txt %{python_sitearch}/pygame/ -%{python_sitearch}/pygame-%{version}-py*.egg-info +%{python_sitearch}/pygame-%{version}*-info %files %{python_files devel} -%license docs/LGPL +%license docs/LGPL.txt %{python_sysconfig_var INCLUDEPY}/pygame/ %files -n %{name}-doc -%doc docs/ -%doc examples/ +%doc %{_docdir}/%{name}-doc/ %changelog From f4bea99d0c32f158943002bb7712fc92446b8fc71755df4494b69e46ab08ed4c Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 27 Apr 2021 11:25:20 +0000 Subject: [PATCH 2/2] Accepting request 888764 from home:bnavigator:branches:devel:languages:python - Explictly require libudev while building (for staging) OBS-URL: https://build.opensuse.org/request/show/888764 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=29 --- python-pygame.changes | 5 +++++ python-pygame.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-pygame.changes b/python-pygame.changes index da1492c..c3b2fad 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 27 11:22:12 UTC 2021 - Ben Greiner + +- Explictly require libudev while building (for staging) + ------------------------------------------------------------------- Tue Mar 23 20:56:42 UTC 2021 - Ben Greiner diff --git a/python-pygame.spec b/python-pygame.spec index 04014fc..04c56cf 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -33,6 +33,7 @@ BuildRequires: bitstream-vera-fonts BuildRequires: fdupes BuildRequires: fontconfig BuildRequires: libtiff-devel +BuildRequires: libudev-devel BuildRequires: libv4l-devel >= 0.8.4 BuildRequires: pkgconfig BuildRequires: portmidi-devel