commit 4ad4c5394f3dc2b88047bd8ff9952942b6398eb0461c1bb52d1016f1c374f385 Author: Todd R Date: Fri Nov 10 19:59:47 2017 +0000 Accepting request 540644 from home:TheBlackCat:branches:devel:languages:python - initial version OBS-URL: https://build.opensuse.org/request/show/540644 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PySDL2?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/PySDL2-0.9.6.tar.gz b/PySDL2-0.9.6.tar.gz new file mode 100644 index 0000000..cfa25bf --- /dev/null +++ b/PySDL2-0.9.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b52acab5493a77b08c2afee1f385769fc2005f17cfeaf1886eff22dc78da2123 +size 1048158 diff --git a/python-PySDL2.changes b/python-PySDL2.changes new file mode 100644 index 0000000..ec3ebfa --- /dev/null +++ b/python-PySDL2.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Nov 7 18:24:56 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-PySDL2.spec b/python-PySDL2.spec new file mode 100644 index 0000000..7e3060b --- /dev/null +++ b/python-PySDL2.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-PySDL2 +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +# Can't be properly tested without full desktop system +%bcond_with test +Name: python-PySDL2 +Version: 0.9.6 +Release: 0 +License: SUSE-Public-Domain +Summary: Python SDL2 bindings +Url: https://github.com/marcusva/py-sdl2 +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/P/PySDL2/PySDL2-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module pytest} +BuildRequires: SDL2 +BuildRequires: SDL2_ttf +BuildRequires: xorg-x11-server +%define X_display ":98" +%endif +Requires: SDL2 +Requires: SDL2_ttf +BuildArch: noarch + +%python_subpackages + +%description +PySDL2 is a wrapper around the SDL2 library and as such similar to the +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} +sed -i 's/\r$//' AUTHORS.txt COPYING.txt README.rst + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%if %{with test} +%check +############################################# +### Launch a virtual framebuffer X server ### +############################################# +export DISPLAY=%{X_display} +Xvfb %{X_display} >& Xvfb.log & +trap "kill $! || true" EXIT +sleep 10 + +pushd sdl2/test +%python_exec -B -m pytest +popd +%endif + +%files %{python_files} +%defattr(-,root,root,-) +%doc AUTHORS.txt COPYING.txt README.rst +%{python_sitelib}/* + +%changelog