summaryrefslogtreecommitdiffstats
path: root/scripts/oe-buildenv-internal
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-05-04 13:57:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-06 08:41:26 +0100
commite3887b0690e84e0591283a365a37f44d474013e0 (patch)
treee230a53803099d8535d4c38984cf01b536e77ae3 /scripts/oe-buildenv-internal
parentce39d05d511c62eb439d9385d107a4058a8d1f60 (diff)
downloadpoky-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-xscripts/oe-buildenv-internal4
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
89fi 89fi
90 90
91# Add BitBake's library to PYTHONPATH
92PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH
93export PYTHONPATH
94
91# Make sure our paths are at the beginning of $PATH 95# Make sure our paths are at the beginning of $PATH
92for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do 96for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
93 # Remove any existences of $newpath from $PATH 97 # Remove any existences of $newpath from $PATH