From 2112731fcae82c4d4a2e63453672029efb0aba4659f7f48eb7acecef802339b8 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 9 Aug 2017 18:58:04 +0000 Subject: [PATCH 1/3] Accepting request 515786 from home:TheBlackCat:branches:devel:languages:python - Update to version 1.9.3 - Implement single-spec version - Fix source URL - Fix shebangs OBS-URL: https://build.opensuse.org/request/show/515786 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=13 --- README.SUSE | 6 -- pygame-1.9.1release.tar.gz | 3 - pygame-1.9.3.tar.gz | 3 + pygame-v4l-2.6.38.patch | 11 --- python-pygame.changes | 13 ++++ python-pygame.rpmlintrc | 2 - python-pygame.spec | 138 +++++++++++++++++++++---------------- 7 files changed, 95 insertions(+), 81 deletions(-) delete mode 100644 README.SUSE delete mode 100644 pygame-1.9.1release.tar.gz create mode 100644 pygame-1.9.3.tar.gz delete mode 100644 pygame-v4l-2.6.38.patch delete mode 100644 python-pygame.rpmlintrc diff --git a/README.SUSE b/README.SUSE deleted file mode 100644 index 6e582fc..0000000 --- a/README.SUSE +++ /dev/null @@ -1,6 +0,0 @@ -Python pygame -============= - -More documentation for pygame can be found in package python-pygame-doc, if -you want some more examples check package python-gamelets. - diff --git a/pygame-1.9.1release.tar.gz b/pygame-1.9.1release.tar.gz deleted file mode 100644 index 60339a5..0000000 --- a/pygame-1.9.1release.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a26095472ae4be9631e0d5bfb9a52ac57a3a091e45757913128e4a473807d433 -size 2134254 diff --git a/pygame-1.9.3.tar.gz b/pygame-1.9.3.tar.gz new file mode 100644 index 0000000..8323312 --- /dev/null +++ b/pygame-1.9.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:751021819bdc0cbe5cbd51904abb6ff9e9aee5b0e8955af02284d0e77d6c9ec2 +size 2974541 diff --git a/pygame-v4l-2.6.38.patch b/pygame-v4l-2.6.38.patch deleted file mode 100644 index 0f548a7..0000000 --- a/pygame-v4l-2.6.38.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/camera.h 2008-10-10 04:37:10.000000000 +0200 -+++ src/camera.h 2011-07-07 13:00:43.880088827 +0200 -@@ -39,7 +39,7 @@ - - #include /* for videodev2.h */ - -- #include -+ #include - #include - #endif - diff --git a/python-pygame.changes b/python-pygame.changes index 4432ae0..75bb5e4 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Aug 8 20:33:56 UTC 2017 - toddrme2178@gmail.com + +- Update to version 1.9.3 + * This is a bugfix release which fixes a couple of key issues + which came up with 1.9.2 +- Update to version 1.9.2 +- Implement single-spec version +- Fix source URL +- Fix shebangs +- Remove pygame-v4l-2.6.38.patch + No longer needed + ------------------------------------------------------------------- Sun Oct 12 09:49:51 UTC 2014 - mailaender@opensuse.org diff --git a/python-pygame.rpmlintrc b/python-pygame.rpmlintrc deleted file mode 100644 index e508c08..0000000 --- a/python-pygame.rpmlintrc +++ /dev/null @@ -1,2 +0,0 @@ -addFilter("/site-packages/pygame/examples/") -addFilter("/site-packages/pygame/tests/") \ No newline at end of file diff --git a/python-pygame.spec b/python-pygame.spec index 984c298..2a25ff8 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -1,7 +1,7 @@ # # spec file for package python-pygame # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -16,60 +16,50 @@ # +# There are font issues in the test environment +%bcond_with test + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pygame -Version: 1.9.1 +Version: 1.9.3 Release: 0 -Source: http://pygame.org/ftp/pygame-%{version}release.tar.gz -Source1: README.SUSE -Source2: python-pygame.rpmlintrc -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: pygame-v4l-2.6.38.patch +Source0: https://files.pythonhosted.org/packages/source/P/Pygame/pygame-%{version}.tar.gz Summary: A Python Module for Interfacing with the SDL Multimedia Library License: LGPL-2.1+ Group: Development/Libraries/Python Url: http://www.pygame.org/ -Provides: pygame = %{version} -Obsoletes: pygame < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module setuptools} BuildRequires: SDL_image-devel BuildRequires: SDL_mixer-devel BuildRequires: SDL_ttf-devel BuildRequires: fdupes +BuildRequires: fontconfig +BuildRequires: freetype2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel -BuildRequires: python-devel -BuildRequires: xorg-x11 -%if 0%{?suse_version} > 1110 -BuildRequires: python-numpy -%else -BuildRequires: python-numeric -%endif -%if 0%{?suse_version} >= 1210 BuildRequires: libv4l-devel >= 0.8.4 -%endif -%if 0%{?suse_version} >= 1320 BuildRequires: portmidi-devel +BuildRequires: python-rpm-macros +BuildRequires: xorg-x11 +Requires: fontconfig +Requires: python-numpy +%ifpython2 +Provides: pygame = %{version} +Obsoletes: pygame < %{version} %endif -%{py_requires} + +%python_subpackages %description Pygame is a Python wrapper module for the SDL multimedia library. It contains Python functions and classes that allow you to use SDL's -support for playing CD-ROMs, audio and video output, and keyboard, +support for playing CD-ROMs, audio and video output, and kz`eyboard, mouse and joystick input. Pygame also includes support for the Numerical Python extension. Pygame is the successor to the pySDL wrapper project, written by Mark Baker. -%package doc -Summary: Pygame documentation and example programs -Group: Development/Libraries/Python -Provides: pygame-doc > 1.5.5 -Obsoletes: pygame-doc <= 1.5.5 -Requires: python-pygame = %{version} - -%description doc -This package contains documentation and example programs for Pygame. - %package devel Summary: Pygame development package Group: Development/Libraries/Python @@ -78,41 +68,71 @@ Requires: python-pygame = %{version} %description devel This package contains the header files for developers of Pygame. +%package -n %{name}-doc +Summary: Pygame documentation and example programs +Group: Development/Libraries/Python +Provides: pygame-doc = %{version} +Obsoletes: pygame-doc < %{version} +Provides: %{python_module pygame-doc = %{version}} + +%description -n %{name}-doc +This package contains documentation and example programs for Pygame. + %prep -%setup -q -n pygame-%{version}release -%if 0%{?suse_version} >= 1210 -%patch1 -%endif +%setup -q -n pygame-%{version} +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 +# Fix wrong-script-interpreter +find examples -name '*.py' -exec sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" {} \; +find examples -name '*.py' -exec sed -i "s|^#! /usr/bin/env python$|#!%{__python3}|" {} \; +chmod a+x examples/*.py +%fdupes docs +%fdupes examples %build -export CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing" -yes y | python -d config.py -python setup.py build +export CFLAGS="%{optflags} -fno-strict-aliasing" +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -#install doc -install -d %{buildroot}%{_docdir}/python-pygame -install -m 644 WHATSNEW README.txt %{SOURCE1} %{buildroot}%{_docdir}/python-pygame -cp -r docs/ examples/ %{buildroot}%{_docdir}/python-pygame +%python_install +%{python_expand pushd %{buildroot}%{$python_sitearch} +sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" pygame/tests/test_utils/png.py +chmod a+x pygame/tests/test_utils/png.py +chmod a+x pygame/examples/macosx/aliens_app_example/aliens.py +chmod a+x pygame/examples/*.py +chmod a-x pygame/examples/__init__.py +chmod a-x pygame/examples/prevent_display_stretching.py +chmod a-x pygame/examples/freetype_misc.py +$python -m compileall -d %{$python_sitearch} pygame/tests/test_utils/ +$python -O -m compileall -d %{$python_sitearch} pygame/tests/test_utils/ +%fdupes . +popd +} -%fdupes -s %{buildroot}%{_prefix} +%if %{with test} +%check +export SDL_VIDEODRIVER=dummy +export SDL_AUDIODRIVER=disk +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} +$python -m pygame.tests.__main__ --exclude opengl --time_out 300 +} +%endif -%files -%defattr(644,root,root,755) -%doc %dir %{_docdir}/python-pygame -%doc %{_docdir}/python-pygame/WHATSNEW -%doc %{_docdir}/python-pygame/README.txt -%doc %{_docdir}/python-pygame/README.SUSE -%{python_sitearch}/* +%files %{python_files} +%defattr(-,root,root) +%doc LGPL WHATSNEW readme.html readme.rst +%{python_sitearch}/pygame/ +%{python_sitearch}/pygame-%{version}-py*.egg-info -%files doc -%defattr(644,root,root,755) -%doc %{_docdir}/python-pygame/docs -%doc %{_docdir}/python-pygame/examples +%files %{python_files devel} +%defattr(-,root,root) +%doc LGPL +%{python_sysconfig_var INCLUDEPY}/pygame/ -%files devel -%defattr(644,root,root,755) -%{py_incdir}/pygame/ +%files -n %{name}-doc +%defattr(-,root,root) +%doc LGPL +%doc docs/ +%doc examples/ %changelog From 1ecf93d536189b76a77d85efa6391d8296dfe42730389f85964ad1fe9c8e56e6 Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 13 Aug 2017 18:19:07 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=14 --- python-pygame.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pygame.spec b/python-pygame.spec index 2a25ff8..f6e28c1 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -55,7 +55,7 @@ Obsoletes: pygame < %{version} %description Pygame is a Python wrapper module for the SDL multimedia library. It contains Python functions and classes that allow you to use SDL's -support for playing CD-ROMs, audio and video output, and kz`eyboard, +support for playing CD-ROMs, audio and video output, and keyboard, mouse and joystick input. Pygame also includes support for the Numerical Python extension. Pygame is the successor to the pySDL wrapper project, written by Mark Baker. From 41725d94a819c81408efdf7da4a046197eef90ed124ef7e3f0aacc006dc19f77 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Sat, 19 Aug 2017 05:56:37 +0000 Subject: [PATCH 3/3] Accepting request 517443 from home:jengelh:branches:devel:languages:python - Fix RPM group. OBS-URL: https://build.opensuse.org/request/show/517443 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=15 --- python-pygame.changes | 5 +++++ python-pygame.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python-pygame.changes b/python-pygame.changes index 75bb5e4..40fbce0 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 17 22:13:05 UTC 2017 - jengelh@inai.de + +- Fix RPM group. + ------------------------------------------------------------------- Tue Aug 8 20:33:56 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pygame.spec b/python-pygame.spec index f6e28c1..5c024cd 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -70,7 +70,7 @@ This package contains the header files for developers of Pygame. %package -n %{name}-doc Summary: Pygame documentation and example programs -Group: Development/Libraries/Python +Group: Documentation/Other Provides: pygame-doc = %{version} Obsoletes: pygame-doc < %{version} Provides: %{python_module pygame-doc = %{version}}