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:21 +0100 |
commit | a48178f6d00e7f97a09f42d5a164204e9dcffa9f (patch) | |
tree | 66685277881e1ef493c8dcffb9b138ce20d33fac /scripts | |
parent | b0aedd74f13b174861ff742eb503d8d343f9e714 (diff) | |
download | openembedded-core-contrib-a48178f6d00e7f97a09f42d5a164204e9dcffa9f.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.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 return 1 fi +# Add BitBake's library to PYTHONPATH +PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH +export PYTHONPATH + # Make sure our paths are at the beginning of $PATH for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do # Remove any existences of $newpath from $PATH |