summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-08-23 17:00:04 -0400
committerChris Larson <chris_larson@mentor.com>2010-08-23 17:00:04 -0400
commit0a11eb71464b263412243dd3dd3e0cb2bbf6332f (patch)
tree25b47397c425ce23fde68dbd5724fc8016982ef5 /classes
parent5678affd4e1b6453d6802b8cfb7823fec6f47269 (diff)
downloadopenembedded-0a11eb71464b263412243dd3dd3e0cb2bbf6332f.tar.gz
Revert "base: use a variable for the modules to import/inject"
This reverts commit 5678affd4e1b6453d6802b8cfb7823fec6f47269.
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass21
1 files changed, 13 insertions, 8 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index ef9921d04c..89f983f548 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -9,26 +9,31 @@ inherit utils
inherit utility-tasks
inherit metadata_scm
-OE_IMPORTS += "oe.path oe.utils sys os time"
-
-python oe_import () {
+python sys_path_eh () {
if isinstance(e, bb.event.ConfigParsed):
+ import sys
+ import os
+ import time
+
bbpath = e.data.getVar("BBPATH", True).split(":")
sys.path[0:0] = [os.path.join(dir, "lib") for dir in bbpath]
def inject(name, value):
- """Make a python object accessible from the metadata"""
+ """Make a python object accessible from everywhere for the metadata"""
if hasattr(bb.utils, "_context"):
bb.utils._context[name] = value
else:
__builtins__[name] = value
- for toimport in e.data.getVar("OE_IMPORTS", True).split():
- imported = __import__(toimport)
- inject(toimport, imported)
+ import oe.path
+ import oe.utils
+ inject("bb", bb)
+ inject("sys", sys)
+ inject("time", time)
+ inject("oe", oe)
}
-addhandler oe_import
+addhandler sys_path_eh
die() {
oefatal "$*"