summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2023-06-01 14:30:32 +0900
committerbiao716.wang <biao716.wang@samsung.com>2023-08-04 11:14:29 +0900
commite1697335851f3ef2b7ef911a162063f59a9d6f66 (patch)
treef46470ddebefa2e6f3e5fb96a5e166e22dae13c7
parente806b67f7bf4458450f5d951262ec0aedf7a4a19 (diff)
downloadlibrpm-tizen-sandbox/wangbiao/py3-version.tar.gz
librpm-tizen-sandbox/wangbiao/py3-version.tar.bz2
librpm-tizen-sandbox/wangbiao/py3-version.zip
fix build error for opensuse with python3.xsandbox/wangbiao/py3-version
For opensuse154, the lib name is libpython3.6m , there is 'm' behind version. Change-Id: Ie51d20658d8799f3f1a0930a1a12527540999346 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r--configure.ac7
-rw-r--r--packaging/librpm-tizen.spec20
2 files changed, 12 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index a47b319f5..acdc5204c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,7 +127,7 @@ AC_MSG_CHECKING(old version of patch)
AC_PATH_PROG(__PERL, perl, /usr/bin/perl, $MYPATH)
AC_PATH_PROG(__PGP, pgp, /usr/bin/pgp, $MYPATH)
-AC_PATH_PROG(__PYTHON, python, /usr/bin/python, $MYPATH)
+AC_PATH_PROG(__PYTHON, python, /usr/bin/python3, $MYPATH)
AC_PATH_PROG(__RM, rm, /bin/rm, $MYPATH)
AC_PATH_PROG(__RSH, rsh, /usr/bin/rsh, $MYPATH)
AC_PATH_PROG(__SED, sed, /bin/sed, $MYPATH)
@@ -550,9 +550,10 @@ AS_IF([test "$enable_python" = yes],[
])
CPPFLAGS="$save_CPPFLAGS"
save_LIBS="$LIBS"
- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[
+
+ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python3.6m],[
WITH_PYTHON_LIB="$ac_res"
- ],[AC_MSG_ERROR([missing python library])
+ ],[AC_MSG_ERROR([missing python library, ${PYTHON_VERSION} vvv${PYTHON_ABI}vvv])
])
LIBS="$save_LIBS"
])
diff --git a/packaging/librpm-tizen.spec b/packaging/librpm-tizen.spec
index 74045f450..e58b52e64 100644
--- a/packaging/librpm-tizen.spec
+++ b/packaging/librpm-tizen.spec
@@ -37,11 +37,7 @@ BuildRequires: pkgconfig(popt)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(nss)
BuildRequires: pkg-config
-%if 0%{?centos_ver} || 0%{?centos_version}
-BuildRequires: python-devel
-%else
-BuildRequires: pkgconfig(python) >= 2.6
-%endif
+BuildRequires: pkgconfig(python3)
# Disable security
%if 0
BuildRequires: uthash-devel
@@ -128,9 +124,9 @@ make install DESTDIR="`pwd`/tmp_install"
# And only copy the files that we want
install -d %{buildroot}%{_libdir}/%{name}
-install -d %{buildroot}%{python_sitearch}
+install -d %{buildroot}%{python3_sitearch}
cp -ax tmp_install/%{_libdir}/%{name} %{buildroot}%{_libdir}/
-cp -ax tmp_install/%{python_sitearch}/%{python_mod_name} %{buildroot}%{python_sitearch}/
+cp -ax tmp_install/%{python3_sitearch}/%{python_mod_name} %{buildroot}%{python3_sitearch}/
# Install extra sources
install -m644 %{SOURCE4} %{buildroot}%{_libdir}/%{name}/rpm/tizen_macros
@@ -145,16 +141,16 @@ rm -rf "%{buildroot}%{_libdir}/%{name}/rpm-plugins"
# Compile python modules (Fedora does this automatically) and find duplicates
%if 0%{?suse_version}
-%py_compile %{buildroot}/%{python_sitearch}/%{python_mod_name}/
-%py_compile -O %{buildroot}/%{python_sitearch}/%{python_mod_name}/
+%py3_compile %{buildroot}/%{python3_sitearch}/%{python_mod_name}/
+%py3_compile -O %{buildroot}/%{python3_sitearch}/%{python_mod_name}/
-%fdupes %{buildroot}/%{python_sitearch}/
+%fdupes %{buildroot}/%{python3_sitearch}/
%endif
%files
%defattr(-,root,root,-)
%dir %{_libdir}/%{name}
-%dir %{python_sitearch}/%{python_mod_name}/
+%dir %{python3_sitearch}/%{python_mod_name}/
%{_libdir}/%{name}/*.so.*
%{_libdir}/%{name}/rpm
-%{python_sitearch}/%{python_mod_name}/*
+%{python3_sitearch}/%{python_mod_name}/*