14
0
forked from pool/python-PySDL2
Files
python-PySDL2/python-PySDL2.spec

92 lines
3.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-PySDL2
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define X_display ":98"
Name: python-PySDL2
Version: 0.9.16
Release: 0
Accepting request 963269 from home:bnavigator:branches:devel:languages:python - Update to version 0.9.11 * Added bindings for new functions and constants introduced in SDL2 2.0.20 * Added bindings and documentation for new functions and constants introduced in SDL2_ttf 2.0.18 - Changelog for Release 0.9.10 * Added bindings for new functions and constants introduced in SDL2 2.0.18 * Added experimental support for SDL 2.0.3 and 2.0.4 for older platforms (tested on an iMac G4 running 10.4.11) * Major improvements to the ext.pixelaccess module * Major rewrite of the ext.image module * New object-oriented method of rendering with sdl2.ext.Renderers using the new sdl2.ext.Texture class * Major expansion and rewrite of the sdl2.ext.Renderer class * New powerful sdl2.ext.FontTTF class for font rendering * Redocumented most of the sdl2.ext modules for better clarity and maintainability * Added automatic detection of Homebrew SDL2 binaries on Apple Silicon Macs as a fallback Deprecated a number of sdl2.ext modules and functions - Changelog for Release 0.9.9 * Added bindings for new functions and constants introduced in SDL2 2.0.16 * Reverted the fix for issue #139 which inadvertently caused Window.show() to force the window to use SDL2's software rendering, breaking the Renderer class and compatibility with PyOpenGL. - Drop PySDL2-pr193-skipnumpy.patch - Clean out test suite OBS-URL: https://build.opensuse.org/request/show/963269 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=14
2022-03-21 07:24:13 +00:00
Summary: Python ctypes wrapper around SDL2
License: SUSE-Public-Domain
Accepting request 963269 from home:bnavigator:branches:devel:languages:python - Update to version 0.9.11 * Added bindings for new functions and constants introduced in SDL2 2.0.20 * Added bindings and documentation for new functions and constants introduced in SDL2_ttf 2.0.18 - Changelog for Release 0.9.10 * Added bindings for new functions and constants introduced in SDL2 2.0.18 * Added experimental support for SDL 2.0.3 and 2.0.4 for older platforms (tested on an iMac G4 running 10.4.11) * Major improvements to the ext.pixelaccess module * Major rewrite of the ext.image module * New object-oriented method of rendering with sdl2.ext.Renderers using the new sdl2.ext.Texture class * Major expansion and rewrite of the sdl2.ext.Renderer class * New powerful sdl2.ext.FontTTF class for font rendering * Redocumented most of the sdl2.ext modules for better clarity and maintainability * Added automatic detection of Homebrew SDL2 binaries on Apple Silicon Macs as a fallback Deprecated a number of sdl2.ext modules and functions - Changelog for Release 0.9.9 * Added bindings for new functions and constants introduced in SDL2 2.0.16 * Reverted the fix for issue #139 which inadvertently caused Window.show() to force the window to use SDL2's software rendering, breaking the Renderer class and compatibility with PyOpenGL. - Drop PySDL2-pr193-skipnumpy.patch - Clean out test suite OBS-URL: https://build.opensuse.org/request/show/963269 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=14
2022-03-21 07:24:13 +00:00
URL: https://github.com/py-sdl/py-sdl2
Source: https://files.pythonhosted.org/packages/source/P/PySDL2/PySDL2-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-tests-SDL_GetError.patch -- based on commit 1c865e3
Patch0: https://github.com/py-sdl/py-sdl2/commit/1c865e3f751e678f3ad2d8f3fca17a0755fbeaf7.patch#/fix-tests-SDL_GetError.patch
# PATCH-FIX-UPSTREAM fix-test-SDL_hid_enumerate.patch -- based on commit d7c0604
Patch1: https://github.com/py-sdl/py-sdl2/commit/d7c0604381f6cbefa2c8b51c84b879e2f927e91e.patch#/fix-test-SDL_hid_enumerate.patch
# PATCH-FIX-UPSTREAM fix-partially-resolve-video_test.patch -- based on commit ed28ea6
Patch2: https://github.com/py-sdl/py-sdl2/commit/ed28ea6305dede1b6ba046e36ddae9ba2016b62e.patch#/fix-partially-resolve-video_test.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: SDL2 >= 2.0.22
BuildRequires: SDL2_gfx >= 1.0.4
BuildRequires: SDL2_image >= 2.6.0
BuildRequires: SDL2_mixer >= 2.6.0
BuildRequires: SDL2_ttf >= 2.20.0
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
Accepting request 963269 from home:bnavigator:branches:devel:languages:python - Update to version 0.9.11 * Added bindings for new functions and constants introduced in SDL2 2.0.20 * Added bindings and documentation for new functions and constants introduced in SDL2_ttf 2.0.18 - Changelog for Release 0.9.10 * Added bindings for new functions and constants introduced in SDL2 2.0.18 * Added experimental support for SDL 2.0.3 and 2.0.4 for older platforms (tested on an iMac G4 running 10.4.11) * Major improvements to the ext.pixelaccess module * Major rewrite of the ext.image module * New object-oriented method of rendering with sdl2.ext.Renderers using the new sdl2.ext.Texture class * Major expansion and rewrite of the sdl2.ext.Renderer class * New powerful sdl2.ext.FontTTF class for font rendering * Redocumented most of the sdl2.ext modules for better clarity and maintainability * Added automatic detection of Homebrew SDL2 binaries on Apple Silicon Macs as a fallback Deprecated a number of sdl2.ext modules and functions - Changelog for Release 0.9.9 * Added bindings for new functions and constants introduced in SDL2 2.0.16 * Reverted the fix for issue #139 which inadvertently caused Window.show() to force the window to use SDL2's software rendering, breaking the Renderer class and compatibility with PyOpenGL. - Drop PySDL2-pr193-skipnumpy.patch - Clean out test suite OBS-URL: https://build.opensuse.org/request/show/963269 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=14
2022-03-21 07:24:13 +00:00
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module pytest}
BuildRequires: libmpg123-0
BuildRequires: xorg-x11-server
# /SECTION
Requires: SDL2 >= 2.0.22
Requires: SDL2_gfx >= 1.0.4
Requires: SDL2_image >= 2.6.0
Requires: SDL2_mixer >= 2.6.0
Requires: SDL2_ttf >= 2.20.0
BuildArch: noarch
%python_subpackages
%description
Accepting request 963269 from home:bnavigator:branches:devel:languages:python - Update to version 0.9.11 * Added bindings for new functions and constants introduced in SDL2 2.0.20 * Added bindings and documentation for new functions and constants introduced in SDL2_ttf 2.0.18 - Changelog for Release 0.9.10 * Added bindings for new functions and constants introduced in SDL2 2.0.18 * Added experimental support for SDL 2.0.3 and 2.0.4 for older platforms (tested on an iMac G4 running 10.4.11) * Major improvements to the ext.pixelaccess module * Major rewrite of the ext.image module * New object-oriented method of rendering with sdl2.ext.Renderers using the new sdl2.ext.Texture class * Major expansion and rewrite of the sdl2.ext.Renderer class * New powerful sdl2.ext.FontTTF class for font rendering * Redocumented most of the sdl2.ext modules for better clarity and maintainability * Added automatic detection of Homebrew SDL2 binaries on Apple Silicon Macs as a fallback Deprecated a number of sdl2.ext modules and functions - Changelog for Release 0.9.9 * Added bindings for new functions and constants introduced in SDL2 2.0.16 * Reverted the fix for issue #139 which inadvertently caused Window.show() to force the window to use SDL2's software rendering, breaking the Renderer class and compatibility with PyOpenGL. - Drop PySDL2-pr193-skipnumpy.patch - Clean out test suite OBS-URL: https://build.opensuse.org/request/show/963269 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=14
2022-03-21 07:24:13 +00:00
PySDL2 is a pure Python wrapper around the SDL2, SDL2_mixer, SDL2_image,
SDL2_ttf, and SDL2_gfx libraries. Instead of relying on C code, it uses
the built-in ctypes module to interface with SDL2, and provides simple
Python classes and wrappers for common SDL2 functionality.
%prep
%autosetup -p1 -n PySDL2-%{version}
sed -i 's/\r$//' AUTHORS.txt COPYING.txt README.md
find . -name *DS_Store -delete
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
Accepting request 963269 from home:bnavigator:branches:devel:languages:python - Update to version 0.9.11 * Added bindings for new functions and constants introduced in SDL2 2.0.20 * Added bindings and documentation for new functions and constants introduced in SDL2_ttf 2.0.18 - Changelog for Release 0.9.10 * Added bindings for new functions and constants introduced in SDL2 2.0.18 * Added experimental support for SDL 2.0.3 and 2.0.4 for older platforms (tested on an iMac G4 running 10.4.11) * Major improvements to the ext.pixelaccess module * Major rewrite of the ext.image module * New object-oriented method of rendering with sdl2.ext.Renderers using the new sdl2.ext.Texture class * Major expansion and rewrite of the sdl2.ext.Renderer class * New powerful sdl2.ext.FontTTF class for font rendering * Redocumented most of the sdl2.ext modules for better clarity and maintainability * Added automatic detection of Homebrew SDL2 binaries on Apple Silicon Macs as a fallback Deprecated a number of sdl2.ext modules and functions - Changelog for Release 0.9.9 * Added bindings for new functions and constants introduced in SDL2 2.0.16 * Reverted the fix for issue #139 which inadvertently caused Window.show() to force the window to use SDL2's software rendering, breaking the Renderer class and compatibility with PyOpenGL. - Drop PySDL2-pr193-skipnumpy.patch - Clean out test suite OBS-URL: https://build.opensuse.org/request/show/963269 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=14
2022-03-21 07:24:13 +00:00
export SDL_VIDEODRIVER=dummy
export SDL_AUDIODRIVER=dummy
export SDL_RENDER_DRIVER=software
export PYTHONFAULTHANDLER=1
%pytest -rfEs
%files %{python_files}
%license COPYING.txt
%doc AUTHORS.txt README.md doc/
%{python_sitelib}/sdl2
%{python_sitelib}/PySDL2-%{version}*-info
%changelog