Try again to fix shebangs
This commit is contained in:
parent
d83add7fb5
commit
1a8d919f09
25
pygtk2.spec
25
pygtk2.spec
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
Name: pygtk2
|
Name: pygtk2
|
||||||
Version: 2.24.0
|
Version: 2.24.0
|
||||||
Release: 19%{?dist}
|
Release: 20%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Summary: Python bindings for GTK+
|
Summary: Python bindings for GTK+
|
||||||
@ -100,6 +100,16 @@ This package contains documentation files for %{name}.
|
|||||||
%setup -q -n pygtk-%{version}
|
%setup -q -n pygtk-%{version}
|
||||||
%patch0 -p1 -b .Fix-leaks-of-Pango-objects
|
%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
|
%build
|
||||||
%configure --enable-thread --enable-numpy
|
%configure --enable-thread --enable-numpy
|
||||||
@ -109,16 +119,6 @@ This package contains documentation files for %{name}.
|
|||||||
%{make_install}
|
%{make_install}
|
||||||
find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f
|
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
|
%files
|
||||||
%doc AUTHORS NEWS README MAPPING
|
%doc AUTHORS NEWS README MAPPING
|
||||||
@ -149,6 +149,9 @@ done
|
|||||||
%{_datadir}/gtk-doc/html/pygtk/
|
%{_datadir}/gtk-doc/html/pygtk/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 01 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-20
|
||||||
|
- Try again to fix shebangs
|
||||||
|
|
||||||
* Thu Feb 01 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-19
|
* Thu Feb 01 2018 Leigh Scott <leigh123linux@googlemail.com> - 2.24.0-19
|
||||||
- Fix shebangs
|
- Fix shebangs
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user