diff options
author | Ross Burton <ross@burtonini.com> | 2021-05-04 13:57:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-06 08:41:26 +0100 |
commit | e3887b0690e84e0591283a365a37f44d474013e0 (patch) | |
tree | e230a53803099d8535d4c38984cf01b536e77ae3 /scripts/oe-buildenv-internal | |
parent | ce39d05d511c62eb439d9385d107a4058a8d1f60 (diff) | |
download | poky-e3887b0690e84e0591283a365a37f44d474013e0.tar.gz |
oe-buildenv-internal: add BitBake's library to PYTHONPATH
There are many Python scripts in oe-core that want to use Tinfoil, and
right now they have to know where they are to work out where BitBake is
likely to be.
This is suboptimal as BitBake could be somewhere else, so this
approach doesn't scale to other layers at all.
Solve this by adding BITBAKEDIR/lib to PYTHONPATH in oe-buildenv-internal,
so that Python has BitBake on its search path once the build system is
configured.
(From OE-Core rev: a48178f6d00e7f97a09f42d5a164204e9dcffa9f)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index ba0a9b44d6..e0d920f2fc 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal | |||
@@ -88,6 +88,10 @@ if [ ! -d "$BITBAKEDIR" ]; then | |||
88 | return 1 | 88 | return 1 |
89 | fi | 89 | fi |
90 | 90 | ||
91 | # Add BitBake's library to PYTHONPATH | ||
92 | PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH | ||
93 | export PYTHONPATH | ||
94 | |||
91 | # Make sure our paths are at the beginning of $PATH | 95 | # Make sure our paths are at the beginning of $PATH |
92 | for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do | 96 | for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do |
93 | # Remove any existences of $newpath from $PATH | 97 | # Remove any existences of $newpath from $PATH |