Python's machinery replaces directories in sysroot path to match OE's staging area sysroots. Earlier we use to have HOST_SYS represent sysroot always but now we use MACHINE to represent target sysroots but HOST_SYS to represent host sysroot. This patch caters to that difference
Signed-off-by: Khem Raj <raj.k...@gmail.com> --- meta/classes/distutils3.bbclass | 41 +++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass index 9c841e4..bbd645c 100644 --- a/meta/classes/distutils3.bbclass +++ b/meta/classes/distutils3.bbclass @@ -9,40 +9,57 @@ DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" distutils3_do_compile() { - STAGING_INCDIR=${STAGING_INCDIR} \ - STAGING_LIBDIR=${STAGING_LIBDIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ - ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ - build_ext --include-dirs ${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ - --library-dirs ${STAGING_LIBDIR}/${PYTHON_DIR} \ - ${DISTUTILS_BUILD_EXT_ARGS} \ - build ${DISTUTILS_BUILD_ARGS} || \ - bbfatal "${PYTHON_PN} setup.py build_ext execution failed." + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi + STAGING_INCDIR=${STAGING_INCDIR} \ + STAGING_LIBDIR=${STAGING_LIBDIR} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \ + build ${DISTUTILS_BUILD_ARGS} || \ + bbfatal "${PYTHON_PN} setup.py build_ext execution failed." } distutils3_stage_headers() { install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install_headers execution failed." } distutils3_stage_all() { + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed." } distutils3_do_install() { install -d ${D}${PYTHON_SITEPACKAGES_DIR} + if [ ${BUILD_SYS} != ${HOST_SYS} ]; then + SYS=${MACHINE} + else + SYS=${HOST_SYS} + fi STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \ - BUILD_SYS=${BUILD_SYS} HOST_SYS=${MACHINE} \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \ bbfatal "${PYTHON_PN} setup.py install execution failed." -- 1.7.10.4 _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core