buildenv.backends.factory

Classes

Module Contents

class buildenv.backends.factory.EnvBackendFactory
KNOWN_BACKENDS

List of known environment backends

static is_supported(name: str) bool

Check if backend name is supported

Parameters:

name – backend name

Returns:

True if supported, False otherwise

static create(name: str, project_path: pathlib.Path, verbose_subprocess: bool = True, shell_name: str = 'bash') buildenv.backends.backend.EnvBackend

Create backend instance from name

Parameters:
  • name – backend name

  • project_path – project path

  • verbose_subprocess – if True (default), subprocess calls output is streamed to console

  • shell_name – name of the shell to use

Returns:

created backend implementation instance

static detect(project_path: pathlib.Path | None = None, verbose_subprocess: bool = True, shell_name: str = 'bash') buildenv.backends.backend.EnvBackend

Detect backend from running python instance, and return corresponding implementation

Parameters:
  • project_path – project path

  • verbose_subprocess – if True (default), subprocess calls output is streamed to console

  • shell_name – name of the shell to use

Returns:

detected backend implementation instance