litex-boards/litex_boards/platforms.py

16 lines
419 B
Python
Raw Normal View History

import sys
import importlib
class Platforms:
def __getattr__(self, name):
if name == "__path__":
return []
for support in ["official", "partner", "community"]:
try:
return importlib.import_module("litex_boards." + support + ".platforms." + name)
except:
pass
raise ModuleNotFoundError
sys.modules[__name__] = Platforms()