From: wang biao Date: Thu, 15 Jun 2023 05:15:29 +0000 (+0800) Subject: apply to use python3.x for python-rpm X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07b677c8e20db3d77974b1438ab735b324301c91;p=platform%2Fupstream%2Frpm.git apply to use python3.x for python-rpm Change-Id: Ic9343cb2aa54ec803a196b85137af2079859d5b9 Signed-off-by: wang biao --- diff --git a/configure.ac b/configure.ac index 0c29311..9118a2b 100644 --- a/configure.ac +++ b/configure.ac @@ -802,7 +802,7 @@ esac], WITH_PYTHON_SUBPACKAGE=0 AS_IF([test "$enable_python" = yes],[ - AM_PATH_PYTHON([2.6],[ + AM_PATH_PYTHON([3.2],[ PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}], [WITH_PYTHON_SUBPACKAGE=1]) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_LIB) diff --git a/packaging/rpm.spec b/packaging/rpm.spec index 8a4b3c7..b46c3a7 100644 --- a/packaging/rpm.spec +++ b/packaging/rpm.spec @@ -112,12 +112,12 @@ echo "%__plugindir %{_libdir}/rpm-plugins" >> %{rpmhom echo "%__transaction_msm %{__plugindir}/msm.so" >> %{rpmhome}/macros echo "%__transaction_msm_default_policy %{_libdir}/rpm-plugins/msm-device-sec-policy" >> %{rpmhome}/macros -%package -n python-rpm +%package -n python3-rpm Summary: Python Bindings for Manipulating RPM Packages Requires: rpm = %{version} -BuildRequires: pkgconfig(python) +BuildRequires: pkgconfig(python3) -%description -n python-rpm +%description -n python3-rpm The python-rpm package contains a module that permits applications written in the Python programming language to use the interface supplied by RPM Package Manager libraries. @@ -352,11 +352,11 @@ rm -f %{_dbpath}/Filemd5s \ %{__plugindir}/msm-device-sec-policy %config(noreplace) %{_sysconfdir}/device-sec-policy -%files -n python-rpm +%files -n python3-rpm %defattr(-,root,root) %license COPYING -%{python_sitearch}/rpm -%attr(755,root,root) %{python_sitearch}/rpm/transaction.py +%{python3_sitearch}/rpm +%attr(755,root,root) %{python3_sitearch}/rpm/transaction.py %lang_package diff --git a/python/Makefile.am b/python/Makefile.am index a9bd347..6c98202 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -9,16 +9,16 @@ AM_CPPFLAGS = -I$(top_builddir)/include/ AM_CPPFLAGS += -I$(top_srcdir)/python AM_CPPFLAGS += @PYTHON_CFLAGS@ -pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la +pkgpyexec_LTLIBRARIES = _rpm.la _rpmb.la _rpms.la pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py -_rpmmodule_la_LDFLAGS = -module -avoid-version -shared -_rpmmodule_la_LIBADD = \ +_rpm_la_LDFLAGS = -module -avoid-version -shared +_rpm_la_LIBADD = \ $(top_builddir)/lib/librpm.la \ $(top_builddir)/rpmio/librpmio.la \ @PYTHON_LIBS@ -_rpmmodule_la_SOURCES = rpmmodule.c rpmsystem-py.h \ +_rpm_la_SOURCES = rpmmodule.c rpmsystem-py.h \ header-py.c header-py.h \ rpmarchive-py.c rpmarchive-py.h \ rpmds-py.c rpmds-py.h \ @@ -35,22 +35,22 @@ _rpmmodule_la_SOURCES = rpmmodule.c rpmsystem-py.h \ rpmte-py.c rpmte-py.h \ rpmts-py.c rpmts-py.h -_rpmbmodule_la_LDFLAGS = -module -avoid-version -shared -_rpmbmodule_la_LIBADD = \ +_rpmb_la_LDFLAGS = -module -avoid-version -shared +_rpmb_la_LIBADD = \ $(top_builddir)/build/librpmbuild.la \ $(top_builddir)/lib/librpm.la \ $(top_builddir)/rpmio/librpmio.la \ @PYTHON_LIBS@ -_rpmbmodule_la_SOURCES = rpmbmodule.c rpmsystem-py.h \ +_rpmb_la_SOURCES = rpmbmodule.c rpmsystem-py.h \ spec-py.c spec-py.h -_rpmsmodule_la_LDFLAGS = -module -avoid-version -shared -_rpmsmodule_la_LIBADD = \ +_rpms_la_LDFLAGS = -module -avoid-version -shared +_rpms_la_LIBADD = \ $(top_builddir)/sign/librpmsign.la \ $(top_builddir)/lib/librpm.la \ $(top_builddir)/rpmio/librpmio.la \ @PYTHON_LIBS@ -_rpmsmodule_la_SOURCES = rpmsmodule.c rpmsystem-py.h +_rpms_la_SOURCES = rpmsmodule.c rpmsystem-py.h