diff --git a/pygtk2.spec b/pygtk2.spec index 4dba8a5..d253abf 100644 --- a/pygtk2.spec +++ b/pygtk2.spec @@ -13,7 +13,7 @@ Name: pygtk2 Version: 2.24.0 -Release: 19%{?dist} +Release: 20%{?dist} License: LGPLv2+ Group: Development/Languages Summary: Python bindings for GTK+ @@ -100,6 +100,16 @@ This package contains documentation files for %{name}. %setup -q -n pygtk-%{version} %patch0 -p1 -b .Fix-leaks-of-Pango-objects +# Fix shebangs to system Python2.x +for file in $(%{_bindir}/find . -name '*.py' -type f) +do + %{__sed} -i.orig \ + -e 's~#!/usr/bin/python~#!%{__python2}~'\ + -e 's~#!/usr/bin/env python~#!%{__python2}~'\ + ${file} + /bin/touch -r ${file}.orig ${file} + %{__rm} -f ${file}.orig +done %build %configure --enable-thread --enable-numpy @@ -109,16 +119,6 @@ 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 @@ -149,6 +149,9 @@ done %{_datadir}/gtk-doc/html/pygtk/ %changelog +* Thu Feb 01 2018 Leigh Scott - 2.24.0-20 +- Try again to fix shebangs + * Thu Feb 01 2018 Leigh Scott - 2.24.0-19 - Fix shebangs