
    q"hH                     j   S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKJ	r	  SSK
JrJrJr  SSKJr  SSKJrJrJrJrJrJr  \R.                  " \5      rSR5                  5       r\R8                  " S	5      rS
r\R>                  S:X  d   \R>                  S:X  a  \R@                  S:X  at  \RC                  SS5      S    r"\" \"5      RG                  S5       V s0 s H<  n U R>                  RI                  S5      (       d  M%  U R>                  U RJ                  _M>     sn r&S r'\'r( " S S\)5      r*gs  sn f )    )BytesION)ZipInfo   )	sysconfigdetect_encodingZipFile)finder)FileOperatorget_export_entryconvert_pathget_executableget_platformin_venva  
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>s   ^#!.*pythonw?[0-9.]*([ 	].*)?$z# -*- coding: utf-8 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
ntjava. .exec                     SU ;   am  U R                  S5      (       a<  U R                  SS5      u  pSU;   a   UR                  S5      (       d
  U< SU< S3n U $ U R                  S5      (       d  SU -  n U $ )N z/usr/bin/env r   "z "z"%s")
startswithsplit)
executableenv_executables      M/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/distlib/scripts.pyenquote_executabler   G   s    
j
   11)//Q7Ck!+*@*@*E*E*-{;
  ((--#j0
    c                   j   \ rS rSrSr\rSrSS jrS r	\
R                  R                  S5      (       a  S rS rS	 rSS
 jrS r\rS rS rSrS rSS jrS r\S 5       r\R8                  S 5       r\R<                  S:X  d   \R<                  S:X  a  \R>                  S:X  a  S r SS jr!SS jr"Sr#g)ScriptMaker[   zS
A class to copy or create scripts from source scripts or callable
specifications.
Nc                    Xl         X l        X0l        SU l        SU l        [
        R                  S:H  =(       d-    [
        R                  S:H  =(       a    [
        R                  S:H  U l        [        S5      U l
        U=(       d    [        U5      U l        [
        R                  S:H  =(       d-    [
        R                  S:H  =(       a    [
        R                  S:H  U l        [        R                  U l        g )NFposixr   )r   X.Yr   )
source_dir
target_diradd_launchersforceclobberosname_nameset_modesetvariantsr
   _fileop_is_ntsysversion_info)selfr&   r'   r(   dry_runfileops         r   __init__ScriptMaker.__init__d   s    $$*
G+[F1B1ZrxxSZGZK(6g!6ggoQ"''V*;*PD@P,,r   c                     UR                  SS5      (       ac  U R                  (       aR  [        R                  R	                  U5      u  p4UR                  SS5      n[        R                  R                  X45      nU$ )NguiFpythonpythonw)getr2   r+   pathr   replacejoin)r5   r   optionsdnfns        r   _get_alternate_executable%ScriptMaker._get_alternate_executabler   sU    ;;ue$$WW]]:.FBHi0Bb-Jr   r   c                      [        U5       nUR                  S5      S:H  sSSS5        $ ! , (       d  f       g= f! [        [        4 a    [        R                  SU5         gf = f)zH
Determine if the specified executable is a script
(contains a #! line)
   z#!NzFailed to open %sF)openreadOSErrorIOErrorloggerwarning)r5   r   fps      r   	_is_shellScriptMaker._is_shell{   sR    
*%771:- &%%W% 2J?s#   < +	< 
9< < &A%$A%c                     U R                  U5      (       a5  SS KnUR                  R                  R	                  S5      S:X  a  U$  SU-  $ UR                  5       R                  S5      (       a  U$ SU-  $ )Nr   zos.nameLinuxz
jython.exez/usr/bin/env %s)rP   r   langSystemgetPropertylowerendswith)r5   r   r   s      r   _fix_jython_executable"ScriptMaker._fix_jython_executable   sw    ~~j))99##//	:gE%% F
 %z11 !!#,,\::!!$z11r   c                 >   [         R                  S:w  a  SnO\[        [        SS5      (       a  SnOC[	        U5      [	        U5      -   S-   n[        R
                  S:X  a  SnOSnS	U;  =(       a    XE:*  nU(       a  S
U-   U-   S-   nU$ SnUSU-   U-   S-   -  nUS-  nU$ )a  
Build a shebang line. In the simple case (on Windows, or a shebang line
which is not too long or contains spaces) use a simple formulation for
the shebang. Otherwise, use /bin/sh as the executable, with a contrived
shebang which allows the script to run either under Python or sh, using
suitable quoting. Thanks to Harald Nordgren for his input.

See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
          https://hg.mozilla.org/mozilla-central/file/tip/mach
r$   Tcross_compilingF   darwini          s   #!   
s
   #!/bin/sh
s	   '''exec' s    "$0" "$@"
s   ' '''
)r+   r,   getattrr3   lenplatform)r5   r   post_interpsimple_shebangshebang_lengthmax_shebang_lengthresults          r   _build_shebangScriptMaker._build_shebang   s     77g!NS+U33
 #N !_s;/??!CN||x'%("%("#:5aN<`NZ'+5=F
  $FlZ/+=OOFj Fr   c                    SnU R                   (       a  U R                   nSnGOD[        R                  " 5       (       d  [        5       nGO[	        5       (       aL  [
        R                  R                  [        R                  " S5      S[        R                  " S5      -  5      nO[
        R                  S:X  aL  [
        R                  R                  [        R                  " S5      S[        R                  " S5      -  5      nOc[
        R                  R                  [        R                  " S5      S[        R                  " S	5      < [        R                  " S5      < 35      nU(       a  U R                  XS5      n[        R                  R                  S
5      (       a  U R                  U5      nU(       a  [!        U5      nUR#                  S5      n[        R                  S:X  a  SU;  a  SU;  a  US-  nU R%                  XR5      n UR'                  S5        US:w  a   UR'                  U5        U$ U$ ! [(         a    [+        SU-  5      ef = f! [(         a    [+        SU< SU< S35      ef = f)NTFscriptszpython%sEXEr   BINDIRr<   VERSIONr   utf-8cliz	-X:Framesz-X:FullFramess
    -X:Framesz,The shebang (%r) is not decodable from utf-8zThe shebang (z-) is not decodable from the script encoding ())r   r   is_python_buildr   r   r+   r?   rA   get_pathget_config_varr,   rE   r3   rd   r   rY   r   encoderj   decodeUnicodeDecodeError
ValueError)r5   encodingre   rB   enquoter   shebangs          r   _get_shebangScriptMaker._get_shebang   s   ??JG**,,')JYYi&8&8&CZR[RjRjkpRqEqrJww$  WW\\)*B*B8*L*4	8P8PQV8W*XZ
  WW\\,,X6$-$<$<Y$GIaIabgIhik
 77
LJ<<""6**44Z@J +J7J  &&w/
LLE!k&D{2=(K%%j>	WNN7# wXx( w " 	WKgUVV	W & X DKX"W X XXs   H< 'I <II7c                     U R                   [        UR                  UR                  R	                  S5      S   UR                  S9-  $ )Nr   r   )moduleimport_namefunc)script_templatedictprefixsuffixr   )r5   entrys     r   _get_script_textScriptMaker._get_script_text   sB    ##d<<U\\-?-?-DQ-Gell'\ \ 	\r   c                 ^    [         R                  R                  U5      nU R                  U-  $ N)r+   r?   basenamemanifest)r5   exenamebases      r   get_manifestScriptMaker.get_manifest   s%    ww(}}t##r   c                    U R                   =(       a    U R                  nU(       d  X#-   nOUS:X  a  U R                  S5      nOU R                  S5      n[        5       n[	        US5       n	[
        R                  R                  S5      n
U
(       a>  [        R                  " [        U
5      5      S S n[        SUS9nU	R                  X5        OU	R                  SU5        S S S 5        UR                  5       nXr-   U-   nU GHk  n[
        R                  R                  U R                   U5      nU(       a\  [
        R                  R#                  U5      u  nnUR%                  S5      (       a  UnS	U-  n U R&                  R)                  X5        OU R                  (       a"  UR9                  SU-   5      (       d	  U< SU< 3n[
        R                  R1                  U5      (       a*  U R:                  (       d  [,        R/                  SU5        GM  U R&                  R)                  X5        U R<                  (       a  U R&                  R?                  U/5        URA                  U5        GMn     g ! , (       d  f       GN= f! [*         a    [,        R/                  S
5        SU-  n[
        R                  R1                  U5      (       a  [
        R2                  " U5        [
        R4                  " UU5        U R&                  R)                  X5        [,        R7                  S5         [
        R2                  " U5         N! [*         a      Nf = ff = f)NpytwSOURCE_DATE_EPOCH   z__main__.py)filename	date_timez.pyz%s.exez:Failed to write executable - trying to use .deleteme logicz%s.deletemez0Able to replace executable using .deleteme logicr   zSkipping existing file %s)!r(   r2   _get_launcherr   r   r+   environr>   timegmtimeintr   writestrgetvaluer?   rA   r'   splitextr   r1   write_binary_file	ExceptionrM   rN   existsremoverenamedebugrX   r*   r.   set_executable_modeappend)r5   namesr}   script_bytes	filenamesextuse_launcherlauncherstreamzfsource_date_epochr   zinfozip_datar,   outnamenedfnames                      r   _write_scriptScriptMaker._write_script  sz   ))9dkk"1Ld{--c2--c2YF%$&JJNN3F$G!$ $C0A,B CBQ GI#]iPEKK4KK|< & (H#-8LDggll4??D9Gww''01<<&&G"W,LL227I" ;;w'7'7c	'B'B)0#6G77>>'**4<<NN#>H..wE==LL44gY?W%C  &%& ! NN $9 :*W4Fww~~f--		&)IIgv.LL227ILL "3 4		&)$ s8   +A7I48J4
JB%M,M
MMMM-c                 h   [        5       nSU R                  ;   a  UR                  U5        SU R                  ;   a$  UR                  U< U R                  S   < 35        SU R                  ;   aB  UR                  U< U R                  < U R                  S   < SU R                  S   < 35        U$ )Nr   Xr   r%   r   r   )r/   r0   addr4   variant_separator)r5   r,   ri   s      r   get_script_filenames ScriptMaker.get_script_filenames<  s    JJt$--JJt'8'8';<=DMM!JJdD,B,BDDUDUVWDXZ^ZkZklmZnopr   c                    SnU(       a>  UR                  S/ 5      nU(       a%  SSR                  U5      -  nUR                  S5      nU R                  SXCS9nU R	                  U5      R                  S5      nU R                  UR                  5      nU(       a  UR                  SS5      (       a  S	n	OS
n	U R                  XXrU	5        g )Nr   interpreter_argsz %sr   rq   rB   r;   Fpywr   )r>   rA   rw   r~   r   r   r,   r   )
r5   r   r   rB   re   argsr}   scriptscriptnamesr   s
             r   _make_scriptScriptMaker._make_scriptF  s    ;;126Dsxx~-"kk'2##G[#J&&u-44W=//

;w{{5%00CC;CHr   c                 ~   Sn[         R                  R                  U R                  [	        U5      5      n[         R                  R                  U R
                  [         R                  R                  U5      5      nU R                  (       d7  U R                  R                  X5      (       d  [        R                  SU5        g  [        US5      nUR                  5       nU(       d  [        R                  SU5        g [        R!                  UR#                  SS5      5      nU(       a  SnUR%                  S5      =(       d    S	nU(       dq  U(       a  UR+                  5         U R                  R-                  X5        U R.                  (       a  U R                  R1                  U/5        UR3                  U5        g [        R5                  S
XR
                  5        U R                  R(                  (       d  [7        UR                  5      u  pUR9                  S5        U R;                  U	W5      nSW;   a  SnOSn[         R                  R                  U5      nU R=                  U/XR?                  5       X,5        U(       a  UR+                  5         g g ! [&         a    U R(                  (       d  e S n GNsf = f)NFznot copying %s (up-to-date)rbz%s is an empty file (skipping)s   
ra   Tr   r   zcopying and adjusting %s -> %sr   s   pythonwr   r   ) r+   r?   rA   r&   r   r'   r   r)   r1   newerrM   r   rI   readlinerN   FIRST_LINE_REmatchr@   grouprL   r6   close	copy_filer.   r   r   infor   seekr~   r   rJ   )r5   r   r   adjustr   f
first_liner   re   r{   linesr}   r   r   s                 r   _copy_scriptScriptMaker._copy_scriptV  s   doo|F/CD'',,t0@0@0HIzz$,,"4"4V"E"ELL6?
	4VT"A J?H!''
(:(:7E(JKE#kk!n3	LL""63}}00';W%KK8&//R<<''"1!**"=q	++HkB+CCGG$$W-""A39J	 E  	<<A	s   J J<;J<c                 .    U R                   R                  $ r   r1   r6   )r5   s    r   r6   ScriptMaker.dry_run  s    ||###r   c                 $    XR                   l        g r   r   )r5   values     r   r6   r     s    $r   r   c                     [         R                  " S5      S:X  a  SnOSn[        5       S:X  a  SOSnU< U< U< S3nU[        ;  a  S	U< S
[        < 3n[        U5      e[        U   $ )NP   6432z	win-arm64z-armr   r   zUnable to find resource z in package )structcalcsizer   WRAPPERSDISTLIB_PACKAGErz   )r5   kindbitsplatform_suffixr,   msgs         r   r   ScriptMaker._get_launcher  sa    s#q((4+(Ef2O#'?D8#o/ o%D>!r   c                 l    / n[        U5      nUc  U R                  X5        U$ U R                  XCUS9  U$ )a  
Make a script.

:param specification: The specification, which is either a valid export
                      entry specification (to make a script from a
                      callable) or a filename (to make a script by
                      copying from a source location).
:param options: A dictionary of options controlling script generation.
:return: A list of all absolute pathnames written to.
r   )r   r   r   )r5   specificationrB   r   r   s        r   makeScriptMaker.make  sI     	 /=m7  e@r   c                 \    / nU H#  nUR                  U R                  XB5      5        M%     U$ )z
Take a list of specifications and make scripts from them,
:param specifications: A list of specifications.
:return: A list of all absolute pathnames written to,
)extendr   )r5   specificationsrB   r   r   s        r   make_multipleScriptMaker.make_multiple  s0     	+MTYY}>? ,r   )
r1   r2   r(   r*   r)   r.   r&   r'   r0   r4   )TFN)r   Nr   )$__name__
__module____qualname____firstlineno____doc__SCRIPT_TEMPLATEr   r   r8   rE   r3   rd   r   rP   rY   rj   r~   r   _DEFAULT_MANIFESTr   r   r   r   r   r   r   propertyr6   setterr+   r,   r-   r   r   r   __static_attributes__ r   r   r!   r!   [   s     &OJ- ||v&&
	
	2"H@D\ !H$5&n I 0d $ $ ^^% % 
ww$277f,T1A	"&	r   r!   )+ior   loggingr+   rer   r3   r   zipfiler   compatr   r   r   	resourcesr	   utilr
   r   r   r   r   r   	getLoggerr   rM   stripr   compiler   r   r,   r-   rsplitr   iteratorrX   bytesr   r   _enquote_executableobjectr!   )rs   0r   <module>r     s     	 	  
   7 7  g g			8	$  uw! & 

=>" 77d?rww&(RXX-= ooc1-a0O (11"55A66??6" 	5H" ) d& d7s   $D0D0