2019-09-03 09:23:40 -04:00
|
|
|
import sys
|
|
|
|
import importlib
|
|
|
|
|
|
|
|
class Targets:
|
|
|
|
def __getattr__(self, name):
|
|
|
|
if name == "__path__":
|
|
|
|
return []
|
|
|
|
for support in ["official", "partner", "community"]:
|
|
|
|
try:
|
|
|
|
return importlib.import_module("litex_boards." + support + ".targets." + name)
|
2019-11-16 03:40:30 -05:00
|
|
|
except ModuleNotFoundError:
|
2019-09-03 09:23:40 -04:00
|
|
|
pass
|
|
|
|
raise ModuleNotFoundError
|
|
|
|
|
|
|
|
sys.modules[__name__] = Targets()
|