summaryrefslogtreecommitdiff
path: root/meta/classes/distutils.bbclass
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-03-09 22:03:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-02 22:34:31 +0000
commitae931c2cf9e48e1fb74b4b727dbf668ea880023f (patch)
treea53870f11283357d744cd06c401e4939dcef7463 /meta/classes/distutils.bbclass
parentf5bc3cfac9545c402b415695c4e0f98ad38fb2b0 (diff)
downloadopenembedded-core-ae931c2cf9e48e1fb74b4b727dbf668ea880023f.tar.gz
openembedded-core-ae931c2cf9e48e1fb74b4b727dbf668ea880023f.tar.bz2
openembedded-core-ae931c2cf9e48e1fb74b4b727dbf668ea880023f.zip
classes/distutils: Introduce PYTHON_PN
This is needed to accomodate python3 alongside python2 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/classes/distutils.bbclass')
-rw-r--r--meta/classes/distutils.bbclass23
1 files changed, 12 insertions, 11 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 80f6df8ed8..f3da023942 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -11,15 +11,15 @@ distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
- bbfatal "python setup.py build_ext execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
}
distutils_stage_headers() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
- bbfatal "python setup.py install_headers execution failed."
+ ${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."
}
distutils_stage_all() {
@@ -28,21 +28,22 @@ distutils_stage_all() {
install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
- bbfatal "python setup.py install (stage) execution failed."
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
+ bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
}
distutils_do_install() {
install -d ${D}${PYTHON_SITEPACKAGES_DIR}
STAGING_INCDIR=${STAGING_INCDIR} \
STAGING_LIBDIR=${STAGING_LIBDIR} \
- PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
+ PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
- bbfatal "python setup.py install execution failed."
+ ${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."
- for i in `find ${D} -name "*.py"` ; do \
- sed -i -e s:${D}::g $i
+ # support filenames with *spaces*
+ find ${D} -name "*.py" -print0 | while read -d $'\0' i ; do \
+ sed -i -e s:${D}::g "$i"
done
if test -e ${D}${bindir} ; then