Virtual Packages#

Conda allows for the registering of virtual packages in the index data via the plugin system. This mechanism lets users write plugins that provide version identification for properties only known at runtime (e.g., OS information).

class CondaVirtualPackage#

Return type to use when defining a conda virtual package plugin hook.

For details on how this is used, see conda_virtual_packages().

Parameters:
  • name -- Virtual package name (e.g., my_custom_os).

  • version -- Virtual package version (e.g., 1.2.3).

  • build -- Virtual package build string (e.g., x86_64).

build#
name#
to_virtual_package()#
version#
conda_virtual_packages()#

Register virtual packages in Conda.

Example:

from conda import plugins


@plugins.hookimpl
def conda_virtual_packages():
    yield plugins.CondaVirtualPackage(
        name="my_custom_os",
        version="1.2.3",
        build="x86_64",
    )
Returns:

An iterable of virtual package entries.