Skip to content

Commit e5759f4

Browse files
pdgendtfabiobaltieri
authored andcommitted
scripts: zephyr_module.py: Take EXTRA_ZEPHYR_MODULES variable into account
When running purely with Python, the extra modules set with environment variables are not taken into account. If left empty, check the environment variables. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 8b438d2 commit e5759f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/zephyr_module.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import sys
2626
import yaml
2727
import pykwalify.core
28-
from pathlib import Path, PurePath
28+
from pathlib import Path, PurePath, PurePosixPath
2929
from collections import namedtuple
3030

3131
try:
@@ -758,6 +758,9 @@ def parse_modules(zephyr_base, manifest=None, west_projs=None, modules=None,
758758

759759
if extra_modules is None:
760760
extra_modules = []
761+
for var in ['EXTRA_ZEPHYR_MODULES', 'ZEPHYR_EXTRA_MODULES']:
762+
if var in os.environ:
763+
extra_modules.extend(PurePosixPath(p) for p in os.environ[var].split(';'))
761764

762765
Module = namedtuple('Module', ['project', 'meta', 'depends'])
763766

0 commit comments

Comments
 (0)