| 1 |
import sys |
| 2 |
from typing import IO, Any, Literal, overload |
| 3 |
from typing_extensions import LiteralString, deprecated |
| 4 |
|
| 5 |
__all__ = [ |
| 6 |
"get_config_h_filename", |
| 7 |
"get_config_var", |
| 8 |
"get_config_vars", |
| 9 |
"get_makefile_filename", |
| 10 |
"get_path", |
| 11 |
"get_path_names", |
| 12 |
"get_paths", |
| 13 |
"get_platform", |
| 14 |
"get_python_version", |
| 15 |
"get_scheme_names", |
| 16 |
"parse_config_h", |
| 17 |
] |
| 18 |
|
| 19 |
@overload |
| 20 |
@deprecated("SO is deprecated, use EXT_SUFFIX. Support is removed in Python 3.11") |
| 21 |
def get_config_var(name: Literal["SO"]) -> Any: ... |
| 22 |
@overload |
| 23 |
def get_config_var(name: str) -> Any: ... |
| 24 |
@overload |
| 25 |
def get_config_vars() -> dict[str, Any]: ... |
| 26 |
@overload |
| 27 |
def get_config_vars(arg: str, /, *args: str) -> list[Any]: ... |
| 28 |
def get_scheme_names() -> tuple[str, ...]: ... |
| 29 |
|
| 30 |
if sys.version_info >= (3, 10): |
| 31 |
def get_default_scheme() -> LiteralString: ... |
| 32 |
def get_preferred_scheme(key: Literal["prefix", "home", "user"]) -> LiteralString: ... |
| 33 |
|
| 34 |
def _get_preferred_schemes() -> dict[Literal["prefix", "home", "user"], LiteralString]: ... |
| 35 |
|
| 36 |
def get_path_names() -> tuple[str, ...]: ... |
| 37 |
def get_path(name: str, scheme: str = ..., vars: dict[str, Any] | None = None, expand: bool = True) -> str: ... |
| 38 |
def get_paths(scheme: str = ..., vars: dict[str, Any] | None = None, expand: bool = True) -> dict[str, str]: ... |
| 39 |
def get_python_version() -> str: ... |
| 40 |
def get_platform() -> str: ... |
| 41 |
|
| 42 |
if sys.version_info >= (3, 12): |
| 43 |
@overload |
| 44 |
def is_python_build() -> bool: ... |
| 45 |
@overload |
| 46 |
@deprecated("The `check_home` parameter is deprecated since Python 3.12; removed in Python 3.15.") |
| 47 |
def is_python_build(check_home: object = None) -> bool: ... |
| 48 |
|
| 49 |
elif sys.version_info >= (3, 11): |
| 50 |
def is_python_build(check_home: object = None) -> bool: ... |
| 51 |
|
| 52 |
else: |
| 53 |
def is_python_build(check_home: bool = False) -> bool: ... |
| 54 |
|
| 55 |
def parse_config_h(fp: IO[Any], vars: dict[str, Any] | None = None) -> dict[str, Any]: ... |
| 56 |
def get_config_h_filename() -> str: ... |
| 57 |
def get_makefile_filename() -> str: ... |