mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +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:
committed by
Richard Purdie
parent
4f4f1c1fdb
commit
2d2d312188
@@ -61,8 +61,13 @@ def reset_cache():
|
|||||||
# in all namespaces, hence we add them to __builtins__.
|
# in all namespaces, hence we add them to __builtins__.
|
||||||
# If we do not do this and use the exec globals, they will
|
# If we do not do this and use the exec globals, they will
|
||||||
# not be available to subfunctions.
|
# not be available to subfunctions.
|
||||||
__builtins__['bb'] = bb
|
if hasattr(__builtins__, '__setitem__'):
|
||||||
__builtins__['os'] = os
|
builtins = __builtins__
|
||||||
|
else:
|
||||||
|
builtins = __builtins__.__dict__
|
||||||
|
|
||||||
|
builtins['bb'] = bb
|
||||||
|
builtins['os'] = os
|
||||||
|
|
||||||
class FuncFailed(Exception):
|
class FuncFailed(Exception):
|
||||||
def __init__(self, name = None, logfile = None):
|
def __init__(self, name = None, logfile = None):
|
||||||
|
|||||||
Reference in New Issue
Block a user