zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
U
X±d“ã@sddlmZdd„ZdS)é)ÚisolatedcCsNtjdd„ƒ}t|tƒr tdƒ‚| |j¡| ¡D]\}}| ||¡q4dS)aÜ
    Add the `six.moves` module as a dynamically defined runtime module node and all modules mapped by
    `six._SixMetaPathImporter` as aliased module nodes to the passed graph.
 
    The `six.moves` module is dynamically defined at runtime by the `six` module and hence cannot be imported in the
    standard way. Instead, this hook adds a placeholder node for the `six.moves` module to the graph,
    which implicitly adds an edge from that node to the node for its parent `six` module. This ensures that the `six`
    module will be frozen into the executable. (Phew!)
 
    `six._SixMetaPathImporter` is a PEP 302-compliant module importer converting imports independent of the current
    Python version into imports specific to that version (e.g., under Python 3, from `from six.moves import
    tkinter_tix` to `import tkinter.tix`). For each such mapping, this hook adds a corresponding module alias to the
    graph allowing PyInstaller to translate the former to the latter.
    csddl‰‡fdd„ˆjDƒS)z¤
        Generate a dictionary from conventional module names to "six.moves" attribute names (e.g., from `tkinter.tix` to
        `six.moves.tkinter_tix`).
        rNcs,i|]$}t|ˆjˆjfƒr|jd|j“qS)z
six.moves.)Ú
isinstanceÚ MovedModuleÚMovedAttributeÚmodÚname)Ú.0Úmoved©Úsix©únd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\PyInstaller/hooks/pre_safe_import_module/hook-six.moves.pyÚ
<dictcomp>*sÿzKpre_safe_import_module.<locals>.real_to_six_module_name.<locals>.<dictcomp>)r Ú_moved_attributesr r r
r Úreal_to_six_module_names
þz7pre_safe_import_module.<locals>.real_to_six_module_namez1pre-safe-import-module hook failed, needs fixing.N)    rÚcallrÚstrÚ
SystemExitZadd_runtime_packageÚ module_nameÚitemsZadd_alias_module)ÚapirZreal_module_nameÚsix_module_namer r r Úpre_safe_import_modules
 
 rN)Z PyInstallerrrr r r r Ú<module> s