[oe-commits] [bitbake] 01/03: bb.build: handle __builtins__ as a module
git at git.openembedded.org
git at git.openembedded.org
Fri May 6 09:18:46 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit e90cfc655affeec8f5519f7078dad5f99db3c461
Author: Christopher Larson <chris_larson at mentor.com>
AuthorDate: Sat Apr 30 12:43:52 2016 -0700
bb.build: handle __builtins__ as a module
Fixes pypy support.
Signed-off-by: Christopher Larson <chris_larson at mentor.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/build.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/bb/build.py b/lib/bb/build.py
index db5072c..a5b99ed 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -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):
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list