Skip to content

VirtualPackage#

Override #

Represents an override for a virtual package. An override can be build using - Override.default_env_var() for overriding the detection with the default environment variable, - Override.env_var(str) for overriding the detection with a custom environment variable, - Override.string(str) for passing the version directly, or

__eq__ #

__eq__(other)

Returns True if the Overrides are equal, False otherwise.

__repr__ #

__repr__()

Returns a representation of the Override.

__str__ #

__str__()

Returns string representation of the Override.

default_env_var classmethod #

default_env_var()

Returns a new instance to indicate that the default environment variable should overwrite the detected information from the host if specified.

env_var classmethod #

env_var(env_var)

Returns the environment variable override for the given environment variable.

string classmethod #

string(override)

Returns the override for the given string.

VirtualPackage #

__repr__ #

__repr__()

Returns a representation of the VirtualPackage.

__str__ #

__str__()

Returns string representation of the VirtualPackage.

current staticmethod #

current()

Returns virtual packages detected for the current system or an error if the versions could not be properly detected.

detect staticmethod #

detect(overrides=VirtualPackageOverrides())

Returns virtual packages detected for the current system with the given overrides.

into_generic #

into_generic()

Returns a GenericVirtualPackage from VirtualPackage.

VirtualPackageOverrides #

cuda property writable #

cuda

Returns the CUDA override.

libc property writable #

libc

Returns the libc override.

osx property writable #

osx

Returns the OSX override.

__init__ #

__init__(osx=None, libc=None, cuda=None)

Returns the default virtual package overrides. By default, none of the overrides are set.

__repr__ #

__repr__()

Returns a representation of the VirtualPackageOverrides.

__str__ #

__str__()

Returns string representation of the VirtualPackageOverrides.

from_env classmethod #

from_env()

Returns the virtual package overrides for None.