File size: 615 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
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
"""Expose conda version."""

from __future__ import annotations

from typing import TYPE_CHECKING

from .. import hookimpl
from ..types import CondaVirtualPackage

if TYPE_CHECKING:
    from collections.abc import Iterable


@hookimpl
def conda_virtual_packages() -> Iterable[CondaVirtualPackage]:
    from ... import __version__

    # 1: __conda==VERSION=0 (always exported)
    yield CondaVirtualPackage(
        name="conda",
        version=__version__,
        build=None,
        # override_entity=None,  # no override allowed
    )