Merge pull request #199 from zyp/ignore_missing_deps

boards/compat: Skip targets with unsatisfied dependencies.
This commit is contained in:
enjoy-digital 2021-04-11 14:43:01 +02:00 committed by GitHub
commit 2a7d8c5330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -58,7 +58,11 @@ for target in targets:
# from litex_boards.targets import digilent_arty or
# from litex_boards.targets import arty
if target.split("_")[0] in vendors:
try:
short_target = target[len(target.split("_")[0])+1:]
t = importlib.import_module(f"litex_boards.targets.{target}")
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