bootstrap: add discovered west early in sys.path

This prevents random wests in developer PYTHONPATHs from coming
first. It's being done for convenience during development and testing.

Signed-off-by: Marti Bolivar <marti@foundries.io>
This commit is contained in:
Marti Bolivar 2019-01-08 12:00:59 -07:00
parent 94708ea073
commit f9c8e81073
1 changed files with 4 additions and 1 deletions

View File

@ -410,7 +410,10 @@ def wrap(argv):
# control-C signal handling. GDB uses Ctrl-C to halt the debug
# target. So we really do need to import west and delegate within
# this bootstrap process.
sys.path.append(os.path.join(west_git_repo, 'src'))
#
# Put this at position 1 to make sure it comes before random stuff
# that might be on a developer's PYTHONPATH in the import order.
sys.path.insert(1, os.path.join(west_git_repo, 'src'))
import west.main
west.main.main(argv)