1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

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>
This commit is contained in:
Christopher Larson
2016-04-30 12:43:52 -07:00
committed by Richard Purdie
parent 4f4f1c1fdb
commit 2d2d312188
+7 -2
View File
@@ -61,8 +61,13 @@ def reset_cache():
# in all namespaces, hence we add them to __builtins__.
# If we do not do this and use the exec globals, they will
# not be available to subfunctions.
__builtins__['bb'] = bb
__builtins__['os'] = os
if hasattr(__builtins__, '__setitem__'):
builtins = __builtins__
else:
builtins = __builtins__.__dict__
builtins['bb'] = bb
builtins['os'] = os
class FuncFailed(Exception):
def __init__(self, name = None, logfile = None):