From b721373fcd004e955b6d2aadb5f7070a55ec2c3b7e60cef1c8e2cca72651cf22 Mon Sep 17 00:00:00 2001 From: Todd R Date: Tue, 1 Aug 2017 16:10:53 +0000 Subject: [PATCH 1/6] Accepting request 513624 from home:kkirill:branches:devel:languages:python - fix build for oS:Factory (fix examples) - make Brain Workshop work with system pyglet and latest python2 (fix "import Image") - add WMClass to have a proper application name instead of Unknown OBS-URL: https://build.opensuse.org/request/show/513624 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=7 --- pyglet-1.2.4-add-wmclass.patch | 34 ++++ pyglet-1.2.4-fix-examples.patch | 300 ++++++++++++++++++++++++++++ pyglet-1.2.4-fix-image-import.patch | 13 ++ python-pyglet.changes | 7 + python-pyglet.spec | 11 +- 5 files changed, 364 insertions(+), 1 deletion(-) create mode 100644 pyglet-1.2.4-add-wmclass.patch create mode 100644 pyglet-1.2.4-fix-examples.patch create mode 100644 pyglet-1.2.4-fix-image-import.patch diff --git a/pyglet-1.2.4-add-wmclass.patch b/pyglet-1.2.4-add-wmclass.patch new file mode 100644 index 0000000..73a2c53 --- /dev/null +++ b/pyglet-1.2.4-add-wmclass.patch @@ -0,0 +1,34 @@ +Index: pyglet/window/xlib/__init__.py +=================================================================== +--- pyglet/window/xlib/__init__.py.orig ++++ pyglet/window/xlib/__init__.py +@@ -352,6 +352,9 @@ class XlibWindow(BaseWindow): + # Set caption + self.set_caption(self._caption) + ++ # Set WM_CLASS for modern desktop environments ++ self.set_wm_class(self._caption) ++ + # this is supported by some compositors (ie gnome-shell), and more to come + # see: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idp6357888 + _NET_WM_BYPASS_COMPOSITOR_HINT_ON = c_ulong(int(self._fullscreen)) +@@ -513,6 +516,19 @@ class XlibWindow(BaseWindow): + self._set_text_property('_NET_WM_NAME', caption) + self._set_text_property('_NET_WM_ICON_NAME', caption) + ++ def set_wm_class(self, name): ++ # WM_CLASS can only contain Ascii characters ++ try: ++ name = name.encode('ascii') ++ except UnicodeEncodeError: ++ name = "pyglet" ++ ++ hints = xlib.XAllocClassHint() ++ hints.contents.res_class = asbytes(name) ++ hints.contents.res_name = asbytes(name.lower()) ++ xlib.XSetClassHint(self._x_display, self._window, hints.contents) ++ xlib.XFree(hints) ++ + def get_caption(self): + return self._caption + diff --git a/pyglet-1.2.4-fix-examples.patch b/pyglet-1.2.4-fix-examples.patch new file mode 100644 index 0000000..f735896 --- /dev/null +++ b/pyglet-1.2.4-fix-examples.patch @@ -0,0 +1,300 @@ +Index: examples/apple_remote.py +=================================================================== +--- examples/apple_remote.py.orig ++++ examples/apple_remote.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + ''' + ''' +Index: examples/events.py +=================================================================== +--- examples/events.py.orig ++++ examples/events.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/fixed_resolution.py +=================================================================== +--- examples/fixed_resolution.py.orig ++++ examples/fixed_resolution.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/font_comparison.py +=================================================================== +--- examples/font_comparison.py.orig ++++ examples/font_comparison.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/graphics.py +=================================================================== +--- examples/graphics.py.orig ++++ examples/graphics.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/html_label.py +=================================================================== +--- examples/html_label.py.orig ++++ examples/html_label.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/image_convert.py +=================================================================== +--- examples/image_convert.py.orig ++++ examples/image_convert.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/image_display.py +=================================================================== +--- examples/image_display.py.orig ++++ examples/image_display.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/input.py +=================================================================== +--- examples/input.py.orig ++++ examples/input.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + ''' + ''' +Index: examples/joystick.py +=================================================================== +--- examples/joystick.py.orig ++++ examples/joystick.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + ''' + ''' +Index: examples/media_info.py +=================================================================== +--- examples/media_info.py.orig ++++ examples/media_info.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + '''Print details of a media file that pyglet can open (requires AVbin). + +Index: examples/media_player.py +=================================================================== +--- examples/media_player.py.orig ++++ examples/media_player.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/multiple_windows.py +=================================================================== +--- examples/multiple_windows.py.orig ++++ examples/multiple_windows.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/opengl.py +=================================================================== +--- examples/opengl.py.orig ++++ examples/opengl.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/opengl_3.py +=================================================================== +--- examples/opengl_3.py.orig ++++ examples/opengl_3.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + # $Id:$ + + '''In order to use the new features of OpenGL 3, you must explicitly create +Index: examples/show_input.py +=================================================================== +--- examples/show_input.py.orig ++++ examples/show_input.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + '''Graphically show all devices available via the pyglet.input interface. + +Index: examples/tablet.py +=================================================================== +--- examples/tablet.py.orig ++++ examples/tablet.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python2 + # $Id:$ + + import pyglet +Index: examples/text_input.py +=================================================================== +--- examples/text_input.py.orig ++++ examples/text_input.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + + '''Demonstrates basic use of IncrementalTextLayout and Caret. + +Index: examples/timer.py +=================================================================== +--- examples/timer.py.orig ++++ examples/timer.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/video.py +=================================================================== +--- examples/video.py.orig ++++ examples/video.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/window_platform_event.py +=================================================================== +--- examples/window_platform_event.py.orig ++++ examples/window_platform_event.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python2 + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/astraea/astraea.py +=================================================================== +--- examples/astraea/astraea.py.orig ++++ examples/astraea/astraea.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/astraea/setup.py +=================================================================== +--- examples/astraea/setup.py.orig ++++ examples/astraea/setup.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/noisy/noisy.py +=================================================================== +--- examples/noisy/noisy.py.orig ++++ examples/noisy/noisy.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/programming_guide/animation.py +=================================================================== +--- examples/programming_guide/animation.py.orig ++++ examples/programming_guide/animation.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/programming_guide/events.py +=================================================================== +--- examples/programming_guide/events.py.orig ++++ examples/programming_guide/events.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/programming_guide/hello_world.py +=================================================================== +--- examples/programming_guide/hello_world.py.orig ++++ examples/programming_guide/hello_world.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/programming_guide/image_viewer.py +=================================================================== +--- examples/programming_guide/image_viewer.py.orig ++++ examples/programming_guide/image_viewer.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/programming_guide/window_subclass.py +=================================================================== +--- examples/programming_guide/window_subclass.py.orig ++++ examples/programming_guide/window_subclass.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner +Index: examples/soundspace/soundspace.py +=================================================================== +--- examples/soundspace/soundspace.py.orig ++++ examples/soundspace/soundspace.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python + # ---------------------------------------------------------------------------- + # pyglet + # Copyright (c) 2006-2008 Alex Holkner diff --git a/pyglet-1.2.4-fix-image-import.patch b/pyglet-1.2.4-fix-image-import.patch new file mode 100644 index 0000000..0dc72b1 --- /dev/null +++ b/pyglet-1.2.4-fix-image-import.patch @@ -0,0 +1,13 @@ +Index: pyglet/image/codecs/pil.py +=================================================================== +--- pyglet/image/codecs/pil.py.orig ++++ pyglet/image/codecs/pil.py +@@ -48,7 +48,7 @@ from pyglet.image.codecs import * + + try: + import Image +-except ImportError: ++except (ImportError, ValueError): + from PIL import Image + + class PILImageDecoder(ImageDecoder): diff --git a/python-pyglet.changes b/python-pyglet.changes index 477dca3..4d1e3db 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 31 21:13:01 UTC 2017 - kkirill@opensuse.org + +- Add pyglet-1.2.4-fix-image-import.patch to fix "import Image" +- Add pyglet-1.2.4-add-wmclass.patch to add WMClass +- Add yglet-1.2.4-fix-examples.patch to fix python shebang + ------------------------------------------------------------------- Thu Sep 3 08:47:16 UTC 2015 - nemysis@openSUSE.org diff --git a/python-pyglet.spec b/python-pyglet.spec index 2ba1aeb..0e182c1 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyglet # -# Copyright (c) 2015 SUSE LINUX 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 @@ -27,6 +27,12 @@ Group: Development/Languages/Python Url: https://bitbucket.org/pyglet/pyglet Source0: http://pypi.python.org/packages/source/p/%{oname}/%{oname}-%{version}.tar.gz Source1: %{name}-rpmlintrc +# PATCH-FIX-OPENSUSE pyglet-1.2.4-fix-image-import.patch -- fix "import Image" +Patch0: pyglet-1.2.4-fix-image-import.patch +# PATCH-FEATURE-UPSTREAM pyglet-1.2.4-add-wmclass.patch -- https://bitbucket.org/pyglet/pyglet/issues/92 +Patch1: pyglet-1.2.4-add-wmclass.patch +# PATCH-FIX-UPSTREAM pyglet-1.2.4-fix-examples.patch -- fix intrepreter shebang +Patch2: pyglet-1.2.4-fix-examples.patch %if 0%{?suse_version} BuildRequires: fdupes %endif @@ -65,6 +71,9 @@ for Windows, Mac OS X and Linux. %prep %setup -q -n %{oname}-%{version} +%patch0 +%patch1 +%patch2 # Convert to unix line end find -name "*.py" -exec dos2unix "{}" "+" From b252d01a427c22ad35ff547d34f5c0e4f0dd6328b6b595f68b9060031e8e7406 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 3 Aug 2017 20:40:06 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=8 --- python-pyglet.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pyglet.changes b/python-pyglet.changes index 4d1e3db..6b7ba97 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -3,7 +3,7 @@ Mon Jul 31 21:13:01 UTC 2017 - kkirill@opensuse.org - Add pyglet-1.2.4-fix-image-import.patch to fix "import Image" - Add pyglet-1.2.4-add-wmclass.patch to add WMClass -- Add yglet-1.2.4-fix-examples.patch to fix python shebang +- Add pyglet-1.2.4-fix-examples.patch to fix python shebang ------------------------------------------------------------------- Thu Sep 3 08:47:16 UTC 2015 - nemysis@openSUSE.org From d2f579c10769e0b455dfa29b47f28666799a6145fa4751e004eb7cf7889d031c Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 6 Aug 2017 02:33:19 +0000 Subject: [PATCH 3/6] Accepting request 514743 from home:TheBlackCat:branches:devel:languages:python - Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/514743 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=9 --- python-pyglet.changes | 5 +++++ python-pyglet.spec | 43 ++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/python-pyglet.changes b/python-pyglet.changes index 6b7ba97..92b6b3d 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 6 02:32:29 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version + ------------------------------------------------------------------- Mon Jul 31 21:13:01 UTC 2017 - kkirill@opensuse.org diff --git a/python-pyglet.spec b/python-pyglet.spec index 0e182c1..aeb755a 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -16,8 +16,7 @@ # -%define oname pyglet - +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyglet Version: 1.2.4 Release: 0 @@ -25,7 +24,7 @@ Summary: Cross-platform windowing and multimedia library License: BSD-3-Clause Group: Development/Languages/Python Url: https://bitbucket.org/pyglet/pyglet -Source0: http://pypi.python.org/packages/source/p/%{oname}/%{oname}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/pyglet/pyglet-%{version}.tar.gz Source1: %{name}-rpmlintrc # PATCH-FIX-OPENSUSE pyglet-1.2.4-fix-image-import.patch -- fix "import Image" Patch0: pyglet-1.2.4-fix-image-import.patch @@ -33,21 +32,21 @@ Patch0: pyglet-1.2.4-fix-image-import.patch Patch1: pyglet-1.2.4-add-wmclass.patch # PATCH-FIX-UPSTREAM pyglet-1.2.4-fix-examples.patch -- fix intrepreter shebang Patch2: pyglet-1.2.4-fix-examples.patch -%if 0%{?suse_version} -BuildRequires: fdupes -%endif +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: alsa-devel BuildRequires: dos2unix +BuildRequires: fdupes BuildRequires: fontconfig-devel BuildRequires: freetype2-devel BuildRequires: gtk2-devel BuildRequires: openal-soft-devel -BuildRequires: python-devel BuildRequires: python-imaging -BuildRequires: python-setuptools BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) +BuildRequires: python-rpm-macros Requires: alsa-devel Requires: fontconfig-devel Requires: freetype2-devel @@ -57,12 +56,8 @@ Requires: python-imaging Requires: pkgconfig(gl) Requires: pkgconfig(glu) Requires: pkgconfig(x11) -BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description pyglet provides an object-oriented programming @@ -70,7 +65,7 @@ interface for developing games and other visually-rich applications for Windows, Mac OS X and Linux. %prep -%setup -q -n %{oname}-%{version} +%setup -q -n pyglet-%{version} %patch0 %patch1 %patch2 @@ -79,19 +74,21 @@ for Windows, Mac OS X and Linux. find -name "*.py" -exec dos2unix "{}" "+" %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%if 0%{?suse_version} - %fdupes -s %{buildroot}%{_prefix} -%endif +%{python_expand cp -r examples examples_%{$python_bin_suffix} +find . -name "*.py" -exec sed -i "s|#!/usr/bin/python|#!%__$python|" {} \; +} -%files +%files %{python_files} %defattr(-,root,root,-) -%doc CHANGELOG README LICENSE NOTICE RELEASE_NOTES examples -%{python_sitelib}/%{oname} -%{python_sitelib}/%{oname}-%{version}-py%{py_ver}.egg-info +%doc CHANGELOG README LICENSE NOTICE RELEASE_NOTES +%doc examples_%{python_bin_suffix}/ +%{python_sitelib}/pyglet +%{python_sitelib}/pyglet-%{version}-py*.egg-info %changelog From 7fe6562cf496a762449880fcc22b24e324542ae51e5bed42fa3e2ce0f4f799cc Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 7 Aug 2017 16:44:09 +0000 Subject: [PATCH 4/6] Accepting request 515046 from home:TheBlackCat:branches:devel:languages:python - Further fix shebangs - Remove pyglet-1.2.4-fix-examples.patch We will fix shebangs dynamically OBS-URL: https://build.opensuse.org/request/show/515046 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=10 --- pyglet-1.2.4-fix-examples.patch | 300 -------------------------------- python-pyglet.changes | 7 + python-pyglet.spec | 13 +- 3 files changed, 13 insertions(+), 307 deletions(-) delete mode 100644 pyglet-1.2.4-fix-examples.patch diff --git a/pyglet-1.2.4-fix-examples.patch b/pyglet-1.2.4-fix-examples.patch deleted file mode 100644 index f735896..0000000 --- a/pyglet-1.2.4-fix-examples.patch +++ /dev/null @@ -1,300 +0,0 @@ -Index: examples/apple_remote.py -=================================================================== ---- examples/apple_remote.py.orig -+++ examples/apple_remote.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - ''' - ''' -Index: examples/events.py -=================================================================== ---- examples/events.py.orig -+++ examples/events.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/fixed_resolution.py -=================================================================== ---- examples/fixed_resolution.py.orig -+++ examples/fixed_resolution.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/font_comparison.py -=================================================================== ---- examples/font_comparison.py.orig -+++ examples/font_comparison.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/graphics.py -=================================================================== ---- examples/graphics.py.orig -+++ examples/graphics.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/html_label.py -=================================================================== ---- examples/html_label.py.orig -+++ examples/html_label.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/image_convert.py -=================================================================== ---- examples/image_convert.py.orig -+++ examples/image_convert.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/image_display.py -=================================================================== ---- examples/image_display.py.orig -+++ examples/image_display.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/input.py -=================================================================== ---- examples/input.py.orig -+++ examples/input.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - ''' - ''' -Index: examples/joystick.py -=================================================================== ---- examples/joystick.py.orig -+++ examples/joystick.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - ''' - ''' -Index: examples/media_info.py -=================================================================== ---- examples/media_info.py.orig -+++ examples/media_info.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - '''Print details of a media file that pyglet can open (requires AVbin). - -Index: examples/media_player.py -=================================================================== ---- examples/media_player.py.orig -+++ examples/media_player.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/multiple_windows.py -=================================================================== ---- examples/multiple_windows.py.orig -+++ examples/multiple_windows.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/opengl.py -=================================================================== ---- examples/opengl.py.orig -+++ examples/opengl.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/opengl_3.py -=================================================================== ---- examples/opengl_3.py.orig -+++ examples/opengl_3.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - # $Id:$ - - '''In order to use the new features of OpenGL 3, you must explicitly create -Index: examples/show_input.py -=================================================================== ---- examples/show_input.py.orig -+++ examples/show_input.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - '''Graphically show all devices available via the pyglet.input interface. - -Index: examples/tablet.py -=================================================================== ---- examples/tablet.py.orig -+++ examples/tablet.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python2 - # $Id:$ - - import pyglet -Index: examples/text_input.py -=================================================================== ---- examples/text_input.py.orig -+++ examples/text_input.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - - '''Demonstrates basic use of IncrementalTextLayout and Caret. - -Index: examples/timer.py -=================================================================== ---- examples/timer.py.orig -+++ examples/timer.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/video.py -=================================================================== ---- examples/video.py.orig -+++ examples/video.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/window_platform_event.py -=================================================================== ---- examples/window_platform_event.py.orig -+++ examples/window_platform_event.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python2 - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/astraea/astraea.py -=================================================================== ---- examples/astraea/astraea.py.orig -+++ examples/astraea/astraea.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/astraea/setup.py -=================================================================== ---- examples/astraea/setup.py.orig -+++ examples/astraea/setup.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/noisy/noisy.py -=================================================================== ---- examples/noisy/noisy.py.orig -+++ examples/noisy/noisy.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/programming_guide/animation.py -=================================================================== ---- examples/programming_guide/animation.py.orig -+++ examples/programming_guide/animation.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/programming_guide/events.py -=================================================================== ---- examples/programming_guide/events.py.orig -+++ examples/programming_guide/events.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/programming_guide/hello_world.py -=================================================================== ---- examples/programming_guide/hello_world.py.orig -+++ examples/programming_guide/hello_world.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/programming_guide/image_viewer.py -=================================================================== ---- examples/programming_guide/image_viewer.py.orig -+++ examples/programming_guide/image_viewer.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/programming_guide/window_subclass.py -=================================================================== ---- examples/programming_guide/window_subclass.py.orig -+++ examples/programming_guide/window_subclass.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner -Index: examples/soundspace/soundspace.py -=================================================================== ---- examples/soundspace/soundspace.py.orig -+++ examples/soundspace/soundspace.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python - # ---------------------------------------------------------------------------- - # pyglet - # Copyright (c) 2006-2008 Alex Holkner diff --git a/python-pyglet.changes b/python-pyglet.changes index 92b6b3d..06153f2 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 7 16:33:50 UTC 2017 - toddrme2178@gmail.com + +- Further fix shebangs +- Remove pyglet-1.2.4-fix-examples.patch + We will fix shebangs dynamically + ------------------------------------------------------------------- Sun Aug 6 02:32:29 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pyglet.spec b/python-pyglet.spec index aeb755a..0fa419f 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -30,8 +30,6 @@ Source1: %{name}-rpmlintrc Patch0: pyglet-1.2.4-fix-image-import.patch # PATCH-FEATURE-UPSTREAM pyglet-1.2.4-add-wmclass.patch -- https://bitbucket.org/pyglet/pyglet/issues/92 Patch1: pyglet-1.2.4-add-wmclass.patch -# PATCH-FIX-UPSTREAM pyglet-1.2.4-fix-examples.patch -- fix intrepreter shebang -Patch2: pyglet-1.2.4-fix-examples.patch BuildRequires: %{python_module Pillow} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} @@ -68,7 +66,6 @@ for Windows, Mac OS X and Linux. %setup -q -n pyglet-%{version} %patch0 %patch1 -%patch2 # Convert to unix line end find -name "*.py" -exec dos2unix "{}" "+" @@ -78,16 +75,18 @@ find -name "*.py" -exec dos2unix "{}" "+" %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} -%{python_expand cp -r examples examples_%{$python_bin_suffix} -find . -name "*.py" -exec sed -i "s|#!/usr/bin/python|#!%__$python|" {} \; +%{python_expand cp -Lr examples examples_%{$python_bin_suffix} +find examples_%{$python_bin_suffix} -name "*.py" -exec sed -i "s|^#!/usr/bin/python$|#!%{__$python}|" {} \; +find examples_%{$python_bin_suffix} -name "*.py" -exec sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" {} \; +%fdupes examples_%{$python_bin_suffix} +%fdupes %{buildroot}%{$python_sitelib} } %files %{python_files} %defattr(-,root,root,-) %doc CHANGELOG README LICENSE NOTICE RELEASE_NOTES -%doc examples_%{python_bin_suffix}/ +%doc examples_%{python_bin_suffix} %{python_sitelib}/pyglet %{python_sitelib}/pyglet-%{version}-py*.egg-info From 3c9ada7aa96b5dfb47f70478f3736e5fca504103dfda35b0a4b080c33eadea11 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Fri, 11 Aug 2017 07:29:43 +0000 Subject: [PATCH 5/6] Accepting request 515267 from home:jengelh:branches:devel:languages:python - Other OS need not be mentioned in description for an openSUSE package. OBS-URL: https://build.opensuse.org/request/show/515267 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=11 --- python-pyglet.changes | 6 ++++++ python-pyglet.spec | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/python-pyglet.changes b/python-pyglet.changes index 06153f2..c80db6b 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 8 21:33:53 UTC 2017 - jengelh@inai.de + +- Other OS need not be mentioned in description for an openSUSE + package. + ------------------------------------------------------------------- Mon Aug 7 16:33:50 UTC 2017 - toddrme2178@gmail.com diff --git a/python-pyglet.spec b/python-pyglet.spec index 0fa419f..fa89fb4 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -20,7 +20,7 @@ Name: python-pyglet Version: 1.2.4 Release: 0 -Summary: Cross-platform windowing and multimedia library +Summary: Windowing and multimedia library License: BSD-3-Clause Group: Development/Languages/Python Url: https://bitbucket.org/pyglet/pyglet @@ -41,10 +41,10 @@ BuildRequires: freetype2-devel BuildRequires: gtk2-devel BuildRequires: openal-soft-devel BuildRequires: python-imaging +BuildRequires: python-rpm-macros BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) -BuildRequires: python-rpm-macros Requires: alsa-devel Requires: fontconfig-devel Requires: freetype2-devel @@ -58,9 +58,8 @@ BuildArch: noarch %python_subpackages %description -pyglet provides an object-oriented programming -interface for developing games and other visually-rich applications -for Windows, Mac OS X and Linux. +pyglet provides an object-oriented programming interface for +developing games and other visually-rich applications. %prep %setup -q -n pyglet-%{version} From 5b35bb21563c7a1e396b8c31ac4b3723e358a5e9204c93454eec24484900297d Mon Sep 17 00:00:00 2001 From: Todd R Date: Sun, 13 Aug 2017 15:17:21 +0000 Subject: [PATCH 6/6] Accepting request 516623 from home:TheBlackCat:branches:devel:languages:python Remove obsolete python-imaging dependency OBS-URL: https://build.opensuse.org/request/show/516623 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyglet?expand=0&rev=12 --- python-pyglet.changes | 5 +++++ python-pyglet.spec | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python-pyglet.changes b/python-pyglet.changes index c80db6b..21d56b1 100644 --- a/python-pyglet.changes +++ b/python-pyglet.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Aug 13 15:07:20 UTC 2017 - toddrme2178@gmail.com + +- Remove obsolete python-imaging dependency + ------------------------------------------------------------------- Tue Aug 8 21:33:53 UTC 2017 - jengelh@inai.de diff --git a/python-pyglet.spec b/python-pyglet.spec index fa89fb4..7c30cc1 100644 --- a/python-pyglet.spec +++ b/python-pyglet.spec @@ -40,7 +40,6 @@ BuildRequires: fontconfig-devel BuildRequires: freetype2-devel BuildRequires: gtk2-devel BuildRequires: openal-soft-devel -BuildRequires: python-imaging BuildRequires: python-rpm-macros BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) @@ -50,10 +49,10 @@ Requires: fontconfig-devel Requires: freetype2-devel Requires: gtk2-devel Requires: openal-soft-devel -Requires: python-imaging Requires: pkgconfig(gl) Requires: pkgconfig(glu) Requires: pkgconfig(x11) +Requires: python-Pillow BuildArch: noarch %python_subpackages