+
    VBi                       a  R t0 t R t^ RIt^ RIt^ RIt^ RIHt ^ RIHtH	t	H
t
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 ltR R lt ! R R]4      t ! R R4      tR# )"z2Generate executable scripts, on various platforms.N)read_binary)TYPE_CHECKINGMappingOptionalTuple)_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                0    V ^8  d   QhR\         R\        /# )   
executablereturn)bytesbool)formats   "6/usr/lib/python3.14/site-packages/installer/scripts.py__annotate__r   +   s     ! !e ! !    c                 B    R V 9   d   R# \        V 4      ^,           pV^8*  # )    F)len)r   shebang_lengths   & r   _is_executable_simpler   +   s(    z_q(N S  r   c                <    V ^8  d   QhR\         R\        R\        /# )r   r   forlauncherr   )strr   r   )r   s   "r   r   r   5   s&     I Is I I% Ir   c                    V P                  R4      pV'       d
   RV,           # \        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
utf-8s   #!s   #!/bin/sh
'''exec' s    "$0" "$@"
s   ' ''')encoder   shlexquote)r   r   executable_bytesquoteds   &&  r   _build_shebangr$   5   sl     "((1'''-..''' [[$++G4F"V+o=HHr   c                       ] tR t^Nt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&   r   r   r	   r	   N   s    Gr   c                   p   a  ] tR t^Rt o RtR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t	R
t
V tR# )r
   z7Describes a script based on an entry point declaration.c          
      4   < V ^8  d   QhRS[ RS[ RS[ RRRR/# )r   namemoduleattrsectionScriptSectionr   Nr   )r   __classdict__s   "r   r   Script.__annotate__W   s5      !$,/:I	r   c                6    Wn         W n        W0n        W@n        R# )a@  Construct a Script object.

:param name: name of the script
:param module: module path, to load the entry point from
:param attr: final attribute access, for the entry point
:param section: Denotes the "entry point section" where this was specified.
    Valid values are ``"gui"`` and ``"console"``.
:type section: str

Nr/   r0   r1   r2   )selfr/   r0   r1   r2   s   &&&&&r   __init__Script.__init__W   s     		r   c                    < V ^8  d   QhRS[ /# )r   r   r4   )r   r5   s   "r   r   r6   i   s     
 
# 
r   c                d    R P                  V P                  V P                  V P                  4      # )z(Script(name={!r}, module={!r}, attr={!r})r   r/   r0   r1   )r9   s   &r   __repr__Script.__repr__i   s*    9@@IIKKII
 	
r   c                4   < V ^8  d   QhRRRS[ S[,          /# )r   kindLauncherKindr   )r   r   )r   r5   s   "r   r   r6   p   s     	+ 	+~ 	+(5/ 	+r   c                    VR 8X  d   R# V P                   V3p \        V,          p\        \        T4      #   \         d#    T: R\        \        4      : 2p\	        T4      hi ; i)posixNz not in )r2   _ALLOWED_LAUNCHERSKeyErrorsortedr	   r   r   )r9   rA   keyr/   errors   &&   r   _get_launcher_dataScript._get_launcher_datap   sk    7?||T"	'%c*D 8T**  	'gXf-?&@%CDE&&	's	   6 -A#c                @   < V ^8  d   QhRS[ RRRS[S[ S[3,          /# )r   r   rA   rB   r   )r   r   r   )r   r5   s   "r   r   r6   {   s+      3 n sEzAR r   c                v   V P                  V4      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.
)r   .)r0   import_name	func_pathr   N   
wz__main__.pyz.exe)rJ   r$   r   _SCRIPT_TEMPLATEr   r0   r1   splitr   r/   ioBytesIOzipfileZipFilewritestrgetvalue)
r9   r   rA   launchershebangcodestreamzfr/   datas
   &&&       r   generateScript.generate{   s     **40 hH&&;;		,Q/ii ' 
 &/	 	 IIw566__VS))RKKt, *))D!!E)FOO,==|	 *)s   D((D8	)r1   r0   r/   r2   Nr8   )r'   r(   r)   r*   r+   	__slots__r:   r>   rJ   ra   r,   __classdictcell__)r5   s   @r   r
   r
   R   s5     A5I $
 
	+ 	+ r   c                p    V ^8  d   Qh/ ^ \         9   d"   \        \        R,          \        3,          ;R&   # )r   rE   )r3   rB   )__conditional_annotations__r   r   r   )r   s   "r   r   r      s.     8 8(	 	GE"ABCGH 	) 9r   )rD   win-ia32	win-amd64win-arm	win-arm64)consolegui)rk   rg   )rk   rh   )rk   ri   )rk   rj   )rl   rg   )rl   rh   )rl   ri   )rl   rj   )rf   r+   rU   r    rW   importlib.resourcesr   typingr   r   r   r   	installerr   r   rB   r3   __all__rE   rS   r   r$   
ValueErrorr	   r
   r   )rf   s   @r   <module>rr      s    8 	   + : : STL,-M H
% YiKm)-	L  	 !I2HJ HE Er   