zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
U
W±dh}ã"@s¸UdZddlmZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl mZddlmZej dd¡dkZe jdkZd    ed
<e jd kZe jd kZe jd kZe jdkZe jdkZe jdkZe jdkZe j d¡Z e oúe !¡ddkZ"dZ#e jdkZ$e jdkZ%e j d¡Z&e j d¡Z'e j d¡Z(e j d¡Z)e j d¡Z*e j d¡Z+e&p|e'p|e(p|e)p|e+p|e*Z,e&o’de
 -dg¡kZ.e%rºe/dd „e 0¡d 1d!¡DƒƒndZ2e3e2ƒoÖe2dd"…d#kZ4e3e2ƒoðe2dd"…d$kZ5e4púe5Z6e jdd"…Z7e se$r:d%e7d&e7d'e7d(e7d)e7hZ8nÊe%r`d*d+d,e7dd-e7d.e7hZ8n¤e(r„d/e7d0e7d1e7d2e7hZ8n€e)r¨d3e7d4e7d5e7d6e7hZ8n\e*rÀd7e7d8e7hZ8nDe+rÒd1e7hZ8n2e,rüd5e7d6e7d9e7d2e7d1e7hZ8ne9d:ƒ‚ej: ;e<e d;e<e d<e j=ƒƒ¡Z>d=ed<<e>ej: ;e j=¡kZ?Z@ej: Aej: Be>d>¡¡ZCej: Aej: Be j=d>¡¡ZDe<e d?e jEƒZFe oej: GeF¡dkZHeHrÄej: Be>ej: IeF¡¡ZFej: JeF¡sÄe9d@ƒ‚ejKjLZMejNjOZOejN P¡ZQe rZzddAlRmSZSddBlRmTZTWnXeUk
r,ej dC¡s(e9dDƒ‚Yn.eVk
rXe jWjXd"krRe9dEƒ‚‚YnXe%rve jdkrpdFndGZYn e Y¡dZYe$rŒdHne Z¡ZZee [¡e Z¡ƒZ[dIdJœdKdL„Z\e rîzddl]Z^e\e^jK _dM¡ƒZ#WneVk
rìYnXd½d=dNdOœdPdQ„Z`d=d=dRœdSdT„Zad=dUœdVdW„ZbdddXœd=dNdYdZd[œd\d]„Zcd=d^d_œd`da„Zdddbœd=dNdcddœdedf„Zeddbœd=dNdZdgœdhdi„Zfdjdk„Zgd=dNdlœdmdn„Zhd=dNdlœdodp„ZidIdqœdrds„Zjd¾dtduœdvdw„Zke<e    dwekƒZkd=d=dxœdydz„Zld{d|d}d~dd€dd‚dƒd„d…d†d‡dˆd‰dŠd‹dŒddŽddd‘d’d“d”d•d–d—d˜d™dšd›dœh"Zmes4em nd¡dždŸd d¡d¢d£hZod¤d¥d¦d§d¨hZpd©dªhZqeoepBeqBZrd«d¬d­d®d¯d¦d§hZseresBZtd°d±d°d°d°d°d°d²d²d³d°d´dµd¶d¶d·d¸d¸d¹dºœZud»d¼„ZvdS)¿zp
Various classes and functions to provide some backwards-compatibility with previous versions of Python onward.
é)Ú annotationsN)Ú _pyi_machine)ÚExecCommandFailedZPYINSTALLER_STRICT_COLLECT_MODEÚ0lÚboolÚ    is_64bits)éé)ré©ré)ré)ré    )ré
)ré ÚwinÚ10FÚcygwinÚdarwinÚlinuxÚsunÚaixZfreebsdZopenbsdzhp-uxZmuslZlddccs|]}t|ƒVqdS©N)Úint)Ú.0Úx©rúId:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\PyInstaller/compat.pyÚ    <genexpr>EsrÚ.é)ré)rrzpython%d%d.dllzlibpython%d%d.dllzlibpython%d%dm.dllzlibpython%d.%d.dllzlibpython%d.%dm.dllÚPythonz.PythonzPython%dzlibpython%d.%d.dylibzlibpython%d.%dm.dylibzlibpython%d.%d.azlibpython%d.%dm.azlibpython%d.%d.sozlibpython%d.%dm.sozlibpython%d.%d.so.1zlibpython%d.%dm.so.1zlibpython%d.%d.so.1.0zlibpython%d.%dm.so.1.0zlibpython%d.%d.so.0.0zlibpython%d.%dm.so.0.0zlibpython%d.%dmu.so.1.0z[Your platform is not yet supported. Please define constant PYDYLIB_NAMES for your platform.Ú real_prefixÚ base_prefixÚstrz
conda-metaÚ_base_executablez^PyInstaller cannot locate real python executable belonging to Python from Microsoft App Store!)Ú
pywintypes)Úwin32apiZPYINSTALLER_NO_PYWIN32_FAILUREzoPyInstaller cannot check for assembly dependencies.
Please install pywin32-ctypes.
 
pip install pywin32-ctypes
zÖpycparser, a Windows only indirect dependency of PyInstaller, is incompatible with Python's "discard docstrings" (-OO) flag mode. For more information see:
    https://github.com/pyinstaller/pyinstaller/issues/6345Ú64bitÚ32bitZCygwinzstr | os.PathLike)Úfilenamec    Csfd}tdd„|Dƒƒ}z6t|dƒ}| d¡| |¡}W5QRX| |¡WStk
r`YnXdS)z×
    Check if the given PE file is a Wine DLL (PE-converted built-in, or fake/placeholder one).
 
    Returns True if the given file is a Wine DLL, False if not (or if file cannot be analyzed or does not exist).
    )sWine builtin DLLsWine placeholder DLLcSsg|] }t|ƒ‘qSr)Úlen)rÚsigrrrÚ
<listcomp>észis_wine_dll.<locals>.<listcomp>Úrbé@F)ÚmaxÚopenÚseekÚreadÚ
startswithÚ    Exception)r+Z_WINE_SIGNATURESZ_MAX_LENÚfpÚ    signaturerrrÚ is_wine_dllßs 
 r9Úkernel32z
str | None©ÚnameÚdefaultcCstj ||¡S)zQ
    Returns unicode string containing value of environment variable 'name'.
    )ÚosÚenvironÚgetr;rrrÚgetenvsrA©r<ÚvaluecCs|tj|<dS)zd
    Accepts unicode string and set it as environment variable 'name' containing value 'value'.
    N©r>r?rBrrrÚsetenv srE©r<cCsdtj|<tj|=dS)z1
    Delete the environment variable 'name'.
    ÚNrDrFrrrÚunsetenvs
rH)ÚencodingÚ raise_enoentz bool | Nonezint | bool | list | None)ÚcmdargsrIrJÚkwargsc
OsRtj|fdtji|—Ž}z|jddd}Wnžtk
r¬}zb|rP|jtjkrP‚tdtj    dtdd 
|¡tj    dt|tj    dtdtj    dt d    ƒ|‚W5d
}~XYn tj k
rÊ|  ¡‚YnXz|rÞ| |¡}n
t |¡}Wnbtk
rL}zBtdtj    dtt|ƒtj    dtd tj    dtdtj    d‚W5d
}~XYnX|S) a 
 
    Run the command specified by the passed positional arguments, optionally configured by the passed keyword arguments.
 
    .. DANGER::
       **Ignore this function's return value** -- unless this command's standard output contains _only_ pathnames, in
       which case this function returns the correct filesystem-encoded string expected by PyInstaller. In all other
       cases, this function's return value is _not_ safely usable. Consider calling the general-purpose
       `exec_command_stdout()` function instead.
 
       For backward compatibility, this function's return value non-portably depends on the current Python version and
       passed keyword arguments:
 
       * Under Python 2.7, this value is an **encoded `str` string** rather than a decoded `unicode` string. This value
         _cannot_ be safely used for any purpose (e.g., string manipulation or parsing), except to be passed directly to
         another non-Python command.
       * Under Python 3.x, this value is a **decoded `str` string**. However, even this value is _not_ necessarily
         safely usable:
         * If the `encoding` parameter is passed, this value is guaranteed to be safely usable.
         * Else, this value _cannot_ be safely used for any purpose (e.g., string manipulation or parsing), except to be
           passed directly to another non-Python command. Why? Because this value has been decoded with the encoding
           specified by `sys.getfilesystemencoding()`, the encoding used by `os.fsencode()` and `os.fsdecode()` to
           convert from platform-agnostic to platform-specific pathnames. This is _not_ necessarily the encoding with
           which this command's standard output was encoded. Cue edge-case decoding exceptions.
 
    Parameters
    ----------
    cmdargs :
        Variadic list whose:
        1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the
           command to run.
        2. Optional remaining elements are arguments to pass to this command.
    encoding : str, optional
        Optional keyword argument specifying the encoding with which to decode this command's standard output under
        Python 3. As this function's return value should be ignored, this argument should _never_ be passed.
    raise_enoent : boolean, optional
        Optional keyword argument to simply raise the exception if the executing the command fails since to the command
        is not found. This is useful to checking id a command exists.
 
    All remaining keyword arguments are passed as is to the `subprocess.Popen()` constructor.
 
    Returns
    ----------
    str
        Ignore this value. See discussion above.
    Ústdouté<©Útimeoutrú(----------------------------------------©ÚfilezError running '%s':ú z Error: Executing command failed!Nú.These are the bytes around the offending byte:)Ú
subprocessÚPopenÚPIPEÚ communicateÚOSErrorÚerrnoÚENOENTÚprintÚsysÚstderrÚjoinrÚTimeoutExpiredÚkillÚdecoder>ÚfsdecodeÚUnicodeDecodeErrorr%)rIrJrKrLÚprocÚoutÚerrrÚ exec_command!s21 rizfloat | bool | list | None©rKrLcOs d|kr| d¡tj|f|ŽS)aÎ
    Return the exit code of the command specified by the passed positional arguments, optionally configured by the
    passed keyword arguments.
 
    Parameters
    ----------
    cmdargs : list
        Variadic list whose:
        1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the
           command to run.
        2. Optional remaining elements are arguments to pass to this command.
 
    All keyword arguments are passed as is to the `subprocess.call()` function.
 
    Returns
    ----------
    int
        This command's exit code as an unsigned byte in the range `[0, 255]`, where 0 signifies success and all other
        values signal a failure.
    rI)ÚpoprVÚcallrjrrrÚexec_command_rcrs
rm)rIz(float | str | bytes | bool | list | None)Ú command_argsrIrLcOs0|dk|d<tj|f|Ž}|dkr&|S| |¡S)ap
    Capture and return the standard output of the command specified by the passed positional arguments, optionally
    configured by the passed keyword arguments.
 
    Unlike the legacy `exec_command()` and `exec_command_all()` functions, this modern function is explicitly designed
    for cross-platform portability. The return value may be safely used for any purpose, including string manipulation
    and parsing.
 
    .. NOTE::
       If this command's standard output contains _only_ pathnames, this function does _not_ return the correct
       filesystem-encoded string expected by PyInstaller. If this is the case, consider calling the filesystem-specific
       `exec_command()` function instead.
 
    Parameters
    ----------
    command_args : List[str]
        Variadic list whose:
        1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the
           command to run.
        2. Optional remaining elements are arguments to pass to this command.
    encoding : str, optional
        Optional name of the encoding with which to decode this command's standard output (e.g., `utf8`), passed as a
        keyword argument. If unpassed , this output will be decoded in a portable manner specific to to the current
        platform, shell environment, and system settings with Python's built-in `universal_newlines` functionality.
 
    All remaining keyword arguments are passed as is to the `subprocess.check_output()` function.
 
    Returns
    ----------
    str
        Unicode string of this command's standard output decoded according to the "encoding" keyword argument.
    NÚuniversal_newlines)rVÚ check_outputrc)rIrnrLrMrrrÚexec_command_stdoutŽs& rq)rKrIrLc
Osôtj|fdtjtjdœ|—Ž}z|jdd\}}Wn tjk
rR| ¡‚YnXz2|rp| |¡}| |¡}nt |¡}t |¡}Wn`t    k
ræ}zBt
dt j dt
t |ƒt j dt
dt j dt
dt j d‚W5d}~XYnX|j||fS)    a|
    Run the command specified by the passed positional arguments, optionally configured by the passed keyword arguments.
 
    .. DANGER::
       **Ignore this function's return value.** If this command's standard output consists solely of pathnames, consider
       calling `exec_command()`; otherwise, consider calling `exec_command_stdout()`.
 
    Parameters
    ----------
    cmdargs : str
        Variadic list whose:
        1. Mandatory first element is the absolute path, relative path, or basename in the current `${PATH}` of the
           command to run.
        2. Optional remaining elements are arguments to pass to this command.
    encoding : str, optional
        Optional keyword argument specifying the encoding with which to decode this command's standard output. As this
        function's return value should be ignored, this argument should _never_ be passed.
 
    All remaining keyword arguments are passed as is to the `subprocess.Popen()` constructor.
 
    Returns
    ----------
    (int, str, str)
        Ignore this 3-element tuple `(exit_code, stdout, stderr)`. See the `exec_command()` function for discussion.
    éÿÿÿÿ)ÚbufsizerMr_rNrOrQrRrUN)rVrWrXrYrarbrcr>rdrer]r^r_r%Ú
returncode)rIrKrLrfrgÚerrrhrrrÚexec_command_all¾s6ÿüû
 
rvcCs¶tjg}trvtdkr4t ¡dkr*ddg}qJddg}ntdkrFddg}ng}dtjkrntjd}|d    d
|g7}||}| |¡|     d ¡}|dkržt
ftjŽ}d |d <d |d<||fS)Nr)Zarm64Úarchz-arm64z-x86_64r*z-i386ZDYLD_LIBRARY_PATHz-ezDYLD_LIBRARY_PATH=%sÚenvzUTF-8ZPYTHONIOENCODINGrI) r^Ú
executableÚ    is_darwinÚ architectureÚplatformÚmachiner>r?Úextendr@Údict)ÚargsrLrKZ    py_prefixÚpathrxrrrÚ __wrap_pythonùs( 
 
 
 
 
 
 
 r‚)r€rLcOst||ƒ\}}t||ŽS)z`
    Wrap running python script in a subprocess.
 
    Return stdout of the invoked command.
    )r‚ri©r€rLrKrrrÚ exec_python!sr„cOst||ƒ\}}t||ŽS)zc
    Wrap running python script in a subprocess.
 
    Return exit code of the invoked command.
    )r‚rmrƒrrrÚexec_python_rc+sr…©rcCstj tj |¡¡S)z£
    Replace initial tilde '~' in path with user's home directory, and also expand environment variables
    (i.e., ${VARNAME} on Unix, %VARNAME% on Windows).
    )r>rÚ
expandvarsÚ
expanduserr†rrrÚ expand_path8sr‰z list | None)Úprefixesc Cs–g}tƒ}|dkrtjtjg}|D]n}|r"||kr4q"| |¡tjdkrp| tj     |ddtj
dd…d¡¡q"| |¡| tj     |dd¡¡q"|S)a
    Returns a list containing all global site-packages directories.
 
    For each directory present in ``prefixes`` (or the global ``PREFIXES``), this function finds its `site-packages`
    subdirectory depending on the system environment, and returns a list of full paths.
    Nú/Úlibz python%d.%dr z site-packages) Úsetr^ÚprefixÚ exec_prefixÚaddr>ÚsepÚappendrr`Ú version_info)rŠÚ sitepackagesÚseenrŽrrrÚgetsitepackagesAs  
 
(
r–)r<ÚpathnamecCstj ||¡}| ¡Sr)Ú    importlibÚ    machineryÚSourceFileLoaderÚ load_module)r<r—Z
mod_loaderrrrÚimportlib_load_sourceasrœÚ_collections_abcÚ _weakrefsetÚabcÚcodecsÚ collectionsÚcopyregÚ    encodingsÚenumÚfnmatchÚ    functoolsÚ genericpathÚioÚheapqÚkeywordÚ    linecacheÚlocaleÚntpathÚoperatorr>ÚpathlibÚ    posixpathÚreÚreprlibÚ sre_compileÚ sre_constantsÚ    sre_parseÚstatÚtokenÚtokenizeÚ    tracebackÚtypesÚurllibÚweakrefÚwarningsÚ _bootlocaleÚ SourceModuleÚCompiledModuleÚPackageÚNamespacePackageÚ FlatPackageÚ ArchiveModuleÚ    AliasNodeÚ BuiltinModuleÚ RuntimeModuleÚRuntimePackageÚScriptÚ    ExtensionÚExtensionPackageÚ    BadModuleÚExcludedModuleÚInvalidSourceModuleÚInvalidCompiledModuleÚ MissingModuleZPYMODULEZPYSOURCEZ    EXTENSIONZBUILTINÚbadZexcludedÚinvalidÚmissingZruntimeÚBINARY)rÅrÉr¿rÀrÁrÃrÄrÊrËrÆrÂrÌrÍrÎrÏrÐrÇrÈzdoes not occurc    CsÂtjdkrtdƒ‚tr(ddlm}m}nddlm}m}dD]f}z ||ƒ}Wn|k
rdYq<YnXtrndndtj    ›d|›}t
d    |›d
|  d ¡›d |›d ƒ‚q<t r¾t  d¡dkr¾t
dƒ‚dS)zp
    Verify that all requirements to run PyInstaller are met.
 
    Fail hard if any requirement is not met.
    r z,PyInstaller requires at Python 3.7 or newer.r)Ú distributionÚPackageNotFoundError)Zenum34Útypingr¯z conda removeú"z" -m pip uninstall zThe 'z' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package (located in rGz ) using
    z
then try again.ZobjdumpNzŒOn Linux, objdump is required. It is typically provided by the 'binutils' package installable via your Linux distribution's package manager.)r^r“ÚEnvironmentErrorÚis_py38Úimportlib.metadatarÕrÖZimportlib_metadataÚis_condaryÚ
SystemExitZ locate_fileÚis_linuxÚshutilÚwhich)rÕrÖr<ÚdistÚremoverrrÚcheck_requirementsàs$
 
ÿÿrã)N)N)wÚ__doc__Ú
__future__rr[Zimportlib.machineryr˜Zimportlib.utilr>r|ÚsiterVr^rßZPyInstaller._shared_with_wafrZPyInstaller.exceptionsrr?r@Zstrict_collect_modeÚmaxsizerÚ__annotations__r“Zis_py35Zis_py36Zis_py37rÚZis_py39Zis_py310Zis_py311r5Zis_winÚ    win32_verZ    is_win_10Z is_win_wineZ    is_cygwinrzrÞZis_solarZis_aixZ
is_freebsdZ
is_openbsdZis_hpuxZis_unixÚ    getoutputZis_muslÚtupleÚmac_verÚsplitZ
_macos_verrZis_macos_11_compatZis_macos_11_nativeZ is_macos_11Z_pyverZ PYDYLIB_NAMESrÝrÚabspathÚgetattrrŽr$Zis_venvZ is_virtualenvÚisdirr`rÜZ is_pure_condaryZpython_executableÚgetsizeZis_ms_app_storeÚbasenameÚexistsÚutilÚ MAGIC_NUMBERZBYTECODE_MAGICr™ÚEXTENSION_SUFFIXESÚ all_suffixesZ ALL_SUFFIXESZwin32ctypes.pywin32r'r(Ú ImportErrorr6ÚflagsÚoptimizer{Úsystemr}r9Ú ctypes.utilÚctypesÚ find_libraryrArErHrirmrqrvr‚r„r…r‰r–rœZPY3_BASE_MODULESrZPURE_PYTHON_MODULE_TYPESZSPECIAL_MODULE_TYPESZBINARY_MODULE_TYPESZVALID_MODULE_TYPESZBAD_MODULE_TYPESZALL_MODULE_TYPESZMODULE_TYPES_TO_TOC_DICTrãrrrrÚ<module> s¸   
 
 
 
 
 
 
 
 
      "* 
 û
üüü û &ÿ
 ÿÿ     ÿQÿ0;(
       Þ%
ø ù þ õ è