Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pygame for openSUSE:Factory 
checked in at 2021-09-17 23:25:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pygame (Old)
 and      /work/SRC/openSUSE:Factory/.python-pygame.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pygame"

Fri Sep 17 23:25:49 2021 rev:31 rq:919721 version:2.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pygame/python-pygame.changes      
2021-04-27 21:34:25.479960332 +0200
+++ /work/SRC/openSUSE:Factory/.python-pygame.new.1899/python-pygame.changes    
2021-09-17 23:26:04.189242508 +0200
@@ -1,0 +2,8 @@
+Thu Sep 16 21:02:06 UTC 2021 - Matej Cepl <mc...@suse.com>
+
+- Add support-SDL2-2.0.16.patch swtiching off
+  tests.video_test.VideoModuleTest.test_renderer_set_viewport
+  (gh#pygame/pygame#2721 and gh#pygame/pygame#2670) on 32bit
+  systems for incompatibility with SDL2 2.0.16.
+
+-------------------------------------------------------------------

New:
----
  support-SDL2-2.0.16.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pygame.spec ++++++
--- /var/tmp/diff_new_pack.2yf4oY/_old  2021-09-17 23:26:04.873243118 +0200
+++ /var/tmp/diff_new_pack.2yf4oY/_new  2021-09-17 23:26:04.877243121 +0200
@@ -26,6 +26,9 @@
 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 
mc...@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}
@@ -91,6 +94,7 @@
 %prep
 %setup -q -n pygame-%{version}
 %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
@@ -126,7 +130,7 @@
 export SDL_AUDIODRIVER=disk
 export LANG=en_US.UTF-8
 %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
-$python -m pygame.tests.__main__ --exclude opengl --time_out 300
+$python -m pygame.tests.__main__ -v --exclude opengl --time_out 300
 }
 
 %files %{python_files}

++++++ support-SDL2-2.0.16.patch ++++++
>From 6b7a8c14f1c20d521d0e15873e1fa7f3679b86f4 Mon Sep 17 00:00:00 2001
From: Starbuck5 <charlie.c.hay...@gmail.com>
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()

Reply via email to