Skip to content

Commit a00d325

Browse files
marc-hbqipengzha
authored andcommitted
west.cmake: make MIN_WEST_VERSION catch up with requirements-base.txt
Also add a comment in each file reminding to keep them the same. Fixes 251f269 ("west: v0.14.0 is required now (and soon, v1.1") Confusing error message before this commit: ``` -- Found west (found suitable version 0.13.1, minimum required is 0.7.1) CMake Error at SOF/zephyr/cmake/modules/zephyr_module.cmake:77 (message): Traceback (most recent call last): File "SOF/zephyr/scripts/zephyr_module.py", line 733, in <module> main() File "SOF/zephyr/scripts/zephyr_module.py", line 678, in main west_projs = west_projects() ^^^^^^^^^^^^^^^ File "SOF/zephyr/scripts/zephyr_module.py", line 536, in west_projects from west.configuration import MalformedConfig ImportError: cannot import name 'MalformedConfig' from 'west.configuration' (west/src/west/configuration.py) ``` Clearer error message after this commit: ``` CMake Error at SOF/zephyr/cmake/modules/west.cmake:68 (message): The detected west version, 0.13.1, is unsupported. The minimum supported version is 0.14.0. Please upgrade with: /usr/bin/python3.11 -m pip install --upgrade west ``` Signed-off-by: Marc Herbert <[email protected]>
1 parent cc2ad30 commit a00d325

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmake/modules/west.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ else()
6262
# We can import west from PYTHON_EXECUTABLE and have its version.
6363

6464
# Make sure its version matches the minimum required one.
65-
set_ifndef(MIN_WEST_VERSION 0.7.1)
65+
# Keep this version identical to the one in scripts/requirements-base.txt
66+
set_ifndef(MIN_WEST_VERSION 0.14.0)
6667
if(${west_version} VERSION_LESS ${MIN_WEST_VERSION})
6768
message(FATAL_ERROR "The detected west version, ${west_version}, is unsupported.\n\
6869
The minimum supported version is ${MIN_WEST_VERSION}.\n\

scripts/requirements-base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ anytree
2929
intelhex
3030

3131
# it's west
32+
# Keep the version identical to the minimum required in cmake/modules/west.cmake
3233
west>=0.14.0
3334

3435
# used for windows based 'menuconfig'

0 commit comments

Comments
 (0)