waft.warp_client.installation.installation_base module

class waft.warp_client.installation.installation_base.InstallationBase(node: BaseNode, warp_cli: WarpCliBase)

Bases: ABC

Install manager base for cross-platform implementations

property build_architecture: str

Return the name of the build’s target processor architecture

abstract property build_dirname: str

Returns the name of the directory where the installer can be expected to be found

property build_platform_name: str

Return the codename of the build’s target platform

abstract property flutter_build_dirname: str

Returns the name of the directory where the flutter GUI installer can be expected to be found

get_installed_warp_version() str

Return version of WARP currently installed on the system

get_installer_version(installer_path: PurePath) Version

Return version of WARP to be installed by installer path

Parameters:

installer_path – Path to installer

abstractmethod install(install_params: WarpParams | None = None, installer: str | None = None, version: str | None = None, use_flutter: bool = False)

Perform installation using install manager

install_location() PurePath

Returns WARP installed application path, primarily used for uninstall purposes.

Returns:

WARP installed application path

Return type:

PurePath

installer_file_ext: str
is_installed() bool

Checks to see if the client is installed. Returns True if it is, False if not.

locate_installer(local_disk=True, client_installer_name: str | None = None, version: str | None = None, use_flutter: bool = False) Path

Locates an installer file either on the local disk or remotely.

Args:

client_installer_name (str, optional): Name of the installer file. local_disk (bool): True to search on the local disk, False to search remotely. version (str): String of version number to search for within artifact directory use_flutter (bool): True to search for flutter installer, False to search for desktop installer

Returns:

Path: Path to the installer.

Raises:

NotImplementedError: If local_disk is False, as remote searching is not supported yet. FileNotFoundError: If:

  • client_installer_name is given and no file of the given name is found

  • no file details are given and there are no files in the expected artifact directory

  • No file with the given version number is found in the artifact directory

ValueError: If there are multiple files in the artifact directory and no version number given

abstractmethod uninstall()

Perform uninstall

version_pattern: str = '(?P<year>\\d{4})\\.(?P<release>\\d{1,2})\\.(?P<build>\\d+)\\.(?P<specifier>[0-3])'