summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
committerRichard Purdie <richard@openedhand.com>2006-03-20 17:45:11 +0000
commitb26a945734ce271aa7d443ff9e96fe2851b21138 (patch)
treef540b8d58a7411cf0cabe5c8f4ad40f9f597352a /bitbake/lib/bb/build.py
parent3cd47ad235d54a9c539ae6fe4a5a2b4b5f7e5621 (diff)
downloadopenembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.gz
openembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.bz2
openembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.zip
Update to latest bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 599b45d9d3..b59473bc23 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -25,7 +25,7 @@ You should have received a copy of the GNU General Public License along with
Based on functions from the base bb module, Copyright 2003 Holger Schurig
"""
-from bb import debug, data, fetch, fatal, error, note, event, mkdirhier
+from bb import debug, data, fetch, fatal, error, note, event, mkdirhier, utils
import bb, os
# data holds flags and function name for a given task
@@ -122,14 +122,15 @@ def exec_func_python(func, d):
"""Execute a python BB 'function'"""
import re, os
- tmp = "def " + func + "():\n%s" % data.getVar(func, d)
- comp = compile(tmp + '\n' + func + '()', bb.data.getVar('FILE', d, 1) + ':' + func, "exec")
+ tmp = "def " + func + "():\n%s" % data.getVar(func, d)
+ tmp += '\n' + func + '()'
+ comp = utils.better_compile(tmp, func, bb.data.getVar('FILE', d, 1) )
prevdir = os.getcwd()
g = {} # globals
g['bb'] = bb
g['os'] = os
g['d'] = d
- exec comp in g
+ utils.better_exec(comp,g,tmp, bb.data.getVar('FILE',d,1))
if os.path.exists(prevdir):
os.chdir(prevdir)