diff options
Diffstat (limited to 'poky/meta/classes/distutils3.bbclass')
-rw-r--r-- | poky/meta/classes/distutils3.bbclass | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/poky/meta/classes/distutils3.bbclass b/poky/meta/classes/distutils3.bbclass index 834e32247..05a24bfe2 100644 --- a/poky/meta/classes/distutils3.bbclass +++ b/poky/meta/classes/distutils3.bbclass @@ -10,6 +10,9 @@ DISTUTILS_INSTALL_ARGS ?= "--root=${D} \ --install-lib=${PYTHON_SITEPACKAGES_DIR} \ --install-data=${datadir}" +DISTUTILS_PYTHON = "python3" +DISTUTILS_PYTHON_class-native = "nativepython3" + distutils3_do_configure() { if [ "${CLEANBROKEN}" != "1" ] ; then NO_FETCH_BUILD=1 \ @@ -53,24 +56,18 @@ distutils3_do_install() { bbfatal_log "'${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS}' execution failed." # support filenames with *spaces* - find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; - - if test -e ${D}${bindir} ; then - for i in ${D}${bindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i - sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i - done - fi + find ${D} -name "*.py" -exec grep -q ${D} {} \; \ + -exec sed -i -e s:${D}::g {} \; - if test -e ${D}${sbindir}; then - for i in ${D}${sbindir}/* ; do \ - sed -i -e s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${USRBINPATH}/env\ ${PYTHON_PN}:g $i + for i in ${D}${bindir}/* ${D}${sbindir}/*; do + if [ -f "$i" ]; then + sed -i -e s:${PYTHON}:${USRBINPATH}/env\ ${DISTUTILS_PYTHON}:g $i sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i - done - fi + fi + done rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/easy-install.pth - + # # FIXME: Bandaid against wrong datadir computation # |