Issue: LIN9-4616 Finding the path of argparse_oe.py in env PATH. Usually, it can be found in project/scripts/lib, or oe-core/scripts/lib. Find the first one and insert it into libpath.
(LOCAL REV: NOT UPSTREAM) -- pending Signed-off-by: Robert Yang <liezhi.y...@windriver.com> Signed-off-by: Yue Tao <yue....@windriver.com> --- scripts/yocto-bsp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/yocto-bsp b/scripts/yocto-bsp index 6fb1f41..fdd3ed2 100755 --- a/scripts/yocto-bsp +++ b/scripts/yocto-bsp @@ -35,6 +35,13 @@ import sys import argparse import logging +path_from_env = os.getenv('PATH').split(':') +for script_path in path_from_env: + if script_path.endswith('scripts'): + if os.path.exists(os.path.join(script_path, 'lib/argparse_oe.py')): + sys.path.insert(0, script_path + '/lib') + break + scripts_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, scripts_path + '/lib') import argparse_oe -- 1.7.9.5 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel