mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 03:52:19 +08:00
[setuptools] Update to 71.1.* (#12176)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from _typeshed import StrPath
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable, Mapping, Sequence
|
||||
from typing import Any, Literal
|
||||
from typing import Any
|
||||
|
||||
from ._distutils.cmd import Command as _Command
|
||||
from .depends import Require as Require
|
||||
@@ -76,9 +76,7 @@ class Command(_Command):
|
||||
distribution: Distribution
|
||||
def __init__(self, dist: Distribution, **kw: Any) -> None: ...
|
||||
def ensure_string_list(self, option: str | list[str]) -> None: ...
|
||||
def reinitialize_command(
|
||||
self, command: _Command | str, reinit_subcommands: bool | Literal[0, 1] = 0, **kw: Any
|
||||
) -> _Command: ...
|
||||
def reinitialize_command(self, command: _Command | str, reinit_subcommands: bool = False, **kw: Any) -> _Command: ... # type: ignore[override]
|
||||
@abstractmethod
|
||||
def initialize_options(self) -> None: ...
|
||||
@abstractmethod
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from . import dist
|
||||
|
||||
@@ -17,6 +18,8 @@ __all__ = [
|
||||
"SetupRequirementsError",
|
||||
]
|
||||
|
||||
_ConfigSettings: TypeAlias = dict[str, str | list[str] | None] | None
|
||||
|
||||
class SetupRequirementsError(BaseException):
|
||||
specifiers: Any
|
||||
def __init__(self, specifiers) -> None: ...
|
||||
@@ -34,11 +37,11 @@ class _BuildMetaBackend:
|
||||
self, metadata_directory: str, config_settings: Mapping[str, Any] | None = None
|
||||
) -> str: ...
|
||||
def build_wheel(
|
||||
self, wheel_directory: StrPath, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
|
||||
self, wheel_directory: StrPath, config_settings: _ConfigSettings | None = None, metadata_directory: StrPath | None = None
|
||||
) -> str: ...
|
||||
def build_sdist(self, sdist_directory: StrPath, config_settings: Mapping[str, Any] | None = None) -> str: ...
|
||||
def build_sdist(self, sdist_directory: StrPath, config_settings: _ConfigSettings | None = None) -> str: ...
|
||||
def build_editable(
|
||||
self, wheel_directory: StrPath, config_settings: Mapping[str, Any] | None = None, metadata_directory: str | None = None
|
||||
self, wheel_directory: StrPath, config_settings: _ConfigSettings | None = None, metadata_directory: str | None = None
|
||||
) -> str: ...
|
||||
def get_requires_for_build_editable(self, config_settings: Mapping[str, Any] | None = None) -> list[str]: ...
|
||||
def prepare_metadata_for_build_editable(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Literal
|
||||
|
||||
from .. import Command
|
||||
|
||||
@@ -14,9 +13,9 @@ class bdist_egg(Command):
|
||||
boolean_options: Incomplete
|
||||
bdist_dir: Incomplete
|
||||
plat_name: Incomplete
|
||||
keep_temp: int
|
||||
keep_temp: bool
|
||||
dist_dir: Incomplete
|
||||
skip_build: int
|
||||
skip_build: bool
|
||||
egg_output: Incomplete
|
||||
exclude_source_files: Incomplete
|
||||
def initialize_options(self) -> None: ...
|
||||
@@ -48,10 +47,5 @@ def can_scan(): ...
|
||||
INSTALL_DIRECTORY_ATTRS: Incomplete
|
||||
|
||||
def make_zipfile(
|
||||
zip_filename,
|
||||
base_dir,
|
||||
verbose: bool | Literal[0, 1] = 0,
|
||||
dry_run: bool | Literal[0, 1] = 0,
|
||||
compress: bool = True,
|
||||
mode: str = "w",
|
||||
zip_filename, base_dir, verbose: bool = False, dry_run: bool = False, compress: bool = True, mode: str = "w"
|
||||
): ...
|
||||
|
||||
61
stubs/setuptools/setuptools/command/bdist_wheel.pyi
Normal file
61
stubs/setuptools/setuptools/command/bdist_wheel.pyi
Normal file
@@ -0,0 +1,61 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Iterable
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Final, Literal
|
||||
|
||||
from setuptools import Command
|
||||
|
||||
def safe_name(name: str) -> str: ...
|
||||
def safe_version(version: str) -> str: ...
|
||||
|
||||
setuptools_major_version: Final[int]
|
||||
|
||||
PY_LIMITED_API_PATTERN: Final[str]
|
||||
|
||||
def python_tag() -> str: ...
|
||||
def get_platform(archive_root: str | None) -> str: ...
|
||||
def get_flag(var: str, fallback: bool, expected: bool = True, warn: bool = True) -> bool: ...
|
||||
def get_abi_tag() -> str | None: ...
|
||||
def safer_name(name: str) -> str: ...
|
||||
def safer_version(version: str) -> str: ...
|
||||
def remove_readonly(
|
||||
func: Callable[..., object], path: str, excinfo: tuple[type[Exception], Exception, TracebackType]
|
||||
) -> None: ...
|
||||
def remove_readonly_exc(func: Callable[..., object], path: str, exc: Exception) -> None: ...
|
||||
|
||||
class bdist_wheel(Command):
|
||||
description: ClassVar[str]
|
||||
supported_compressions: ClassVar[dict[str, int]]
|
||||
user_options: ClassVar[list[tuple[Any, ...]]]
|
||||
boolean_options: ClassVar[list[str]]
|
||||
|
||||
bdist_dir: str | None
|
||||
data_dir: Incomplete | None
|
||||
plat_name: str | None
|
||||
plat_tag: Incomplete | None
|
||||
format: str
|
||||
keep_temp: bool
|
||||
dist_dir: str | None
|
||||
egginfo_dir: Incomplete | None
|
||||
root_is_pure: bool | None
|
||||
skip_build: Incomplete | None
|
||||
relative: bool
|
||||
owner: Incomplete | None
|
||||
group: Incomplete | None
|
||||
universal: bool
|
||||
compression: str | int
|
||||
python_tag: str
|
||||
build_number: str | None
|
||||
py_limited_api: str | Literal[False]
|
||||
plat_name_supplied: bool
|
||||
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
@property
|
||||
def wheel_dist_name(self) -> str: ...
|
||||
def get_tag(self) -> tuple[str, str, str]: ...
|
||||
def run(self) -> None: ...
|
||||
def write_wheelfile(self, wheelfile_base: str, generator: str = ...) -> None: ...
|
||||
@property
|
||||
def license_paths(self) -> Iterable[str]: ...
|
||||
def egg2dist(self, egginfo_path: str, distinfo_path: str) -> None: ...
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from typing import Any, ClassVar, Literal
|
||||
from typing import Any, ClassVar
|
||||
|
||||
from .._distutils.command.build_ext import build_ext as _build_ext
|
||||
|
||||
@@ -40,7 +40,7 @@ def link_shared_object(
|
||||
library_dirs: Incomplete | None = None,
|
||||
runtime_library_dirs: Incomplete | None = None,
|
||||
export_symbols: Incomplete | None = None,
|
||||
debug: bool | Literal[0, 1] = 0,
|
||||
debug: bool = False,
|
||||
extra_preargs: Incomplete | None = None,
|
||||
extra_postargs: Incomplete | None = None,
|
||||
build_temp: Incomplete | None = None,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from typing import Any, ClassVar
|
||||
|
||||
from .._distutils.cmd import _StrPathT
|
||||
from .._distutils.command import build_py as orig
|
||||
|
||||
def make_writable(target) -> None: ...
|
||||
@@ -10,12 +11,22 @@ class build_py(orig.build_py):
|
||||
package_data: Any
|
||||
exclude_package_data: Any
|
||||
def finalize_options(self) -> None: ...
|
||||
def copy_file( # type: ignore[override]
|
||||
self,
|
||||
infile: StrPath,
|
||||
outfile: _StrPathT,
|
||||
preserve_mode: bool = True,
|
||||
preserve_times: bool = True,
|
||||
link: str | None = None,
|
||||
level=1,
|
||||
) -> tuple[_StrPathT | str, bool]: ...
|
||||
def run(self) -> None: ...
|
||||
data_files: Any
|
||||
def __getattr__(self, attr: str): ...
|
||||
def build_module(self, module, module_file, package): ...
|
||||
def get_data_files_without_manifest(self) -> list[tuple[Incomplete, Incomplete, Incomplete, list[Incomplete]]]: ...
|
||||
def find_data_files(self, package, src_dir): ...
|
||||
def get_outputs(self, include_bytecode: bool = True) -> list[str]: ... # type: ignore[override]
|
||||
def build_package_data(self) -> None: ...
|
||||
manifest_files: Any
|
||||
def get_output_mapping(self) -> dict[str, str]: ...
|
||||
|
||||
@@ -16,7 +16,7 @@ class easy_install(Command):
|
||||
boolean_options: Incomplete
|
||||
negative_opt: Incomplete
|
||||
create_index: Incomplete
|
||||
user: int
|
||||
user: bool
|
||||
zip_ok: Incomplete
|
||||
install_dir: Incomplete
|
||||
index_url: Incomplete
|
||||
|
||||
@@ -59,10 +59,10 @@ class FileList(_FileList):
|
||||
|
||||
class manifest_maker(sdist):
|
||||
template: str
|
||||
use_defaults: int
|
||||
prune: int
|
||||
manifest_only: int
|
||||
force_manifest: int
|
||||
use_defaults: bool
|
||||
prune: bool
|
||||
manifest_only: bool
|
||||
force_manifest: bool
|
||||
def initialize_options(self) -> None: ...
|
||||
def finalize_options(self) -> None: ...
|
||||
filelist: Incomplete
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from _typeshed import StrPath, Unused
|
||||
from typing import Literal
|
||||
|
||||
from .._distutils.command import install_lib as orig
|
||||
|
||||
@@ -10,9 +9,9 @@ class install_lib(orig.install_lib):
|
||||
self,
|
||||
infile: StrPath,
|
||||
outfile: str,
|
||||
preserve_mode: bool | Literal[0, 1] = 1,
|
||||
preserve_times: bool | Literal[0, 1] = 1,
|
||||
preserve_symlinks: bool | Literal[0, 1] = 0,
|
||||
preserve_mode: bool = True, # type: ignore[override]
|
||||
preserve_times: bool = True, # type: ignore[override]
|
||||
preserve_symlinks: bool = False, # type: ignore[override]
|
||||
level: Unused = 1,
|
||||
): ...
|
||||
def get_outputs(self): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import StrOrBytesPath
|
||||
from shutil import _OnExcCallback
|
||||
|
||||
def shutil_rmtree(path: StrOrBytesPath, ignore_errors: bool = False, onexc: _OnExcCallback | None = None): ...
|
||||
def shutil_rmtree(path: StrOrBytesPath, ignore_errors: bool = False, onexc: _OnExcCallback | None = None) -> None: ...
|
||||
|
||||
@@ -7,7 +7,6 @@ from typing_extensions import Self
|
||||
|
||||
from ..dist import Distribution
|
||||
|
||||
chain_iter: Incomplete
|
||||
_K = TypeVar("_K")
|
||||
_VCo = TypeVar("_VCo", covariant=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user