Invoke /usr/bin/python2 instead of /usr/bin/python, fixes #1605545, #1606784

This commit is contained in:
Hans de Goede 2018-08-09 12:21:28 +02:00
parent 6756277b23
commit 75b386a2bb

View File

@ -2,7 +2,7 @@
Name: pygobject2
Version: 2.28.7
Release: 3%{?dist}
Release: 4%{?dist}
License: LGPLv2+
Summary: Python 2 bindings for GObject
URL: http://www.pygtk.org/
@ -11,6 +11,7 @@ Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-%{versi
### Build Dependencies ###
BuildRequires: gcc
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(python2)
@ -51,10 +52,10 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n pygobject-%{version}
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
%build
PYTHON=%{__python}
PYTHON=%{__python2}
export PYTHON
%configure --disable-introspection
make %{?_smp_mflags}
@ -63,21 +64,16 @@ make %{?_smp_mflags}
make DESTDIR=$RPM_BUILD_ROOT install
find $RPM_BUILD_ROOT -name '*.la' -delete
find $RPM_BUILD_ROOT -name '*.a' -delete
rm examples/Makefile*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%files
%doc AUTHORS NEWS README
%doc examples
%{_libdir}/libpyglib-2.0-python.so*
%dir %{python_sitearch}/gtk-2.0
%dir %{python_sitearch}/gobject
%dir %{python_sitearch}/glib
%doc AUTHORS NEWS README examples
%{_libdir}/libpyglib-2.0-python2.so*
%dir %{python2_sitearch}/gtk-2.0
%dir %{python2_sitearch}/gobject
%dir %{python2_sitearch}/glib
%{python2_sitearch}/gtk-2.0/*
%{python2_sitearch}/pygtk.*
%{python2_sitearch}/gobject/*
@ -101,6 +97,9 @@ rm examples/Makefile*
%{_datadir}/pygobject/xsl
%changelog
* Thu Aug 9 2018 Hans de Goede <hdegoede@redhat.com> - 2.28.7-4
- Invoke /usr/bin/python2 instead of /usr/bin/python, fixes #1605545, #1606784
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild