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__(other)
#
Returns True if the Overrides are equal, False otherwise.
__repr__()
#
Returns a representation of the Override.
__str__()
#
Returns string representation of the Override.
default_env_var()
classmethod
#
Returns a new instance to indicate that the default environment variable should overwrite the detected information from the host if specified.
env_var(env_var)
classmethod
#
Returns the environment variable override for the given environment variable.
string(override)
classmethod
#
Returns the override for the given string.
VirtualPackage
#
__repr__()
#
Returns a representation of the VirtualPackage.
__str__()
#
Returns string representation of the VirtualPackage.
current()
staticmethod
#
Returns virtual packages detected for the current system or an error if the versions could not be properly detected.
detect(overrides=VirtualPackageOverrides())
staticmethod
#
Returns virtual packages detected for the current system with the given overrides.
into_generic()
#
Returns a GenericVirtualPackage from VirtualPackage.
VirtualPackageOverrides
#
cuda: Override | None
property
writable
#
Returns the CUDA override.
libc: Override | None
property
writable
#
Returns the libc override.
osx: Override | None
property
writable
#
Returns the OSX override.
__init__(osx=None, libc=None, cuda=None)
#
Returns the default virtual package overrides. By default, none of the overrides are set.
__repr__()
#
Returns a representation of the VirtualPackageOverrides.
__str__()
#
Returns string representation of the VirtualPackageOverrides.
from_env()
classmethod
#
Returns the virtual package overrides for None.