[oe-commits] [openembedded-core] 06/16: scripts/wic: use scriptpath module to find bitbake path and oe lib path

git at git.openembedded.org git at git.openembedded.org
Thu Jan 11 17:24:38 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 19d41c5f31651742f0177018ada2f78666442224
Author: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
AuthorDate: Thu Jan 11 22:55:19 2018 +0800

    scripts/wic: use scriptpath module to find bitbake path and oe lib path
    
    Use the scriptpath module in order to standardize the adding of
    bitbake and meta/lib path to sys.path.
    
    Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/wic | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/wic b/scripts/wic
index 097084a..0d98875 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -43,13 +43,12 @@ from distutils import spawn
 scripts_path = os.path.abspath(os.path.dirname(__file__))
 lib_path = scripts_path + '/lib'
 sys.path.insert(0, lib_path)
-oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib')
-sys.path.insert(0, oe_lib_path)
+import scriptpath
+scriptpath.add_oe_lib_path()
 
 bitbake_exe = spawn.find_executable('bitbake')
 if bitbake_exe:
-    bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
-    sys.path.insert(0, bitbake_path)
+    bitbake_path = scriptpath.add_bitbake_lib_path()
     from bb import cookerdata
     from bb.main import bitbake_main, BitBakeConfigParameters
 else:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list