summaryrefslogtreecommitdiff
path: root/classes/distutils.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/distutils.bbclass')
-rw-r--r--classes/distutils.bbclass12
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass
index 7a18e71c04..8af10a0c8a 100644
--- a/classes/distutils.bbclass
+++ b/classes/distutils.bbclass
@@ -1,5 +1,11 @@
inherit distutils-base
+DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
+DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${layout_prefix} \
+ --install-data=${STAGING_DATADIR}"
+DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
+ --install-data=${D}/${datadir}"
+
distutils_do_compile() {
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
${STAGING_BINDIR_NATIVE}/python setup.py build || \
@@ -8,7 +14,7 @@ distutils_do_compile() {
distutils_stage_headers() {
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python setup.py install_headers --install-dir=${STAGING_INCDIR}/${PYTHON_DIR} || \
+ ${STAGING_BINDIR_NATIVE}/python setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
oefatal "python setup.py install_headers execution failed."
}
@@ -16,7 +22,7 @@ distutils_stage_all() {
install -d ${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages
PYTHONPATH=${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_DIR_HOST}${layout_prefix} --install-data=${STAGING_DATADIR} || \
+ ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
oefatal "python setup.py install (stage) execution failed."
}
@@ -24,7 +30,7 @@ distutils_do_install() {
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages
PYTHONPATH=${D}/${libdir}/${PYTHON_DIR}/site-packages \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \
+ ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
oefatal "python setup.py install execution failed."
for i in `find ${D} -name "*.py"` ; do \