14
0
forked from pool/python-pyglet

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
This commit is contained in:
Todd R
2017-08-07 16:44:09 +00:00
committed by Git OBS Bridge
parent d2f579c107
commit 7fe6562cf4
3 changed files with 13 additions and 307 deletions

View File

@@ -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