30 lines
612 B
Python
30 lines
612 B
Python
|
"""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
|
||
|
"""
|