summaryrefslogtreecommitdiff
path: root/classes/distutils.bbclass
diff options
context:
space:
mode:
authorJeremy Laine <jeremy.laine@m4x.org>2007-11-19 19:53:34 +0000
committerJeremy Laine <jeremy.laine@m4x.org>2007-11-19 19:53:34 +0000
commitf5072aef95994e687028aa6edc63cc5b0b216b08 (patch)
tree01bdc80520bdc1528b42c48ef7c0980b42b03e0a /classes/distutils.bbclass
parent85cadd8dd8537540f27429c10852e29d4cdae6cf (diff)
distutils.bbclass : make the arguments passed to setup.py variables to allow customisation
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 \