!5 fix build failed in python3

From: @jinzhimin369
Reviewed-by: @orange-snn
Signed-off-by: @orange-snn
This commit is contained in:
openeuler-ci-bot 2020-10-30 09:12:22 +08:00 committed by Gitee
commit d66fa235df

View File

@ -1,22 +1,17 @@
# switch it on when /usr/bin/python link to python3
%bcond_with link_python3
Name: telepathy-logger Name: telepathy-logger
Version: 0.8.2 Version: 0.8.2
Release: 12 Release: 13
Summary: Centralized Logging for the Telepathy Framework Summary: Centralized Logging for the Telepathy Framework
License: LGPLv2+ License: LGPLv2+
URL: https://telepathy.freedesktop.org/components/telepathy-logger/ URL: https://telepathy.freedesktop.org/components/telepathy-logger/
Source0: https://telepathy.freedesktop.org/releases/telepathy-logger/%{name}-%{version}.tar.bz2 Source0: https://telepathy.freedesktop.org/releases/telepathy-logger/%{name}-%{version}.tar.bz2
%if %{with link_python3}
Patch0: 0001-tools-Fix-the-build-with-Python-3.patch Patch0: 0001-tools-Fix-the-build-with-Python-3.patch
%endif
BuildRequires: dbus-devel dbus-glib-devel glib2-devel gnome-doc-utils BuildRequires: dbus-devel dbus-glib-devel glib2-devel gnome-doc-utils
BuildRequires: gobject-introspection-devel intltool libxml2-devel BuildRequires: gobject-introspection-devel intltool libxml2-devel
BuildRequires: sqlite-devel telepathy-glib-devel git python BuildRequires: sqlite-devel telepathy-glib-devel git python3
Requires: telepathy-filesystem Requires: telepathy-filesystem
%description %description
@ -41,11 +36,7 @@ sed -i.rpath -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
%endif %endif
%build %build
%configure --enable-introspection=yes \ %configure --enable-introspection=yes
%if ! %{with link_python3}
PYTHON=%{__python2} \
%endif
;
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build %make_build
@ -91,6 +82,12 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas &>/dev/null |
%{_datadir}/gtk-doc/html/telepathy-logger/* %{_datadir}/gtk-doc/html/telepathy-logger/*
%changelog %changelog
* Thu Oct 29 2020 jinzhimin <jinzhimin2@huawei.com> - 0.8.2-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build failed in python3
* Fri Feb 28 2020 hexiujun <hexiujun1@huawei.com> - 0.8.2-12 * Fri Feb 28 2020 hexiujun <hexiujun1@huawei.com> - 0.8.2-12
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA