wic: insert local Python paths at front
This follows how bitbake performs path insertion, and fixes a failure to start wic on Ubuntu 15.10 with the distribution's version of python-ply installed. (From OE-Core rev: 59b1eefb801dfb1d4afe9640e3c8a070d4e1867f) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9d788d7330
commit
80e39195c7
|
@ -41,12 +41,12 @@ from distutils import spawn
|
||||||
# External modules
|
# External modules
|
||||||
scripts_path = os.path.abspath(os.path.dirname(__file__))
|
scripts_path = os.path.abspath(os.path.dirname(__file__))
|
||||||
lib_path = scripts_path + '/lib'
|
lib_path = scripts_path + '/lib'
|
||||||
sys.path.append(lib_path)
|
sys.path.insert(0, lib_path)
|
||||||
|
|
||||||
bitbake_exe = spawn.find_executable('bitbake')
|
bitbake_exe = spawn.find_executable('bitbake')
|
||||||
if bitbake_exe:
|
if bitbake_exe:
|
||||||
bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
|
bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
|
||||||
sys.path.append(bitbake_path)
|
sys.path.insert(0, bitbake_path)
|
||||||
from bb import cookerdata
|
from bb import cookerdata
|
||||||
from bb.main import bitbake_main, BitBakeConfigParameters
|
from bb.main import bitbake_main, BitBakeConfigParameters
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue