summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-04-30 12:43:52 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-06 10:18:12 +0100
commit2d2d3121880d65e52cdffe6b6f869aa3f2dd6410 (patch)
tree4b30c0d3606ff50d9495c41f27ccc47ef363c423 /bitbake/lib/bb
parent4f4f1c1fdbae84c6df0b5748258117c7a3438160 (diff)
downloadpoky-2d2d3121880d65e52cdffe6b6f869aa3f2dd6410.tar.gz
bitbake: bb.build: handle __builtins__ as a module
Fixes pypy support. (Bitbake rev: e90cfc655affeec8f5519f7078dad5f99db3c461) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/build.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index db5072cb4d..a5b99edb7b 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -61,8 +61,13 @@ def reset_cache():
61# in all namespaces, hence we add them to __builtins__. 61# in all namespaces, hence we add them to __builtins__.
62# If we do not do this and use the exec globals, they will 62# If we do not do this and use the exec globals, they will
63# not be available to subfunctions. 63# not be available to subfunctions.
64__builtins__['bb'] = bb 64if hasattr(__builtins__, '__setitem__'):
65__builtins__['os'] = os 65 builtins = __builtins__
66else:
67 builtins = __builtins__.__dict__
68
69builtins['bb'] = bb
70builtins['os'] = os
66 71
67class FuncFailed(Exception): 72class FuncFailed(Exception):
68 def __init__(self, name = None, logfile = None): 73 def __init__(self, name = None, logfile = None):