mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 03:41:28 +08:00
Bump pyinstaller to 6.0.* (#10800)
This commit is contained in:
@@ -1,2 +1 @@
|
||||
PyInstaller\.utils\.win32\.versioninfo\.\w+?
|
||||
PyInstaller\.utils\.win32\.winmanifest\.\w+?
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
version = "5.13.*"
|
||||
version = "6.0.*"
|
||||
upstream_repository = "https://github.com/pyinstaller/pyinstaller"
|
||||
requires = ["types-setuptools"]
|
||||
requires_python = ">=3.8"
|
||||
|
||||
@@ -13,7 +13,6 @@ from PyInstaller.building.build_main import Analysis
|
||||
from PyInstaller.building.datastruct import Target, _TOCTuple
|
||||
from PyInstaller.building.splash import Splash
|
||||
from PyInstaller.utils.win32.versioninfo import VSVersionInfo
|
||||
from PyInstaller.utils.win32.winmanifest import Manifest
|
||||
|
||||
if sys.platform == "darwin":
|
||||
_TargetArch: TypeAlias = Literal["x86_64", "arm64", "universal2"]
|
||||
@@ -22,9 +21,9 @@ if sys.platform == "darwin":
|
||||
_CodesignIdentityParam: TypeAlias = str | None
|
||||
else:
|
||||
_TargetArch: TypeAlias = None
|
||||
_SuportedTargetArchParam: TypeAlias = object
|
||||
_SuportedTargetArchParam: TypeAlias = Unused
|
||||
_CodesignIdentity: TypeAlias = None
|
||||
_CodesignIdentityParam: TypeAlias = object
|
||||
_CodesignIdentityParam: TypeAlias = Unused
|
||||
|
||||
if sys.platform == "win32":
|
||||
_Icon: TypeAlias = list[StrPath] | str
|
||||
@@ -34,18 +33,18 @@ elif sys.platform == "darwin":
|
||||
_IconParam: TypeAlias = StrPath | list[StrPath] | None
|
||||
else:
|
||||
_Icon: TypeAlias = None
|
||||
_IconParam: TypeAlias = object
|
||||
_IconParam: TypeAlias = Unused
|
||||
|
||||
if sys.platform == "win32":
|
||||
_VersionSrc: TypeAlias = VSVersionInfo | None
|
||||
_VersionParam: TypeAlias = VSVersionInfo | StrOrBytesPath | None
|
||||
_Manifest: TypeAlias = Manifest
|
||||
_ManifestParam: TypeAlias = Manifest | None
|
||||
_Manifest: TypeAlias = bytes
|
||||
_ManifestParam: TypeAlias = str | None
|
||||
else:
|
||||
_VersionSrc: TypeAlias = None
|
||||
_VersionParam: TypeAlias = object
|
||||
_VersionParam: TypeAlias = Unused
|
||||
_Manifest: TypeAlias = None
|
||||
_ManifestParam: TypeAlias = object
|
||||
_ManifestParam: TypeAlias = Unused
|
||||
|
||||
class PYZ(Target):
|
||||
name: str
|
||||
@@ -60,6 +59,7 @@ class PKG(Target):
|
||||
xformdict: ClassVar[dict[str, str]]
|
||||
toc: list[_TOCTuple]
|
||||
cdict: Mapping[str, bool]
|
||||
python_lib_name: str
|
||||
name: str
|
||||
exclude_binaries: bool
|
||||
strip_binaries: bool
|
||||
@@ -71,6 +71,7 @@ class PKG(Target):
|
||||
def __init__(
|
||||
self,
|
||||
toc: Iterable[_TOCTuple],
|
||||
python_lib_name: str,
|
||||
name: str | None = None,
|
||||
cdict: Mapping[str, bool] | None = None,
|
||||
exclude_binaries: bool = False,
|
||||
|
||||
@@ -3,7 +3,7 @@ from collections.abc import Iterable, Sequence
|
||||
from typing import ClassVar
|
||||
from typing_extensions import Literal, LiteralString, Self, SupportsIndex, TypeAlias
|
||||
|
||||
_TypeCode: TypeAlias = Literal["DATA", "BINARY", "EXTENSION", "OPTION"]
|
||||
_TypeCode: TypeAlias = Literal["DEPENDENCY", "SYMLINK", "DATA", "BINARY", "EXECUTABLE", "EXTENSION", "OPTION"]
|
||||
_TOCTuple: TypeAlias = tuple[str, str | None, _TypeCode | None]
|
||||
|
||||
class TOC(list[_TOCTuple]):
|
||||
@@ -44,3 +44,4 @@ class Tree(Target, list[_TOCTuple]):
|
||||
|
||||
def normalize_toc(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
|
||||
def normalize_pyz_toc(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
|
||||
def toc_process_symbolic_links(toc: Iterable[_TOCTuple]) -> list[_TOCTuple]: ...
|
||||
|
||||
@@ -9,8 +9,8 @@ strict_collect_mode: bool
|
||||
is_64bits: Final[bool]
|
||||
is_py35: Final = True
|
||||
is_py36: Final = True
|
||||
is_py37: Final[bool]
|
||||
is_py38: Final[bool]
|
||||
is_py37: Final = True
|
||||
is_py38: Final = True
|
||||
is_py39: Final[bool]
|
||||
is_py310: Final[bool]
|
||||
is_py311: Final[bool]
|
||||
|
||||
@@ -5,11 +5,9 @@ from collections.abc import Callable, Iterable
|
||||
from typing import Any
|
||||
from typing_extensions import Final, Literal
|
||||
|
||||
import pkg_resources
|
||||
from PyInstaller import HOMEPATH as HOMEPATH
|
||||
from PyInstaller.depend.imphookapi import PostGraphAPI
|
||||
from PyInstaller.utils.hooks import conda
|
||||
from PyInstaller.utils.hooks.win32 import get_pywin32_module_file_attribute as get_pywin32_module_file_attribute
|
||||
|
||||
conda_support = conda
|
||||
|
||||
@@ -27,11 +25,9 @@ def remove_file_extension(filename: str) -> str: ...
|
||||
def can_import_module(module_name: str) -> bool: ...
|
||||
def get_module_attribute(module_name: str, attr_name: str) -> Any: ...
|
||||
def get_module_file_attribute(package: str) -> str | None: ...
|
||||
def is_module_satisfies(
|
||||
requirements: Iterable[str] | pkg_resources.Requirement,
|
||||
version: str | pkg_resources.Distribution | None = None,
|
||||
version_attr: str = "__version__",
|
||||
) -> bool: ...
|
||||
def get_pywin32_module_file_attribute(module_name: str) -> str | None: ...
|
||||
def check_requirement(requirement: str) -> bool: ...
|
||||
def is_module_satisfies(requirements: str, version: None = None, version_attr: None = None) -> bool: ...
|
||||
def is_package(module_name: str) -> bool: ...
|
||||
def get_all_package_paths(package: str) -> list[str]: ...
|
||||
def package_base_path(package_path: str, package: str) -> str: ...
|
||||
@@ -58,11 +54,10 @@ def collect_system_data_files(
|
||||
) -> list[tuple[str, str]]: ...
|
||||
def copy_metadata(package_name: str, recursive: bool = False) -> list[tuple[str, str]]: ...
|
||||
def get_installer(module: str) -> str | None: ...
|
||||
def requirements_for_package(package_name: str) -> list[str]: ...
|
||||
def collect_all(
|
||||
package_name: str,
|
||||
include_py_files: bool = True,
|
||||
filter_submodules: Callable[[str], bool] | None = None,
|
||||
filter_submodules: Callable[[str], bool] = ...,
|
||||
exclude_datas: Iterable[str] | None = None,
|
||||
include_datas: Iterable[str] | None = None,
|
||||
on_error: Literal["ignore", "warn once", "warn", "raise"] = "warn once",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
def get_pywin32_module_file_attribute(module_name: str) -> str | None: ...
|
||||
@@ -1,127 +0,0 @@
|
||||
from _typeshed import Incomplete, ReadableBuffer, Unused
|
||||
from typing import IO, AnyStr, overload
|
||||
from typing_extensions import Literal
|
||||
from xml.dom.minidom import Document as _Document, Element as _Element, Node
|
||||
|
||||
def getChildElementsByTagName(self: Node, tagName: str) -> list[Element]: ...
|
||||
def getFirstChildElementByTagName(self: Node, tagName: str) -> Element | None: ...
|
||||
|
||||
class Document(_Document):
|
||||
cE = _Document.createElement
|
||||
cT = _Document.createTextNode
|
||||
aChild = _Document.appendChild
|
||||
getEByTN = _Document.getElementsByTagName
|
||||
getCEByTN = getChildElementsByTagName
|
||||
getFCEByTN = getFirstChildElementByTagName
|
||||
|
||||
class Element(_Element):
|
||||
getA = _Element.getAttribute
|
||||
remA = _Element.removeAttribute
|
||||
setA = _Element.setAttribute
|
||||
aChild = _Element.appendChild
|
||||
getEByTN = _Element.getElementsByTagName
|
||||
getCEByTN = getChildElementsByTagName
|
||||
getFCEByTN = getFirstChildElementByTagName
|
||||
|
||||
# Used by other types referenced in https://pyinstaller.org/en/stable/spec-files.html#spec-file-operation
|
||||
class Manifest:
|
||||
filename: Incomplete
|
||||
optional: Incomplete
|
||||
manifestType: Incomplete
|
||||
manifestVersion: Incomplete
|
||||
noInheritable: Incomplete
|
||||
noInherit: Incomplete
|
||||
type: Incomplete
|
||||
name: Incomplete
|
||||
language: str | None
|
||||
processorArchitecture: Incomplete
|
||||
version: Incomplete
|
||||
publicKeyToken: Incomplete
|
||||
applyPublisherPolicy: Incomplete
|
||||
description: Incomplete
|
||||
requestedExecutionLevel: Incomplete
|
||||
uiAccess: Incomplete
|
||||
dependentAssemblies: Incomplete
|
||||
bindingRedirects: Incomplete
|
||||
files: Incomplete
|
||||
comInterfaceExternalProxyStubs: Incomplete
|
||||
def __init__(
|
||||
self,
|
||||
manifestType: str = "assembly",
|
||||
manifestVersion: Incomplete | None = None,
|
||||
noInheritable: bool = False,
|
||||
noInherit: bool = False,
|
||||
type_: Incomplete | None = None,
|
||||
name: Incomplete | None = None,
|
||||
language: str | None = None,
|
||||
processorArchitecture: Incomplete | None = None,
|
||||
version: Incomplete | None = None,
|
||||
publicKeyToken: Incomplete | None = None,
|
||||
description: Unused = None,
|
||||
requestedExecutionLevel: Incomplete | None = None,
|
||||
uiAccess: Incomplete | None = None,
|
||||
dependentAssemblies: Incomplete | None = None,
|
||||
files: Incomplete | None = None,
|
||||
comInterfaceExternalProxyStubs: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __eq__(self, other: Manifest | str) -> bool: ... # type: ignore[misc]
|
||||
@overload
|
||||
def __eq__(self, other: object) -> Literal[False]: ...
|
||||
@overload
|
||||
def __ne__(self, other: Manifest | str) -> bool: ... # type: ignore[misc]
|
||||
@overload
|
||||
def __ne__(self, other: object) -> Literal[True]: ...
|
||||
def add_dependent_assembly(
|
||||
self,
|
||||
manifestVersion: Incomplete | None = None,
|
||||
noInheritable: bool = False,
|
||||
noInherit: bool = False,
|
||||
type_: Incomplete | None = None,
|
||||
name: Incomplete | None = None,
|
||||
language: str | None = None,
|
||||
processorArchitecture: Incomplete | None = None,
|
||||
version: Incomplete | None = None,
|
||||
publicKeyToken: Incomplete | None = None,
|
||||
description: Incomplete | None = None,
|
||||
requestedExecutionLevel: Incomplete | None = None,
|
||||
uiAccess: Incomplete | None = None,
|
||||
dependentAssemblies: Incomplete | None = None,
|
||||
files: Incomplete | None = None,
|
||||
comInterfaceExternalProxyStubs: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
def add_file(
|
||||
self,
|
||||
name: str = "",
|
||||
hashalg: str = "",
|
||||
hash: str = "",
|
||||
comClasses: Incomplete | None = None,
|
||||
typelibs: Incomplete | None = None,
|
||||
comInterfaceProxyStubs: Incomplete | None = None,
|
||||
windowClasses: Incomplete | None = None,
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def get_winsxs_dir(cls) -> str: ...
|
||||
@classmethod
|
||||
def get_manifest_dir(cls) -> str: ...
|
||||
@classmethod
|
||||
def get_policy_dir(cls) -> str: ...
|
||||
def get_policy_redirect(self, language: str | None = None, version: Incomplete | None = None) -> Incomplete: ...
|
||||
def find_files(self, ignore_policies: bool = True) -> list[Incomplete]: ...
|
||||
def getid(self, language: str | None = None, version: Incomplete | None = None) -> str: ...
|
||||
def getlanguage(self, language: str | None = None, windowsversion: Incomplete | None = None) -> str: ...
|
||||
def getpolicyid(self, fuzzy: bool = True, language: str | None = None, windowsversion: Incomplete | None = None) -> str: ...
|
||||
def load_dom(self, domtree: Document | Element, initialize: bool = True) -> None: ...
|
||||
def parse(self, filename_or_file: str | IO[AnyStr], initialize: bool = True) -> None: ...
|
||||
def parse_string(self, xmlstr: ReadableBuffer | str, initialize: bool = True) -> None: ...
|
||||
def same_id(self, manifest: Manifest, skip_version_check: bool = False) -> bool: ...
|
||||
def todom(self) -> Document: ...
|
||||
def toprettyxml(self, indent: str = " ", newl: str = ..., encoding: str = "UTF-8") -> str: ...
|
||||
def toxml(self, encoding: str = "UTF-8") -> str: ...
|
||||
def update_resources(self, dstpath: str, names: Incomplete | None = None, languages: Incomplete | None = None) -> None: ...
|
||||
def writeprettyxml(
|
||||
self, filename_or_file: str | IO[AnyStr] | None = None, indent: str = " ", newl: str = ..., encoding: str = "UTF-8"
|
||||
) -> None: ...
|
||||
def writexml(
|
||||
self, filename_or_file: str | IO[AnyStr] | None = None, indent: Unused = " ", newl: Unused = ..., encoding: str = "UTF-8"
|
||||
) -> None: ...
|
||||
Reference in New Issue
Block a user