summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-11-19 20:29:02 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-11-19 20:29:02 +0000
commit0249d06d8d34f207012ec1b6d73c4266589b1f5e (patch)
tree993a7fffbdd41c3c66721027e72b7cfcb30a2647
parentaba1b2a5cf8f49e07d717b1e8fd8279dbc20b074 (diff)
parent1977650fdda4676e78bf23e36317ad885b230bd6 (diff)
merge of '628180938514d90c01db3867703717734d7d5d30'
and '6392b041c5ea8ff7227964369df13245ce5d50bf'
-rw-r--r--classes/distutils.bbclass12
-rw-r--r--classes/setuptools.bbclass8
2 files changed, 17 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 \
diff --git a/classes/setuptools.bbclass b/classes/setuptools.bbclass
new file mode 100644
index 0000000000..17c039bf33
--- /dev/null
+++ b/classes/setuptools.bbclass
@@ -0,0 +1,8 @@
+inherit distutils
+
+DEPENDS += "python-setuptools"
+
+DISTUTILS_INSTALL_ARGS = "--root=${D} \
+ --single-version-externally-managed \
+ --prefix=${prefix} \
+ --install-data=${datadir}"