diff --git a/apio/managers/installer.py b/apio/managers/installer.py index 9838905f..8e4de3db 100644 --- a/apio/managers/installer.py +++ b/apio/managers/installer.py @@ -170,7 +170,7 @@ def install(self): """Install the current package in the set in the Installer Object""" # -- Warning if the package has been marked as obsolete - if self.package in OBSOLETE_PKG: + if self.package in self.resources.obsolete_pkgs: click.secho( f"Warning: Package {self.package} is obsolete. " f"Will be removed in the future. " diff --git a/apio/resources.py b/apio/resources.py index 8663bfa2..1557a1de 100644 --- a/apio/resources.py +++ b/apio/resources.py @@ -20,7 +20,6 @@ # -- Information about all the supported board # -- names, fpga family, programmer, ftdi description, vendor id, product id - import json from collections import OrderedDict import shutil @@ -36,6 +35,10 @@ """project for that board""" ) +# -- Packages marked as obsoletes +# -- The value is the replacement package +OBSOLETE_PKGS = {"system": "oss-cad-suite"} + class Resources: """Resource manager. Class for accesing to all the resources""" @@ -59,6 +62,10 @@ def __init__(self, platform=""): self.packages = OrderedDict( sorted(self.packages.items(), key=lambda t: t[0]) ) + + # -- Obsolete packages + self.obsolete_pkgs = OBSOLETE_PKGS + self.boards = OrderedDict( sorted(self.boards.items(), key=lambda t: t[0]) )