diff options
| author | Christopher Larson <chris_larson@mentor.com> | 2016-04-30 12:43:52 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-06 10:18:12 +0100 |
| commit | 2d2d3121880d65e52cdffe6b6f869aa3f2dd6410 (patch) | |
| tree | 4b30c0d3606ff50d9495c41f27ccc47ef363c423 | |
| parent | 4f4f1c1fdbae84c6df0b5748258117c7a3438160 (diff) | |
| download | poky-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>
| -rw-r--r-- | bitbake/lib/bb/build.py | 9 |
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 | 64 | if hasattr(__builtins__, '__setitem__'): |
| 65 | __builtins__['os'] = os | 65 | builtins = __builtins__ |
| 66 | else: | ||
| 67 | builtins = __builtins__.__dict__ | ||
| 68 | |||
| 69 | builtins['bb'] = bb | ||
| 70 | builtins['os'] = os | ||
| 66 | 71 | ||
| 67 | class FuncFailed(Exception): | 72 | class FuncFailed(Exception): |
| 68 | def __init__(self, name = None, logfile = None): | 73 | def __init__(self, name = None, logfile = None): |
