rwx/rwx/os/pm/__init__.py

30 lines
612 B
Python
Raw Normal View History

"""Package Manager."""
from abc import ABC, abstractmethod
from rwx import Object
from rwx.ps import Command
class PM(Object, ABC):
"""Package Manager."""
def __init__(self) -> None:
"""Set commands."""
self.clean = self.get_clean_command()
self.install = self.get_install_command()
@abstractmethod
def get_clean_command(self) -> Command:
"""Command to clean packages cache.
:rtype: Command
"""
@abstractmethod
def get_install_command(self) -> Command:
"""Command to install package(s).
:rtype: Command
"""