system_helpers.apt.install

Classes

Cleaner

Functions

get_list_of_packages_from_requirements_file(→ List[str])

Get list of packages from a requirements file.

install_command(→ List[str])

Get the apt command to install packages.

install_packages(→ None)

Install list of packages by using apt.

Module Contents

system_helpers.apt.install.get_list_of_packages_from_requirements_file(*, file: pathlib.Path) List[str]

Get list of packages from a requirements file.

Note that this function only supports skipping empty lines and comment lines, i.e., not all features from https://pip.pypa.io/en/stable/reference/requirements-file-format/ are supported.

system_helpers.apt.install.install_command(*, yes: bool = True, no_install_recommends: bool = True) List[str]

Get the apt command to install packages.

class system_helpers.apt.install.Cleaner
static run() None
system_helpers.apt.install.install_packages(*, packages: List[str] | None = None, requirements: List[pathlib.Path] | None = None, update: bool = False, upgrade: bool = False, clean: bool = False, args: List[str] | None = None) None

Install list of packages by using apt.

Optionally:
  • update

  • upgrade

  • clean