[oe] [PATCH] base.bbclass, distutils.bbclass, native.bbclass: Allow BBEXTENDS native for python distutils based recipes

Michael Lippautz michael.lippautz at gmail.com
Fri Feb 26 09:42:47 UTC 2010


* Enable BBCLASSEXTEND for python recipe that use distutils class
* Uses new staging system
---
 classes/base.bbclass      |    2 ++
 classes/distutils.bbclass |    2 ++
 classes/native.bbclass    |    3 +++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 990e75e..9d38150 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -1107,6 +1107,8 @@ def is_legacy_staging(d):
         legacy = False
     elif bb.data.getVar('NATIVE_INSTALL_WORKS', d, 1) == "1":
         legacy = False
+    elif stagefunc.strip() == "do_stage_native" and bb.data.getVar('DISTUTILS_NATIVE_STAGE_INSTALL', d, 1) == "1":
+        legacy = False
     if bb.data.getVar('PSTAGE_BROKEN_DESTDIR', d, 1) == "1":
         legacy = True
     if bb.data.getVar('FORCE_LEGACY_STAGING', d, 1) == "1":
diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass
index 4d1fc8c..b06965f 100644
--- a/classes/distutils.bbclass
+++ b/classes/distutils.bbclass
@@ -1,5 +1,7 @@
 inherit distutils-base
 
+DISTUTILS_NATIVE_STAGE_INSTALL = "1"
+
 DISTUTILS_BUILD_ARGS ?= ""
 DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
 DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 6698b61..044f92d 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -70,6 +70,9 @@ do_stage_native () {
 	if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" == "1" ]
 	then
 		autotools_stage_all
+    elif [ "${DISTUTILS_NATIVE_STAGE_INSTALL}" == "1" ]
+    then
+        distutils_stage_all
 	else
 		oe_runmake install
 	fi
-- 
1.6.4.4





More information about the Openembedded-devel mailing list