scripts: Undo Board.{dir -> directories[0]} renames
`Board.dir` can be used in place of `Board.directories[0]` for brevity. Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
This commit is contained in:
parent
a1f3f882fd
commit
276c1fc4a0
|
@ -127,8 +127,7 @@ def kconfig_load(app: Sphinx) -> Tuple[kconfiglib.Kconfig, Dict[str, str]]:
|
|||
board_str = 'BOARD_' + re.sub(r"[^a-zA-Z0-9_]", "_", qualifier).upper()
|
||||
f.write('config ' + board_str + '\n')
|
||||
f.write('\t bool\n')
|
||||
f.write('source "' +
|
||||
(board.directories[0] / ('Kconfig.' + board.name)).as_posix() + '"\n\n')
|
||||
f.write('source "' + (board.dir / ('Kconfig.' + board.name)).as_posix() + '"\n\n')
|
||||
|
||||
# base environment
|
||||
os.environ["ZEPHYR_BASE"] = str(ZEPHYR_BASE)
|
||||
|
|
|
@ -244,7 +244,7 @@ class Filters:
|
|||
for changed in changed_boards:
|
||||
for board in known_boards:
|
||||
c = (zephyr_base / changed).resolve()
|
||||
if c.is_relative_to(board.directories[0].resolve()):
|
||||
if c.is_relative_to(board.dir.resolve()):
|
||||
for file in glob.glob(os.path.join(board.dir, f"{board.name}*.yaml")):
|
||||
with open(file, 'r', encoding='utf-8') as f:
|
||||
b = yaml.load(f.read(), Loader=SafeLoader)
|
||||
|
|
|
@ -447,7 +447,7 @@ def dump_boards(args):
|
|||
if args.cmakeformat is not None:
|
||||
info = args.cmakeformat.format(
|
||||
NAME='NAME;' + board.name,
|
||||
DIR='DIR;' + str(board.directories.as_posix()),
|
||||
DIR='DIR;' + str(board.dir.as_posix()),
|
||||
HWM='HWM;' + board.hwm,
|
||||
VENDOR='VENDOR;NOTFOUND',
|
||||
REVISION_DEFAULT='REVISION_DEFAULT;NOTFOUND',
|
||||
|
|
|
@ -104,7 +104,7 @@ class Boards(WestCommand):
|
|||
args.format.format(
|
||||
name=board.name,
|
||||
full_name=board.full_name,
|
||||
dir=board.directories[0],
|
||||
dir=board.dir,
|
||||
hwm=board.hwm,
|
||||
vendor=board.vendor,
|
||||
qualifiers=list_boards.board_v2_qualifiers_csv(board),
|
||||
|
|
Loading…
Reference in New Issue