diff --git a/pygtk2.spec b/pygtk2.spec index 65e360d..4dba8a5 100644 --- a/pygtk2.spec +++ b/pygtk2.spec @@ -13,7 +13,7 @@ Name: pygtk2 Version: 2.24.0 -Release: 18%{?dist} +Release: 19%{?dist} License: LGPLv2+ Group: Development/Languages Summary: Python bindings for GTK+ @@ -100,6 +100,7 @@ This package contains documentation files for %{name}. %setup -q -n pygtk-%{version} %patch0 -p1 -b .Fix-leaks-of-Pango-objects + %build %configure --enable-thread --enable-numpy %{make_build} @@ -108,6 +109,17 @@ This package contains documentation files for %{name}. %{make_install} find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f +# Fix shebangs to system Python2.x +for file in $(%{_bindir}/find %{buildroot} -name '*.py' -type f) +do + %{__sed} -i.orig \ + -e 's~#![ \t]*%{_bindir}/python$~#!%{__python2}~'\ + -e 's~#![ \t]*%{_bindir}/env[ \t]*python[2]*$~#!%{__python2}~' \ + ${file} + /bin/touch -r ${file}.orig ${file} + %{__rm} -f ${file}.orig +done + %files %doc AUTHORS NEWS README MAPPING %license COPYING @@ -137,6 +149,9 @@ find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f %{_datadir}/gtk-doc/html/pygtk/ %changelog +* Thu Feb 01 2018 Leigh Scott - 2.24.0-19 +- Fix shebangs + * Thu Aug 03 2017 Fedora Release Engineering - 2.24.0-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild