Skip to content

Commit d0b3903

Browse files
committed
scripts: modules: support west group feature
West has introduced support for group tags in: zephyrproject-rtos/west#454 This means that manifest files might start containing groups. Zephyr itself only requires west>=0.7.2 where groups are not supported but other Zephyr based projects might start using the group feature. When using a west version with group support, then only active projects will be processed as Zephyr modules. West versions without group support will consider all projects active. Signed-off-by: Torsten Rasmussen <[email protected]>
1 parent 51c34bb commit d0b3903

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/zephyr_module.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,15 @@ def main():
277277
# if user is providing a specific modules list.
278278
from west.manifest import Manifest
279279
from west.util import WestNotFound
280+
from west.version import __version__ as WestVersion
281+
from packaging import version
280282
try:
281283
manifest = Manifest.from_file()
282-
projects = [p.posixpath for p in manifest.get_projects([])]
284+
if version.parse(WestVersion) >= version.parse('0.9.0'):
285+
projects = [p.posixpath for p in manifest.get_projects([])
286+
if manifest.is_active(p)]
287+
else:
288+
projects = [p.posixpath for p in manifest.get_projects([])]
283289
except WestNotFound:
284290
# Only accept WestNotFound, meaning we are not in a west
285291
# workspace. Such setup is allowed, as west may be installed

0 commit comments

Comments
 (0)