+
    i                     "  a  R t0 t R t^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RIHt ^ RIHt ]'       d   ^ RIHt ]R,          t]R,          tRR	.tRR
RRRRRRRRRRRRRR/t] ^ k Rt ! R R]4      t]	 ! R R	4      4       tR# ) z2Generate executable scripts, on various platforms.N)Mapping)	dataclassfield)files)TYPE_CHECKING)_scripts)LiteralInvalidScriptScriptzt32.exezt64.exez	t_arm.exezt64-arm.exezw32.exezw64.exez	w_arm.exezw64-arm.exez# -*- coding: utf-8 -*-
import re
import sys
from {module} import {import_name}
if __name__ == "__main__":
    sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
    sys.exit({func_path}())
c                       ] tR t^.tRtRtR# )r	   z=Raised if the user provides incorrect script section or kind. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       B/root/miniconda3/lib/python3.14/site-packages/installer/scripts.pyr	   r	   .   s    Gr   c                      a  ] tR t^2t o Rt   ]! RR7      t V 3R lR ltV 3R lR ltV 3R lR	 lt	]
V 3R
 lR l4       tV 3R lR ltV 3R ltRtV tR# )r
   z7Describes a script based on an entry point declaration.F)reprc                2   < V ^8  d   QhRRRS[ R,          /# )   kindLauncherKindreturnN)bytes)format__classdict__s   "r   __annotate__Script.__annotate__E   s     	5 	5~ 	5%$, 	5r   c                    VR 8X  d   R# V P                   V3p \        V,          p\        \        4      T,          P                  4       #   \         d$    T: R\        \        4      : 2p\	        T4      Rhi ; i)posixNz not in )section_ALLOWED_LAUNCHERSKeyErrorsortedr	   r   r   
read_bytes)selfr   keynameerrors   &&   r   _get_launcher_dataScript._get_launcher_dataE   sx    7?||T"	1%c*D h$&2244  	1gXf-?&@%CDE&D0	1s   A
 
.A8c                *   < V ^8  d   QhRS[ RRRS[ /# r   
executabler   r   r   str)r   r   s   "r   r   r    P   s#     	 	C 	~ 	RU 	r   c                    V P                   R8X  dZ   VR8w  dS   \        P                  P                  V4      w  r4VP	                  RR4      p\        P                  P                  W44      pV# )z~Get an alternate executable for the launcher.

On Windows, when the script section is gui-script, pythonw.exe should be used.
guir"   pythonpythonw)r#   ospathsplitreplacejoin)r(   r0   r   dnfns   &&&  r   _get_alternate_executable Script._get_alternate_executableP   sR    
 <<5 TW_WW]]:.FBHi0Bb-Jr   c                @   < V ^8  d   QhRS[ RRRS[S[ S[3,          /# r/   )r2   tupler   )r   r   s   "r   r   r    [   s+      3 n sEzAR r   c                   V P                  V4      pV P                  W4      pV P                  V\        V4      R7      p\        P                  V P                  V P                  P                  R4      ^ ,          V P                  R7      P                  R4      pVf   V P                  VR,           V,           3# \        P                  ! 4       p\        P                  ! VR4      ;_uu_ 4       pVP                  RV4       RRR4       V P                   R	2pW4,           R,           VP!                  4       ,           p	W3#   + '       g   i     LF; i)
ao  Generate a launcher for this script.

:param executable: Path to the executable to invoke.
:param kind: Which launcher template should be used.
    Valid values are ``"posix"``, ``"win-ia32"``, ``"win-amd64"`` and
    ``"win-arm"``.
:type kind: str

:raises InvalidScript: if no appropriate template is available.
:return: The name and contents of the launcher file.
)forlauncher.)moduleimport_name	func_pathutf-8N   
wz__main__.pyz.exe)r,   r>   _build_shebangbool_SCRIPT_TEMPLATEr   rE   attrr9   encoder*   ioBytesIOzipfileZipFilewritestrgetvalue)
r(   r0   r   launchershebangcodestreamzfr*   datas
   &&&       r   generateScript.generate[   s    **4033JE
%%jd8n%M&&;;		,Q/ii ' 
 &/	 	 99go444__VS))RKKt, *))D!!E)FOO,==z	 *)s   .D??E	c                &   < V ^8  d   QhRS[ RS[/# )r   r0   r   )r   rL   )r   r   s   "r   r   r    {   s     % %% %D %r   c                B    R V 9   d   R# \        V 4      ^,           pV^8*  # )    F)len)r0   shebang_lengths   & r   _is_executable_simpleScript._is_executable_simplez   s(    :Z1, $$r   c                ,   < V ^8  d   QhRS[ RS[RS[/# )r   r0   rC   r   )r2   rL   r   )r   r   s   "r   r   r       s'     M M M4 ME Mr   c                    VP                  R4      pV'       d
   RV,           # V P                  V4      '       d
   RV,           # \        P                  ! V4      P                  R4      pRV,           R,           R,           # )zBuild a shebang line.

The non-launcher cases are taken directly from distlib's implementation,
which tries its best to account for command length, spaces in path, etc.

https://bitbucket.org/pypa/distlib/src/58cd5c6/distlib/scripts.py#lines-124
rH   s   #!s   #!/bin/sh
'''exec' s    "$0" "$@"
s   ' ''')rO   rc   shlexquote)r(   r0   rC   executable_bytesquoteds   &&&  r   rK   Script._build_shebang   sr     &,,W5+++%%&677+++ Z(//8&//AHLLr   c                H   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   R;R&   # )r   r*   rE   rN   ScriptSectionr#   r1   )r   r   s   "r   r   r    2   s6      I	  K  I  0 r   r   N)r   r   r   r   r   r   r#   r,   r>   r\   staticmethodrc   rK   __annotate_func__r   __classdictcell__)r   s   @r   r
   r
   2   sl     A  5 7$%0G
	5 	5	 	 > % %M Me  r   c                p    V ^8  d   Qh/ ^ \         9   d"   \        \        R,          \        3,          ;R&   # )r   r$   )rm   r   )__conditional_annotations__r   rA   r2   )r   s   "r   r   r      s.     8 8.	 	GE"ABCGH 	/ 9r   )r"   win-ia32	win-amd64win-arm	win-arm64)consoler4   )rw   rs   )rw   rt   )rw   ru   )rw   rv   )r4   rs   )r4   rt   )r4   ru   )r4   rv   )rr   r   rP   r7   rg   rR   collections.abcr   dataclassesr   r   importlib.resourcesr   typingr   	installerr   r   r   rm   __all__r$   rM   
ValueErrorr	   r
   r   )rr   s   @r   <module>r      s    8 	 	   # ( %   STL,-M H
% YiKm)-	L  	 HJ H gM gM gMr   