setuptools: add various missing objects and annotations (#10639)

This commit is contained in:
Alex Waygood
2023-08-30 21:46:20 +01:00
committed by GitHub
parent 4ae6d38f96
commit a4f08bd07f
4 changed files with 15 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
from collections.abc import Callable
from typing import Any
from typing import Any, ClassVar
from typing_extensions import TypeAlias
_Macro: TypeAlias = tuple[str] | tuple[str, str | None]
@@ -15,6 +15,15 @@ def new_compiler(
def show_compilers() -> None: ...
class CCompiler:
src_extensions: ClassVar[list[str] | None]
obj_extensions: ClassVar[str | None]
static_lib_extension: ClassVar[str | None]
shared_lib_extension: ClassVar[str | None]
static_lib_format: ClassVar[str | None]
shared_lib_format: ClassVar[str | None]
exe_extension: ClassVar[str | None]
language_map: ClassVar[dict[str, str]]
language_order: ClassVar[list[str]]
dry_run: bool
force: bool
verbose: bool

View File

@@ -10,6 +10,7 @@ class Command:
distribution: Distribution
sub_commands: ClassVar[list[tuple[str, Callable[[Self], bool] | None]]]
def __init__(self, dist: Distribution) -> None: ...
def ensure_finalized(self) -> None: ...
@abstractmethod
def initialize_options(self) -> None: ...
@abstractmethod

View File

@@ -1,6 +1,7 @@
from _typeshed import Incomplete
from ..cmd import Command
from ..extension import Extension
class build_ext(Command):
description: str
@@ -42,5 +43,5 @@ class build_ext(Command):
def get_ext_fullpath(self, ext_name: str) -> str: ...
def get_ext_fullname(self, ext_name: str) -> str: ...
def get_ext_filename(self, ext_name: str) -> str: ...
def get_export_symbols(self, ext): ...
def get_libraries(self, ext): ...
def get_export_symbols(self, ext: Extension) -> list[str]: ...
def get_libraries(self, ext: Extension) -> list[str]: ...

View File

@@ -1,2 +1,2 @@
def configure() -> None: ...
def set_threshold(level): ...
def set_threshold(level: int) -> int: ...