scripts: west-commands: Updates needed when removing ZEPHYR_BASE env
This commit includes the following fixes in order to remove environment
setting of ZEPHYR_BASE is west extension commands.
- Build command
west build --pristine will now use the ZEPHYR_BASE variable found
in CMakeCache.txt in the build folder.
This ensures that the pristine command is executed from the same
Zephyr that was used for compilation.
- Board command
The west boards command no longer sets Zephyr base before invoking
cmake -P cmake/boards.cmake
Instead boards.cmake uses find_package(Zephyr) to ensure consistent
behavior with Zephyr samples, so that the detection of Zephyr base is
uniform across CMake commands.
It also changes BOARD_ROOT_SPACE_SEPARATED to BOARD_ROOT in order to
be consistent with existing user documentation.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
diff --git a/scripts/west_commands/sign.py b/scripts/west_commands/sign.py
index 0aad0b2..26a5971 100644
--- a/scripts/west_commands/sign.py
+++ b/scripts/west_commands/sign.py
@@ -18,9 +18,9 @@
from runners.core import BuildConfiguration
from zcmake import CMakeCache
from zephyr_ext_common import Forceable, cached_runner_config, \
- zephyr_scripts_path
+ ZEPHYR_SCRIPTS
-sys.path.append(os.path.join(zephyr_scripts_path(), 'dts'))
+sys.path.append(str(ZEPHYR_SCRIPTS / 'dts'))
import edtlib