Skip to content

Commit

Permalink
Obsolete packages list moved to resources.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Jul 20, 2021
1 parent 2a4ed12 commit 44ee3d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apio/managers/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down
9 changes: 8 additions & 1 deletion apio/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"""
Expand All @@ -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])
)
Expand Down

0 comments on commit 44ee3d6

Please sign in to comment.