From c5eefa0666bee9dc2d395b99f20a9357eb4a8cea52f648113c37185f9fd42817 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 5 Jan 2022 06:57:14 +0000 Subject: [PATCH 1/2] - Update to 2.1.2: * Fix segfault in display.update by @ankith26 in #2954 * Quick fix to get 'python -m pygame.docs' working by @ankith26 in #2955 * Working gamma test on windows by @MyreMylar in #2906 * Freetype: Fix intermittent crash with test_font_file_not_found by @illume in #2944 * Officially drop python2 (and 3.5) and SDL1 support by @Starbuck5 in #2817 * Remove most PY2/PY3 C compatibility code by @Starbuck5 in #2819 * Simple fix to swap numpy.float type out in favour of float by @MyreMylar in #2815 * Remove most SDL1/SDL2 compatibility c code by @Starbuck5 in #2823 * Ubuntu 18/20 SDL2 sdist CI, mac CI pp36 drop by @ankith26 in #2821 * SDL1 buildconfig removal by @robertpfeiffer and @illume in #2824 - Drop support-SDL2-2.0.16.patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=35 --- pygame-2.0.1.tar.gz | 3 -- pygame-2.1.2.tar.gz | 3 ++ python-pygame.changes | 18 ++++++++ python-pygame.spec | 8 +--- support-SDL2-2.0.16.patch | 94 --------------------------------------- 5 files changed, 23 insertions(+), 103 deletions(-) delete mode 100644 pygame-2.0.1.tar.gz create mode 100644 pygame-2.1.2.tar.gz delete mode 100644 support-SDL2-2.0.16.patch diff --git a/pygame-2.0.1.tar.gz b/pygame-2.0.1.tar.gz deleted file mode 100644 index 12af39c..0000000 --- a/pygame-2.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b1e7b63f47aafcdd8849933b206778747ef1802bd3d526aca45ed77141e4001 -size 5536907 diff --git a/pygame-2.1.2.tar.gz b/pygame-2.1.2.tar.gz new file mode 100644 index 0000000..6e514cf --- /dev/null +++ b/pygame-2.1.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6d0eca28f886f0477cd0721ac688189155a587f2bb8eae740e52ca56c3ad23c +size 10132016 diff --git a/python-pygame.changes b/python-pygame.changes index 0b78390..b87f4c0 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Wed Jan 5 06:49:40 UTC 2022 - Steve Kowalik + +- Update to 2.1.2: + * Fix segfault in display.update by @ankith26 in #2954 + * Quick fix to get 'python -m pygame.docs' working by @ankith26 in #2955 + * Working gamma test on windows by @MyreMylar in #2906 + * Freetype: Fix intermittent crash with test_font_file_not_found by + @illume in #2944 + * Officially drop python2 (and 3.5) and SDL1 support by @Starbuck5 in #2817 + * Remove most PY2/PY3 C compatibility code by @Starbuck5 in #2819 + * Simple fix to swap numpy.float type out in favour of float by + @MyreMylar in #2815 + * Remove most SDL1/SDL2 compatibility c code by @Starbuck5 in #2823 + * Ubuntu 18/20 SDL2 sdist CI, mac CI pp36 drop by @ankith26 in #2821 + * SDL1 buildconfig removal by @robertpfeiffer and @illume in #2824 +- Drop support-SDL2-2.0.16.patch. + ------------------------------------------------------------------- Thu Sep 16 21:02:06 UTC 2021 - Matej Cepl diff --git a/python-pygame.spec b/python-pygame.spec index 953282b..0544f9d 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -1,7 +1,7 @@ # # spec file for package python-pygame # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,16 +19,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python36 1 Name: python-pygame -Version: 2.0.1 +Version: 2.1.2 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 Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz -# PATCH-FIX-UPSTREAM support-SDL2-2.0.16.patch gh#pygame/pygame#2721 mcepl@suse.com -# patch from gh#pygame/pygame#2670 -Patch0: support-SDL2-2.0.16.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy} BuildRequires: %{python_module setuptools} diff --git a/support-SDL2-2.0.16.patch b/support-SDL2-2.0.16.patch deleted file mode 100644 index fecd9a2..0000000 --- a/support-SDL2-2.0.16.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 6b7a8c14f1c20d521d0e15873e1fa7f3679b86f4 Mon Sep 17 00:00:00 2001 -From: Starbuck5 -Date: Fri, 13 Aug 2021 21:49:39 -0700 -Subject: [PATCH 1/3] Move to SDL 2.0.16 for Windows - ---- - buildconfig/download_win_prebuilt.py | 8 ++++---- - test/mixer_test.py | 5 +++-- - test/video_test.py | 10 ++++++---- - 3 files changed, 13 insertions(+), 10 deletions(-) - ---- a/buildconfig/download_win_prebuilt.py -+++ b/buildconfig/download_win_prebuilt.py -@@ -64,8 +64,8 @@ def get_urls(x86=True, x64=True, sdl2=Tr - if sdl2: - url_sha1.extend([ - [ -- 'https://www.libsdl.org/release/SDL2-devel-2.0.14-VC.zip', -- '48d5dcd4a445410301f5575219cffb6de654edb8', -+ 'https://www.libsdl.org/release/SDL2-devel-2.0.16-VC.zip', -+ '13d952c333f3c2ebe9b7bc0075b4ad2f784e7584', - ], - [ - 'https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip', -@@ -244,12 +244,12 @@ def place_downloaded_prebuilts(temp_dir, - copy( - os.path.join( - temp_dir, -- 'SDL2-devel-2.0.14-VC/SDL2-2.0.14' -+ 'SDL2-devel-2.0.16-VC/SDL2-2.0.16' - ), - os.path.join( - move_to_dir, - prebuilt_dir, -- 'SDL2-2.0.14' -+ 'SDL2-2.0.16' - ) - ) - ---- a/test/mixer_test.py -+++ b/test/mixer_test.py -@@ -41,7 +41,8 @@ CONFIGS = [ - - CONFIG = {"frequency": 22050, "size": -16, "channels": 2} # base config - if pygame.get_sdl_version()[0] >= 2: -- CONFIG = {"frequency": 44100, "size": 32, "channels": 2} # base config -+ # base config -+ CONFIG = {"frequency": 44100, "size": 32, "channels": 2, "allowedchanges": 0} - - - class InvalidBool(object): -@@ -86,7 +87,7 @@ class MixerModuleTest(unittest.TestCase) - # default values. No way to check buffer size though. - mixer.pre_init(22050, -8, 1) # Non default values - mixer.pre_init(0, 0, 0) # Should reset to default values -- mixer.init() -+ mixer.init(allowedchanges=0) - self.assertEqual(mixer.get_init()[0], 44100) - self.assertEqual(mixer.get_init()[1], -16) - self.assertGreaterEqual(mixer.get_init()[2], 2) ---- a/test/video_test.py -+++ b/test/video_test.py -@@ -1,4 +1,6 @@ - import unittest -+import platform -+import sys - import pygame - - SDL2 = pygame.get_sdl_version()[0] >= 2 -@@ -6,13 +8,14 @@ SDL2 = pygame.get_sdl_version()[0] >= 2 - if SDL2: - from pygame._sdl2 import video - -- - class VideoModuleTest(unittest.TestCase): - default_caption = "pygame window" - -+ @unittest.skipIf((not (sys.maxsize > 2 ** 32)), -+ "32 bit SDL 2.0.16 has an issue.", -+ ) - def test_renderer_set_viewport(self): -- """ works. -- """ -+ """works.""" - window = video.Window(title=self.default_caption, size=(800, 600)) - renderer = video.Renderer(window=window) - renderer.logical_size = (1920, 1080) -@@ -20,6 +23,5 @@ if SDL2: - renderer.set_viewport(rect) - self.assertEqual(renderer.get_viewport(), (0, 0, 1920, 1080)) - -- - if __name__ == "__main__": - unittest.main() From 07dca61bd607065b0b2f7ff0a07b8203d38a4bb75f4695e46cfb464d75cba3d9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 4 Feb 2022 23:20:37 +0000 Subject: [PATCH 2/2] - fix portmidi configuration detection OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=36 --- python-pygame.changes | 5 +++++ python-pygame.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/python-pygame.changes b/python-pygame.changes index b87f4c0..5d0f164 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Feb 4 23:20:17 UTC 2022 - Dirk Müller + +- fix portmidi configuration detection + ------------------------------------------------------------------- Wed Jan 5 06:49:40 UTC 2022 - Steve Kowalik diff --git a/python-pygame.spec b/python-pygame.spec index 0544f9d..1ae55f4 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -101,6 +101,7 @@ chmod a-x docs/licenses/LICENSE.sdl_gfx.txt %build export CFLAGS="%{optflags} -fno-strict-aliasing" +export PORTMIDI_INC_PORTTIME=1 %python_build %install