proj_flow.api.env

The proj_flow.api.env provides interaction with project environment:

  • FlowConfig loads the project config in .flow/config.yml.

  • Runtime provides means to run tools and print messages, while respecting --dry-run, --silent and --verbose.

  • Config represents single run configuration.

class proj_flow.api.env.CMakeBinaryDirsCache
property dirs
binary_dir(key: str)
proj_flow.api.env.default_compiler()
class proj_flow.api.env.Printer
static hide(arg: str, secrets: List[str])
static print_arg(arg: str, secrets: List[str], raw: bool)
static print_cmd(*args: str, use_color: bool = True, secrets: List[str], raw: bool)
class proj_flow.api.env.RunAlias(name: str, doc: str, steps: List[str])
name: str
doc: str
steps: List[str]
static from_json(name: str, alias: dict | list)
proj_flow.api.env.load_extensions(extensions: List[str])
class proj_flow.api.env.FlowConfig(cfg: FlowConfig | None = None, root: Path = PosixPath('.'))
steps: list = []
aliases: List[RunAlias] = []
root: Path
property items
property entry: Dict[str, dict]
property compiler: Dict[str, dict]
property compiler_names: Dict[str, List[str]]
property compiler_os_default: Dict[str, str]
property lts_list: Dict[str, List[str]]
property postproc: dict
property postproc_exclude: List[dict]
property postproc_include: List[dict]
property shortcuts: Dict[str, dict]
class proj_flow.api.env.Msg(*values)

Message level for Runtime.message

DEBUG = 0

Print only, when verbose is set

STATUS = 2

Print when silent if not set

ALWAYS = 3

Print always

class proj_flow.api.env.Runtime(argsOrRuntime: Namespace | Runtime, cfg: FlowConfig)
dry_run: bool
silent: bool
verbose: bool
official: bool
no_coverage: bool
use_color: bool
only_host: bool
platform: str
secrets: List[str] = []
message(*args: str, level=Msg.DEBUG, **kwargs)
fatal(*args: str, **kwargs)
print(*args: str, raw=False)
cmd(*args: str)
capture(*args: str, silent=False)
mkdirs(dirname: str)
cp(src: str, dst: str, regex: str | None = None)
class proj_flow.api.env.Config(items: dict, keys: List[str])
items: dict
keys: List[str]
get_path(key: str, val: Any = None)
property os: str
property compiler: List[str]
property build_type: str
property build_name: str
property build_dir: Path
property preset: str
property build_generator: str