mirror of
https://git.yoctoproject.org/poky
synced 2026-09-13 00:49:33 +02:00
python3: fix file conflict when multilib enabled
Config file python3.5m-config conflicts between 32 and 64 bit packages. Use update-alternatives to add base_libdir as suffix to avoid it. [YOCTO #12511] (From OE-Core rev: bbb5e55abd0e628a5b0dae90d5eace0a2483f1fc) Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
960ab9ef8c
commit
69b588ea2a
@@ -4,7 +4,7 @@ DEPENDS = "python3-native libffi bzip2 gdbm openssl sqlite3 zlib virtual/libintl
|
|||||||
|
|
||||||
PR = "${INC_PR}.0"
|
PR = "${INC_PR}.0"
|
||||||
PYTHON_MAJMIN = "3.5"
|
PYTHON_MAJMIN = "3.5"
|
||||||
PYTHON_BINABI= "${PYTHON_MAJMIN}m"
|
PYTHON_BINABI = "${PYTHON_MAJMIN}m"
|
||||||
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
DISTRO_SRC_URI ?= "file://sitecustomize.py"
|
||||||
DISTRO_SRC_URI_linuxstdbase = ""
|
DISTRO_SRC_URI_linuxstdbase = ""
|
||||||
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||||
@@ -48,7 +48,13 @@ UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
|
|||||||
|
|
||||||
S = "${WORKDIR}/Python-${PV}"
|
S = "${WORKDIR}/Python-${PV}"
|
||||||
|
|
||||||
inherit autotools multilib_header python3native pkgconfig
|
inherit autotools multilib_header python3native pkgconfig update-alternatives
|
||||||
|
|
||||||
|
MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-dev = "python-config"
|
||||||
|
ALTERNATIVE_LINK_NAME[python-config] = "${bindir}/python${PYTHON_BINABI}-config"
|
||||||
|
ALTERNATIVE_TARGET[python-config] = "${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}"
|
||||||
|
|
||||||
CONFIGUREOPTS += " --with-system-ffi "
|
CONFIGUREOPTS += " --with-system-ffi "
|
||||||
|
|
||||||
@@ -207,6 +213,8 @@ py_package_preprocess () {
|
|||||||
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
|
${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
|
||||||
-c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
|
-c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
|
mv ${PKGD}/${bindir}/python3.5m-config ${PKGD}/${bindir}/python3.5m-config-${MULTILIB_SUFFIX}
|
||||||
}
|
}
|
||||||
|
|
||||||
# manual dependency additions
|
# manual dependency additions
|
||||||
|
|||||||
Reference in New Issue
Block a user