scripts: adjust WEST_PYTHON to posix path
Adjust WEST_PYTHON to posix path to be consistent with other Python
scripts which passes paths to the Zephyr CMake build system.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
diff --git a/scripts/west_commands/build.py b/scripts/west_commands/build.py
index 6797ff1..18b656a 100644
--- a/scripts/west_commands/build.py
+++ b/scripts/west_commands/build.py
@@ -497,7 +497,7 @@
# to Just Work:
#
# west build -- -DOVERLAY_CONFIG=relative-path.conf
- final_cmake_args = ['-DWEST_PYTHON={}'.format(sys.executable),
+ final_cmake_args = ['-DWEST_PYTHON={}'.format(pathlib.Path(sys.executable).as_posix()),
'-B{}'.format(self.build_dir),
'-G{}'.format(config_get('generator',
DEFAULT_CMAKE_GENERATOR))]