Skip to content
Snippets Groups Projects
Commit 2e204285 authored by Vegard Storheil Eriksen's avatar Vegard Storheil Eriksen
Browse files

boards/compat: Skip targets with unsatisfied dependencies.

Fixes #194
parent 03accabc
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,11 @@ for target in targets: ...@@ -58,7 +58,11 @@ for target in targets:
# from litex_boards.targets import digilent_arty or # from litex_boards.targets import digilent_arty or
# from litex_boards.targets import arty # from litex_boards.targets import arty
if target.split("_")[0] in vendors: if target.split("_")[0] in vendors:
short_target = target[len(target.split("_")[0])+1:] try:
t = importlib.import_module(f"litex_boards.targets.{target}") short_target = target[len(target.split("_")[0])+1:]
vars()[short_target] = t t = importlib.import_module(f"litex_boards.targets.{target}")
sys.modules[f"litex_boards.targets.{short_target}"] = t vars()[short_target] = t
sys.modules[f"litex_boards.targets.{short_target}"] = t
except ModuleNotFoundError:
# Not all dependencies for this target is satisfied. Skip.
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment