Skip to content

Commit

Permalink
python: use west python tool
Browse files Browse the repository at this point in the history
This forces python calls to use the version
exported by west tool.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
  • Loading branch information
sylvioalves committed Sep 22, 2021
1 parent 5b87057 commit 6cb3748
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions west/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def install(self, module_path):
toolchain_path = os.path.join(os.environ['USERPROFILE'], '.espressif', 'tools', 'zephyr')
cmd = "set"
else:
cmd_exec(("./tools/idf_tools.py", "--tools-json=tools/zephyr_tools.json", "install"),
cmd_exec((sys.executable, "./tools/idf_tools.py", "--tools-json=tools/zephyr_tools.json", "install"),
cwd=module_path)
toolchain_path = os.path.join(os.environ['HOME'], '.espressif', 'tools', 'zephyr')
cmd = "export"
Expand Down Expand Up @@ -228,5 +228,5 @@ def monitor(self, module_path, args):
cmd_exec(("python.exe", "tools/idf_monitor.py", "-p", esp_port,
"-b", args.baud, elf_path), cwd=module_path)
else:
cmd_exec(("./tools/idf_monitor.py", "-p", esp_port, "-b", args.baud, elf_path),
cmd_exec((sys.executable, "./tools/idf_monitor.py", "-p", esp_port, "-b", args.baud, elf_path),
cwd=module_path)

0 comments on commit 6cb3748

Please sign in to comment.