mirror of
https://github.com/peridotbuild/pv2.git
synced 2024-11-28 16:06:28 +00:00
e48a54db3a
* Util Module * Provides: color class (for specialty stdout logging) * Provides: constants classes for rpm, errors, and mock * Provides: error classes for generic error handling and future fault handler * Provides: generic classes for generic, repeatable use cases * Provides: rpmutil with rpm utilities that range from basic to advanced metadata handling * Add mock module * Can generate a usable mock config based on input provided * Can generate mock plugin configuration as provided * cache related plugins are hardcoded as disabled * Supports plugins: chroot scanning, embedding files, bind mounts * Can generate basic dnf configs with repo information * (Currently limited) Error handler * Runs mock commands (such as build, buildsrpm, init, shell) * Add modularity module (very limited, doesn't really do much) * Add peridotpb example (does nothing, will likely be its own thing) * Add MIT license
31 lines
698 B
Python
31 lines
698 B
Python
# -*-:python; coding:utf-8; -*-
|
|
# author: Louis Abel <label@rockylinux.org>
|
|
# borrowed from empanadas
|
|
"""
|
|
Color classes
|
|
"""
|
|
# RPM utilities
|
|
__all__ = [
|
|
'Color',
|
|
]
|
|
|
|
# pylint: disable=too-few-public-methods
|
|
class Color:
|
|
"""
|
|
Supported colors
|
|
"""
|
|
RED = "\033[91m"
|
|
GREEN = "\033[92m"
|
|
PURPLE = "\033[95m"
|
|
CYAN = "\033[96m"
|
|
DARKCYAN = "\033[36m"
|
|
BLUE = "\033[94m"
|
|
YELLOW = "\033[93m"
|
|
UNDERLINE = "\033[4m"
|
|
BOLD = "\033[1m"
|
|
END = "\033[0m"
|
|
INFO = "[" + BOLD + GREEN + "INFO" + END + "] "
|
|
WARN = "[" + BOLD + YELLOW + "WARN" + END + "] "
|
|
FAIL = "[" + BOLD + RED + "FAIL" + END + "] "
|
|
STAT = "[" + BOLD + CYAN + "STAT" + END + "] "
|