forked from python/typeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conda.pyi
44 lines (36 loc) · 1.37 KB
/
conda.pyi
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
from _typeshed import StrOrBytesPath
from collections.abc import Sequence
from importlib.metadata import PackagePath as _PackagePath
from pathlib import Path, PurePath
from typing_extensions import TypedDict
CONDA_ROOT: Path
CONDA_META_DIR: Path
PYTHONPATH_PREFIXES: list[Path]
class _RawDict(TypedDict):
name: str
version: str
files: list[StrOrBytesPath | PurePath]
depends: list[str]
class Distribution:
raw: _RawDict
name: str
version: str
files: list[PackagePath]
dependencies: list[str]
packages: list[str | None]
def __init__(self, json_path: str) -> None: ...
@classmethod
def from_name(cls, name: str) -> Distribution: ...
@classmethod
def from_package_name(cls, name: str) -> Distribution: ...
class PackagePath(_PackagePath):
def locate(self) -> Path: ...
def walk_dependency_tree(initial: str, excludes: Sequence[str] | None = ...) -> dict[str, Distribution]: ...
def requires(name: str, strip_versions: bool = ...) -> list[str]: ...
def files(name: str, dependencies: bool = ..., excludes: Sequence[str] | None = ...) -> list[PackagePath]: ...
lib_dir: PackagePath
def collect_dynamic_libs(
name: str, dest: str = ..., dependencies: bool = ..., excludes: Sequence[str] | None = ...
) -> list[tuple[str, str]]: ...
distributions: dict[str, Distribution]
distributions_by_package: dict[str | None, Distribution]