MCPcopy Index your code
hub / github.com/pyinstaller/pyinstaller / initialize

Method initialize

hatch_build.py:26–46  ·  view source on GitHub ↗
(self, version, build_data)

Source from the content-addressed store, hash-verified

24
25class CustomBuildHook(BuildHookInterface):
26 def initialize(self, version, build_data):
27 # Inject the platform specifier into the wheel's filename.
28 if os.environ.get("PYI_WHEEL_TAG"):
29 build_data["tag"] = "py3-none-" + os.environ["PYI_WHEEL_TAG"]
30
31 pyi_platform = os.environ.get("PYI_PLATFORM")
32 if pyi_platform:
33 if "Darwin" in pyi_platform:
34 icons = ["icns"]
35 elif "Windows" in pyi_platform:
36 icons = ["ico"]
37 else:
38 icons = []
39 else:
40 icons = ["ico", "icns"]
41
42 build_data["artifacts"] += [
43 f"PyInstaller/bootloader/{pyi_platform or '*'}/*",
44 *(f"PyInstaller/bootloader/images/*.{suffix}" for suffix in icons),
45 ]
46 self.run()
47
48 def bootloader_exists(self):
49 # Checks if the console, non-debug bootloader exists

Callers 2

_compile_dylibFunction · 0.80
check_python_headersFunction · 0.80

Calls 1

runMethod · 0.95

Tested by 1

_compile_dylibFunction · 0.64