Skip to content

GenericVirtualPackage#

GenericVirtualPackage #

build_string: str property #

Returns the build identifier of the package.

Examples#
>>> from rattler.package.package_name import PackageName
>>> from rattler.version.version import Version
>>> gvp = GenericVirtualPackage(PackageName("__archspec"), Version("1"), "x86_64")
>>> gvp.build_string
'x86_64'
>>>

name: PackageName property #

Returns the name of the package

Examples#
>>> from rattler.package.package_name import PackageName
>>> from rattler.version.version import Version
>>> gvp = GenericVirtualPackage(PackageName("__archspec"), Version("1"), "x86_64")
>>> gvp.name
PackageName("__archspec")
>>> gvp.name.source
'__archspec'
>>> gvp.name.normalized
'__archspec'
>>>

version: Version property #

Returns the version of the package

Examples#
>>> from rattler.package.package_name import PackageName
>>> from rattler.version.version import Version
>>> gvp = GenericVirtualPackage(PackageName("__archspec"), Version("1"), "x86_64")
>>> gvp.version
Version("1")
>>>

__repr__() #

Returns a representation of the GenericVirtualPackage

Examples#
>>> from rattler.package.package_name import PackageName
>>> from rattler.version.version import Version
>>> gvp = GenericVirtualPackage(PackageName("__archspec"), Version("1"), "x86_64")
>>> gvp
GenericVirtualPackage("__archspec=1=x86_64")
>>>

__str__() #

Returns the string representation of the GenericVirtualPackage

Examples#
>>> from rattler.package.package_name import PackageName
>>> from rattler.version.version import Version
>>> gvp = GenericVirtualPackage(PackageName("__archspec"), Version("1"), "x86_64")
>>> str(gvp)
'__archspec=1=x86_64'
>>>