commit python-PySDL2 for openSUSE:Factory
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-PySDL2 for openSUSE:Factory checked in at 2021-08-30 13:55:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PySDL2 (Old)
and /work/SRC/openSUSE:Factory/.python-PySDL2.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PySDL2"
Mon Aug 30 13:55:12 2021 rev:6 rq:914904 version:0.9.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PySDL2/python-PySDL2.changes 2021-02-09 21:17:19.370846292 +0100
+++ /work/SRC/openSUSE:Factory/.python-PySDL2.new.1899/python-PySDL2.changes 2021-08-30 13:55:30.085844979 +0200
@@ -1,0 +2,19 @@
+Sun Aug 29 10:31:04 UTC 2021 - Ben Greiner
+
+- Update to version 0.9.8
+ * This release fixes a number of bugs, updates the bindings to
+ support new functions in SDL2 2.0.14, adds a wrapper for the
+ SDL2 MessageBox API, and more.
+ * Added bindings for new functions and constants introduced in
+ SDL2 2.0.12 and 2.0.14
+ * Added full support for SDL2 binaries in non-system locations
+ (e.g., with pysdl2-dll) when using PySDL2 with Python installed
+ from the Microsoft Store on Windows.
+ * Improved handling of SDL2 binaries that are too old to be used
+ with PySDL2.
+ * Added a new sdl2.ext API for displaying SDL2 MessageBox alerts
+ and dialog boxes.
+- Add PySDL2-pr193-skipnumpy.patch (gh#marcusva/py-sdl2#193) for
+ missing NumPy in python36
+
+-------------------------------------------------------------------
Old:
----
PySDL2-0.9.7.tar.gz
New:
----
PySDL2-0.9.8.tar.gz
PySDL2-pr193-skipnumpy.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PySDL2.spec ++++++
--- /var/tmp/diff_new_pack.zuldOC/_old 2021-08-30 13:55:30.777845867 +0200
+++ /var/tmp/diff_new_pack.zuldOC/_new 2021-08-30 13:55:30.785845877 +0200
@@ -19,12 +19,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define X_display ":98"
Name: python-PySDL2
-Version: 0.9.7
+Version: 0.9.8
Release: 0
Summary: Python SDL2 bindings
License: SUSE-Public-Domain
URL: https://github.com/marcusva/py-sdl2
Source: https://files.pythonhosted.org/packages/source/P/PySDL2/PySDL2-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM PySDL2-pr193-skipnumpy.patch -- gh#marcusva/py-sdl2#193
+Patch0: https://github.com/marcusva/py-sdl2/pull/193.patch#/PySDL2-pr193-skipnumpy.p...
BuildRequires: %{python_module setuptools}
BuildRequires: SDL2 >= 2.0.5
BuildRequires: SDL2_gfx >= 1.0.3
@@ -37,6 +39,7 @@
BuildRequires: %{python_module opengl}
BuildRequires: %{python_module pytest}
BuildRequires: xorg-x11-server
+BuildRequires: %{python_module numpy if (%python-base without python36-base)}
# /SECTION
Requires: SDL2 >= 2.0.5
Requires: SDL2_gfx >= 1.0.3
@@ -52,7 +55,7 @@
restrictions, nor does it rely on C code, but uses ctypes instead.
%prep
-%setup -q -n PySDL2-%{version}
+%autosetup -p1 -n PySDL2-%{version}
sed -i 's/\r$//' AUTHORS.txt COPYING.txt README.md
%build
@@ -73,13 +76,20 @@
sleep 10
pushd sdl2/test
+# these segfault when not tested separately
+testextra="SpriteFactory or SDL2EXTSprite or test_SDL_GL"
# we do not have audio devices in build environment
donttest+=" or test_Mix_OpenAudio or test_SDL_GetNumAudioDevices or TestSDLMixer"
# we get border size 0 in build "desktop" environment
donttest+=" or test_SDL_GetWindowsBordersSize"
# flaky segfaults
donttest+=" or (TestSDL2ExtWindow and (test_Window_position or test_Window_size))"
-%pytest -k "not (${donttest:4})"
+# test suite assumes SDL devel version from mercurial (hg) checkout
+donttest+=" or test_SDL_GetRevision"
+# python2 env on Leap different, pytest arg missing
+python2_donttest="or test_SDL_GetBasePath or test_BitmapFont_render_on"
+%pytest -rfEs -k "not (${testextra} ${donttest} ${$python_donttest})"
+%pytest -rfEs -k "${testextra}"
popd
%files %{python_files}
++++++ PySDL2-0.9.7.tar.gz -> PySDL2-0.9.8.tar.gz ++++++
++++ 92188 lines of diff (skipped)
++++++ PySDL2-pr193-skipnumpy.patch ++++++
From ebe6ca1b97a080c229ee80cfdd82d35663851f27 Mon Sep 17 00:00:00 2001
From: Ben Greiner
Date: Sun, 29 Aug 2021 13:17:22 +0200
Subject: [PATCH] Skip tests when numpy is not available
---
sdl2/test/sdl2ext_draw_test.py | 7 +++++++
sdl2/test/sdl2ext_font_test.py | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/sdl2/test/sdl2ext_draw_test.py b/sdl2/test/sdl2ext_draw_test.py
index 63ff360..ac11bc8 100644
--- a/sdl2/test/sdl2ext_draw_test.py
+++ b/sdl2/test/sdl2ext_draw_test.py
@@ -6,6 +6,11 @@
from sdl2.ext.compat import ExperimentalWarning
from sdl2 import ext as sdl2ext
+try:
+ import numpy
+ _HASNUMPY = True
+except:
+ _HASNUMPY = False
class TestSDL2ExtDraw(object):
__tags__ = ["sdl", "sdl2ext"]
@@ -21,6 +26,7 @@ def setup_class(cls):
def teardown_class(cls):
sdl2ext.quit()
+ @pytest.mark.skipif(not _HASNUMPY, reason="pixels3d requires numpy module")
def test_fill(self):
# Initialize colour and surface/view
WHITE = (255, 255, 255)
@@ -63,6 +69,7 @@ def test_fill(self):
with pytest.raises(ValueError):
sdl2ext.fill(sf.contents, WHITE, (1, 2, 3))
+ @pytest.mark.skipif(not _HASNUMPY, reason="pixels3d requires numpy module")
def test_line(self):
# Initialize colour and surface/view
WHITE = (255, 255, 255)
diff --git a/sdl2/test/sdl2ext_font_test.py b/sdl2/test/sdl2ext_font_test.py
index 8ad8000..a9acde5 100644
--- a/sdl2/test/sdl2ext_font_test.py
+++ b/sdl2/test/sdl2ext_font_test.py
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import pytest
-import numpy as np
from sdl2 import ext as sdl2ext
from sdl2.ext.compat import byteify, ExperimentalWarning
from sdl2.ext.pixelaccess import pixels2d
@@ -46,7 +45,7 @@ def test_BitmapFont(self):
# Try SDL_Surface surface
font = sdl2ext.BitmapFont(sf.contents, (32, 32), FONTMAP)
assert font.size == (32, 32)
-
+
# Try SDL_Surface pointer surface
font = sdl2ext.BitmapFont(sf, (32, 32), FONTMAP)
assert font.size == (32, 32)
@@ -72,6 +71,7 @@ def test_BitmapFont_render(self):
font.render("this_should_fail")
def test_BitmapFont_render_on(self):
+ np = pytest.importorskip("numpy", reason="numpy module is not available")
# Initialize font, surface, and BitmapFont for tests
fontpath = byteify(RESOURCES.get_path("font.bmp"), "utf-8")
sf = surface.SDL_LoadBMP(fontpath)
participants (1)
-
Source-Sync