14
0
forked from pool/python-PySDL2

Accepting request 914878 from home:bnavigator:branches:devel:languages:python

- 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

OBS-URL: https://build.opensuse.org/request/show/914878
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=13
This commit is contained in:
2021-08-29 20:42:13 +00:00
committed by Git OBS Bridge
parent 50b2e4869b
commit 793affa45b
5 changed files with 105 additions and 6 deletions

View File

@@ -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.patch
BuildRequires: %{python_module setuptools}
BuildRequires: SDL2 >= 2.0.5
BuildRequires: SDL2_gfx >= 1.0.3
@@ -37,6 +39,7 @@ BuildRequires: python-rpm-macros
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 @@ discontinued PySDL project. In contrast to PySDL, it has no licensing
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 @@ trap "kill $! || true" EXIT
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}