Hello community, here is the log from the commit of package python-pyglet for openSUSE:Factory checked in at 2017-08-17 11:51:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyglet (Old) and /work/SRC/openSUSE:Factory/.python-pyglet.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyglet" Thu Aug 17 11:51:25 2017 rev:3 rq:516624 version:1.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyglet/python-pyglet.changes 2015-11-11 10:35:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-pyglet.new/python-pyglet.changes 2017-08-17 11:51:29.311361645 +0200 @@ -1,0 +2,30 @@ +Sun Aug 13 15:07:20 UTC 2017 - [email protected] + +- Remove obsolete python-imaging dependency + +------------------------------------------------------------------- +Tue Aug 8 21:33:53 UTC 2017 - [email protected] + +- Other OS need not be mentioned in description for an openSUSE + package. + +------------------------------------------------------------------- +Mon Aug 7 16:33:50 UTC 2017 - [email protected] + +- Further fix shebangs +- Remove pyglet-1.2.4-fix-examples.patch + We will fix shebangs dynamically + +------------------------------------------------------------------- +Sun Aug 6 02:32:29 UTC 2017 - [email protected] + +- Implement single-spec version + +------------------------------------------------------------------- +Mon Jul 31 21:13:01 UTC 2017 - [email protected] + +- 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 pyglet-1.2.4-fix-examples.patch to fix python shebang + +------------------------------------------------------------------- New: ---- pyglet-1.2.4-add-wmclass.patch pyglet-1.2.4-fix-image-import.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyglet.spec ++++++ --- /var/tmp/diff_new_pack.Ip6VWJ/_old 2017-08-17 11:51:30.767157160 +0200 +++ /var/tmp/diff_new_pack.Ip6VWJ/_new 2017-08-17 11:51:30.779155475 +0200 @@ -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 @@ -16,29 +16,31 @@ # -%define oname pyglet - +%{?!python_module:%define python_module() python-%{**} python3-%{**}} 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 -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 -%if 0%{?suse_version} -BuildRequires: fdupes -%endif +# 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 +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: python-rpm-macros BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) @@ -47,42 +49,43 @@ Requires: freetype2-devel Requires: gtk2-devel Requires: openal-soft-devel -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 +Requires: python-Pillow BuildArch: noarch -%endif +%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 %{oname}-%{version} +%setup -q -n pyglet-%{version} +%patch0 +%patch1 # Convert to unix line end find -name "*.py" -exec dos2unix "{}" "+" %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%if 0%{?suse_version} - %fdupes -s %{buildroot}%{_prefix} -%endif +%{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 +%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 ++++++ pyglet-1.2.4-add-wmclass.patch ++++++ 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 ++++++ pyglet-1.2.4-fix-image-import.patch ++++++ 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):
