Dependencies

class helix.utils.Dependency

A base class for dependency definitions.

This defines the interface for all dependency installers.

abstract install(verbose=False)

Install this dependency.

Raise a DependencyInstallationFailure on error.

Parameters

verbose (boolean) – Verbosity.

abstract installed()

Check if this dependency is installed.

Returns

True if this has already been installed, and False otherwise.

string()

The string representation of this dependency.

Example

The name of the package to install or the path to a script to run.

Included Dependencies

class helix.utils.ManualPATHDependency(name, help=None)

A manually installed dependency that resides in the PATH.

This is a minor extension of ManualDependency which adds additional functionality to check if target dependency has been installed and resides in the PATH.

Note

name must match the target binary to find in the PATH or this will not work.

installed()

Check the PATH for the existence of name.

class helix.utils.ManualWindowsRegistryDependency(*args, registry, key, **kwargs)

A manually installed dependency that sets a Windows registry key.

This checks for the existence of a Windows registry key to verify the installation status of a dependency.

Parameters
  • name (str) – The name of this dependency.

  • help (str) – A short description of how to install this dependency manually. Optional, but recommended.

  • key (str) – The full path to the key to check.

installed()

Check the registry for the existence of key.

This uses the built-in winreg API to check for the existence of the key.

class helix.utils.WindowsChocolateyDependency(package)

A dependency that may be installed via the Chocolatey package manager.

Parameters

package (str) – The package name.

Note

These sorts of dependencies require that the plaform under which this Blueprint/Component/Transform is run includes Chocolatey and assume that it is already installed (i.e., this will not work on Linux).

Note

These dependencies require Administrator permissions to install successfully.

install(verbose=False)

Install the package with Chocolatey.

installed()

Check if the package is installed with Chocolately.

string()

The string representation of this dependency.

Example

The name of the package to install or the path to a script to run.

class helix.utils.LinuxAPTDependency(package)

A dependency that may be installed via the Advanced Package Tool (APT).

Parameters

package (str) – The package name.

Note

These sorts of dependencies require that the plaform under which this Blueprint/Component/Transform is run includes APT and assume that it is already installed (i.e., this will not work on Windows).

Note

These dependencies require root permissions to install successfully.

install(verbose=False)

Install the package with APT.

installed()

Check if the package is installed with dpkg.

string()

The string representation of this dependency.

Example

The name of the package to install or the path to a script to run.