Added operations.py

Define all operations which soypak can do. Early development of func@install_packages
This commit is contained in:
Ethan Smith-Coss 2023-08-12 00:14:37 +01:00
parent 683e55ea0d
commit 4315780777
Signed by: TheOnePath
GPG Key ID: 4E7D436CE1A0BAF1

15
soypak/deps/operations.py Normal file
View File

@ -0,0 +1,15 @@
import sys
import clog
import soypak.deps.bottler as bottler
_log = clog.Logger.get("runtime_logger")
def install_packages(pkgs: list[bottler.PackageItem]):
if not isinstance(pkgs, bottler.PackageItem):
_log.error(f"TypeError: {pkgs=}, expected list[PackageItem].")
_log.printLog("There was an issue when operating on the transaction.", level=4)
sys.exit(1)
# :@TODO: install the damned things!