File size: 1,149 Bytes
71687cf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # Copyright (C) 2022 Anaconda, Inc
# Copyright (C) 2023 conda
# SPDX-License-Identifier: BSD-3-Clause
"""
Entry points for the conda plugin system
"""
from conda.common.configuration import PrimitiveParameter
from conda.plugins import hookimpl
from conda.plugins.types import CondaSetting, CondaSolver, CondaSubcommand
from .repoquery import configure_parser, repoquery
from .solver import LibMambaSolver
@hookimpl
def conda_solvers():
"""
The conda plugin hook implementation to load the solver into conda.
"""
yield CondaSolver(
name="libmamba",
backend=LibMambaSolver,
)
@hookimpl
def conda_subcommands():
yield CondaSubcommand(
name="repoquery",
summary="Advanced search for repodata.",
action=repoquery,
configure_parser=configure_parser,
)
@hookimpl
def conda_settings():
"""
Define all settings specific to the conda-libmamba-solver plugin.
"""
yield CondaSetting(
name="use_sharded_repodata",
description="Enable use of sharded repodata when available.",
parameter=PrimitiveParameter(False, element_type=bool),
)
|