diff --git a/stubs/pyinstaller/@tests/stubtest_allowlist.txt b/stubs/pyinstaller/@tests/stubtest_allowlist.txt index 626c29c3ef15..f04987c54a02 100644 --- a/stubs/pyinstaller/@tests/stubtest_allowlist.txt +++ b/stubs/pyinstaller/@tests/stubtest_allowlist.txt @@ -43,7 +43,6 @@ PyInstaller.utils.hooks.django PyInstaller.utils.hooks.gi PyInstaller.utils.hooks.qt PyInstaller.utils.hooks.setuptools -PyInstaller.utils.hooks.tcl_tk PyInstaller.utils.misc PyInstaller.utils.osx PyInstaller.utils.run_tests diff --git a/stubs/pyinstaller/PyInstaller/building/splash.pyi b/stubs/pyinstaller/PyInstaller/building/splash.pyi index 506def4b1888..d7723bc76f53 100644 --- a/stubs/pyinstaller/PyInstaller/building/splash.pyi +++ b/stubs/pyinstaller/PyInstaller/building/splash.pyi @@ -1,6 +1,7 @@ from _typeshed import StrPath from PyInstaller.building.datastruct import Target, _TOCTuple +from PyInstaller.utils.hooks.tcl_tk import TclTkInfo # Referenced in https://pyinstaller.org/en/stable/spec-files.html#example-merge-spec-file # Not to be imported during runtime, but is the type reference for spec files which are executed as python code @@ -42,4 +43,7 @@ class Splash(Target): always_on_top: bool = True, ) -> None: ... def assemble(self) -> None: ... + # This private method is the only way to match Splash Screen support validation without triggering an actual build + @staticmethod + def _check_tcl_tk_compatibility(tcltk_info: TclTkInfo) -> None: ... def generate_script(self) -> str: ... diff --git a/stubs/pyinstaller/PyInstaller/utils/hooks/tcl_tk.pyi b/stubs/pyinstaller/PyInstaller/utils/hooks/tcl_tk.pyi new file mode 100644 index 000000000000..1a3f196f8f02 --- /dev/null +++ b/stubs/pyinstaller/PyInstaller/utils/hooks/tcl_tk.pyi @@ -0,0 +1,20 @@ +from typing import Final + +class TclTkInfo: + TCL_ROOTNAME: Final = "_tcl_data" + TK_ROOTNAME: Final = "_tk_data" + def __init__(self) -> None: ... + available: bool + tkinter_extension_file: str | None + tcl_version: tuple[int, int] | None + tk_version: tuple[int, int] | None + tcl_threaded: bool + tcl_data_dir: str | None + tk_data_dir: str | None + tcl_module_dir: str | None + is_macos_system_framework: bool + tcl_shared_library: str | None + tk_shared_library: str | None + data_files: list[tuple[str, str, str]] + +tcltk_info: TclTkInfo