+
     h::  c                  s   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIHt ^ RIHtHtHt ^ RIt^ RIHt ^ RIHt ]'       d   ^ RItMN]
P0                  P3                  R4      '       d   ^ RIHu Hu Hu Ht M]
P8                  ]P>                  ,          t] t!]'       d   ^ RI"H#t# . R!Ot$R"R lt%]PL                  R"R l4       t']PL                  R 4       t(]PL                  R 4       t)]PL                  R 4       t* ! R R]+4      t, ! R R4      t-]PL                  R 4       t.R t/]PL                  R 4       t0]PL                  R 4       t10 R#mt2R t3R t4R t5 ! R R	4      t6]7! ]R4      '       d   ]Pp                  .t9M. t9 ! R R
]64      t:]Pv                  ! ]Px                  RP{                  4        U u. uF  p ]>! ]V ^ 4      NK  	  up 4      t? ! R  R]4      t@R# u up i )$    )annotationsN)TracebackType)TYPE_CHECKINGAnyClassVar)working_set)DistutilsErrorZjava)SelfAbstractSandboxDirectorySandboxSandboxViolationc                s    Rp\        W4      ;_uu_ 4       pVP                  4       pRRR4       Vf   Tp\        XV R4      p\        WaV4       R#   + '       g   i     L1; i)z&
Python 3 implementation of execfile.
rbNexec)openZreadZcompiler   )ZfilenameZglobalslocalsmodeZstreamZscriptZcodes   &&&    7/usr/lib/python3.14/site-packages/setuptools/sandbox.py	_execfiler   *   sQ     D	h		 
~68V,D 
	s   AA 	c              #  s   "   \         P                  R ,          pV e   V \         P                  R &    Vx  V\         P                  R &   R#   T\         P                  R &   i ; i5iNNNN)sysargv)Zreplsaved   & r   	save_argvr   7   sI     HHQKEes   /A#A A#A  A#c               #  s   "   \         P                  R ,          p  V x  V \         P                  R &   R#   T \         P                  R &   i ; i5ir   )r   pathr       r   	save_pathr   B   s6     HHQKEes   A4 AA		Ac              #  s   "   \         P                  ! V RR7       \        P                  pV \        n         Rx  V\        n        R#   T\        n        i ; i5i)zD
Monkey-patch tempfile.tempdir with replacement, ensuring it exists
T)Zexist_okN)osZmakedirstempfileZtempdir)Zreplacementr   r   r   override_tempr    K   s@     
 KKd+E"H! 5s   4AA AAAc              #  s   "   \         P                  ! 4       p\         P                  ! V 4        Vx  \         P                  ! V4       R #   \         P                  ! T4       i ; i5iN)r   getcwdchdir)Ztargetr   r   r   pushdr$   \   s<     IIKEHHV
s   ,A&A A&A##A&c                  s*    ] tR t^ftRt]R 4       tRtR# )UnpickleableExceptionzH
An exception representing another Exception that could not be pickled.
c           	     s     \         P                  ! V 4      \         P                  ! V4      3#   \         d*    ^ RIHp TP                  Y"! \        T4      4      4      u # i ; i)zq
Always return a dumped (pickled) type and exc. If exc can't be pickled,
wrap it in UnpickleableException first.
)r%   )pickleZdumps	Exceptionsetuptools.sandboxr%   dumpZrepr)typeexcZcls   && r   r)   ZUnpickleableException.dumpk   sO    	1<<%v||C'888 	1G88CT#Y00		1s   +. 1A"!A" N)__name__
__module____qualname____firstlineno____doc__Zstaticmethodr)   __static_attributes__r-       r   r%   r%   f   s     1 1r4   r%   c                  s8    ] tR t^ztRtR R ltR R ltR tRtR# )	ExceptionSaverzQ
A Context Manager that will save an exception, serialize, and restore it
later.
c                   V ^8  d   QhRR/# )   returnr   r-   format   "r   __annotate__ExceptionSaver.__annotate__   s      4 r4   c                	s    V # r!   r-   self   &r   	__enter__ZExceptionSaver.__enter__   s    r4   c               s(    V ^8  d   QhRRRRRRRR/# )	r7   r*   type[BaseException] | Noner+   BaseException | NonetbTracebackType | Noner8   Zboolr-   r9   r;   r   r<   r=      s2      ( " !	
 
r4   c                	sZ    V'       g   R # \         P                  W4      V n        W0n        R# )FT)r%   r)   _saved_tb)r?   r*   r+   rD      &&&&r   __exit__ZExceptionSaver.__exit__   s(      ,00; r4   c                s    R\        V 4      9  d   R# \        \        P                  V P                  4      w  rVP                  V P                  4      h)z"restore and re-raise any exceptionrF   N)ZvarsZmapr&   ZloadsrF   Zwith_tracebackrG   )r?   Z_typer+   s   &  r   resumeZExceptionSaver.resume   s>     4:%t{{3
  **r4   )rF   rG   N)	r.   r/   r0   r1   r2   rA   rI   rJ   r3   r-   r4   r   r5   r5   z   s    
 +r4   r5   c               #  sX  a"   \         P                  P                  4       o\        4       ;_uu_ 4       p Sx  RRR4       \         P                  P	                  S4       V3R l\         P                   4       p\        V4       X P                  4        R#   + '       g   i     Lf; i5i)z
Context in which imported modules are saved.

Translates exceptions internal to the context into the equivalent exception
outside the context.
Nc              3  sl   <"   T F)  pVS9  g   K  VP                  R 4      '       d   K%  Vx  K+  	  R# 5i)z
encodings.N
startswith).0mod_namer      & r   	<genexpr>Zsave_modules.<locals>.<genexpr>   s7      #H5  	 ##L1	 	#s   	44
4)r   modulesZcopyr5   Zupdate_clear_modulesrJ   )Z	saved_excZdel_modulesr   s     @r   save_modulesrS      st      KKE			Y 
 KKuK ; 
	s   1B*BAB*B'	"B*c                sL    \        V 4       F  p\        P                  V K  	  R # r!   )listr   rQ   )Zmodule_namesrN   r   r   rR   rR      s    &KK! 'r4   c               #  s   "   \         P                  ! 4       p  V x  \         P                  ! V 4       R #   \         P                  ! T 4       i ; i5ir!   )pkg_resourcesZ__getstate__Z__setstate__r   r   r   save_pkg_resources_staterV      s9     &&(E*""5)""5)s   A5 AAAc              #  s  "   \         P                  P                  V R 4      p\        4       ;_uu_ 4        \	        4       ;_uu_ 4        \        4       ;_uu_ 4        \        4        \        4       ;_uu_ 4        \        V4      ;_uu_ 4        \        V 4      ;_uu_ 4        \        R4       Rx  RRR4       RRR4       RRR4       RRR4       RRR4       RRR4       R#   + '       g   i     L:; i  + '       g   i     LE; i  + '       g   i     LP; i  + '       g   i     L[; i  + '       g   i     Lf; i  + '       g   i     R# ; i5i)Ztemp
setuptoolsN)r   r   joinrV   rS   r   hide_setuptoolsr   r    r$   Z
__import__)	setup_dirZtemp_dirr   r   setup_contextr[      s     ww||Iv.H	!	#	#^^![[&x00"9--&|4! . 1 !   
$	# .- 10 ![  ^ 
$	#	#s   3EED.	D8DC5 C"0C58D DD.	E
E"C2-C55D DDDD+&D.	.D>9EE		Ec                sF    V P                  R^4      ^ ,          pV\        9   # )a  
>>> _needs_hiding('setuptools')
True
>>> _needs_hiding('pkg_resources')
True
>>> _needs_hiding('setuptools_plugin')
False
>>> _needs_hiding('setuptools.__init__')
True
>>> _needs_hiding('distutils')
True
>>> _needs_hiding('os')
False
>>> _needs_hiding('Cython')
True
Z.)split_MODULES_TO_HIDE)rN   Zbase_moduler   r   _needs_hidingr^      s%    " ..a(+K***r4   c                 s    \         P                  P                  RR4      p V e   V P                  4        \	        \
        \         P                  4      p\        V4       R# )a  
Remove references to setuptools' modules from sys.modules to allow the
invocation to import the most appropriate setuptools. This technique is
necessary to avoid issues such as #315 where setuptools upgrading itself
would fail to find a function declared in the metadata.
_distutils_hackN)r   rQ   ZgetZ_remove_shimZfilterr^   rR   )r_   rQ   s     r   rY   rY      sC     kkoo&7>O"$$&]CKK0G7r4   c           	     s   \         P                  P                  \         P                  P                  V 4      4      p\	        V4      ;_uu_ 4         V .\        V4      ,           \        P                  R&   \        P                  P                  ^ V4       \        P                  ! 4        \        P                  P                  R 4       \        V4      ;_uu_ 4        \        V RR7      p\        W4       RRR4       RRR4       R#   + '       g   i     L; i  \          d7   pTP"                  '       d   TP"                  ^ ,          '       d   h  Rp?LYRp?ii ; i  + '       g   i     R# ; i)z8Run a distutils setup script, sandboxed in its directoryr   c                s"    V P                  4       # r!   )Zactivate)Zdistr@   r   Z<lambda>Zrun_setup.<locals>.<lambda>
  s
    dmmor4   Z__main__)Z__file__r.   N)r   r   ZabspathZdirnamer[   rT   r   r   Zinsertr   __init__Z	callbacksZappendr
   dictr   Z
SystemExitargs)Zsetup_scriptrb   rZ   ZnsZvs   &&   r   	run_setuprc     s     =>I	y	!	!	'.4:5CHHQKHHOOAy)  "!!(()EF!),,<*E,+ - 
"	! -,  	vvv!&&))	 
"	!	!s[   E BDD		7D	DDE DE'*EEE EE  E1	c                  s    ] tR tRtRtRtR R ltR tR R ltR	 R
 lt	R t
R R ltR F$  t]! ]]4      '       g   K  ]! ]4      ]! 4       ]&   K&  	  RR R llt]! R]4      tR F$  t]! ]]4      '       g   K  ]! ]4      ]! 4       ]&   K&  	  R R ltR  F$  t]! ]]4      '       g   K  ]! ]4      ]! 4       ]&   K&  	  R R ltR! F$  t]! ]]4      '       g   K  ]! ]4      ]! 4       ]&   K&  	  R tR tR tR t]'       d   R R ltRtR# RtR# )"r	   i  zDWrap 'os' module and 'open()' builtin for virtualizing setup scriptsFc               r6   r7   r8   ZNoner-   r9   r;   r   r<   AbstractSandbox.__annotate__  s     
 
$ 
r4   c                	s    \        \        4       Uu. uF1  pVP                  R 4      '       d   K  \        W4      '       g   K/  VNK3  	  upV n        R# u upi )Z_N)Zdir_osrL   hasattr_attrsr?   namer   r   r`   ZAbstractSandbox.__init__  sG     C
 ??3' ,3D,? D 
 
s   AAAc           	     	s`    V P                    F  p\        \        V\        W4      4       K  	  R # r!   )rh   Zsetattrr   getattr)r?   Zsourcerj   r,   r   _copyZAbstractSandbox._copy!  s!    KKDBgf34  r4   c               r6   rd   r-   r9   r;   r   r<   re   %  s      4 r4   c                	s`    V P                  V 4       V P                  \        n        R V n        R# )TN)rl   _openbuiltinsr   _activer>   r@   r   rA   ZAbstractSandbox.__enter__%  s     

4

r4   c               s$    V ^8  d   QhRRRRRR/# )r7   exc_typerB   	exc_valuerC   	tracebackrE   r-   r9   r;   r   r<   re   *  s(      , ( (	r4   c                	s\    R V n         \        \        n        V P	                  \
        4       R# )FN)ro   rm   rn   r   rl   rf   )r?   rp   rq   rr   rH   r   rI   ZAbstractSandbox.__exit__*  s     

3r4   c                sb    V ;_uu_ 4        V! 4       uuRRR4       #   + '       g   i     R# ; i)zRun 'func' under os sandboxingNr-   )r?   Zfunc   &&r   runZAbstractSandbox.run4  s    T6 TTTs   .	c               r6   r7   rj   strr-   r9   r;   r   r<   re   9  s      C r4   c                	8   a a \        \        S 4      oV V3R  lpV# )c                sr   < V P                   '       d   V P                  ! SW.VO5/ VB w  rS! W.VO5/ VB # r!   )ro   _remap_pair)r?   srcdstrb   kwrj   originals   &&&*,r   wrapZ3AbstractSandbox._mk_dual_path_wrapper.<locals>.wrap<  s?    |||++D#HTHRHC2t2r22r4   rk   rf   rj   r}   r|      f @r   _mk_dual_path_wrapperZ%AbstractSandbox._mk_dual_path_wrapper9  s    3%	3
 r4   Nc               r6   ru   r-   r9   r;   r   r<   re   G  s      c r4   c                	sL   a a S;'       g    \        \        S 4      oV V3R  lpV# )c                sn   < V P                   '       d   V P                  ! SV.VO5/ VB pS! V.VO5/ VB # r!   )ro   _remap_inputr?   r   rb   r{   rj   r|      &&*,r   r}   Z5AbstractSandbox._mk_single_path_wrapper.<locals>.wrapJ  s=    |||((tAdAbAD.4.2..r4   r~   )rj   r|   r}   s   ff r   _mk_single_path_wrapperZ'AbstractSandbox._mk_single_path_wrapperG  s#    11wsD1	/
 r4   r   c               r6   ru   r-   r9   r;   r   r<   re   j  s     	 	S 	r4   c                	rw   )c                s   < V P                   '       d4   V P                  ! SV.VO5/ VB pV P                  SS! V.VO5/ VB 4      # S! V.VO5/ VB # r!   )ro   r   _remap_outputr   r   r   r}   Z4AbstractSandbox._mk_single_with_return.<locals>.wrapm  s_    |||((tAdAbA))$0K0K0KLLD.4.2..r4   r~   r   r   r   _mk_single_with_returnZ&AbstractSandbox._mk_single_with_returnj  s    3%	/ r4   c               r6   ru   r-   r9   r;   r   r<   re   y  s     	 	 	r4   c                	rw   )c                s`   < S! V/ VB pV P                   '       d   V P                  SV4      # V# r!   )ro   r   )r?   rb   r{   Zretvalrj   r|   s   &*, r   r}   Z'AbstractSandbox._mk_query.<locals>.wrap|  s3    t*r*F|||))$77Mr4   r~   r   r   r   	_mk_queryZAbstractSandbox._mk_queryy  s    3%	 r4   c                s    V# )z=Called to remap or validate any path, whether input or outputr-   )r?   r   rs   r   _validate_pathZAbstractSandbox._validate_path  s    r4   c                $    V P                  V4      # zCalled for path inputsr   r?   	operationr   rb   r{      &&&*,r   r   ZAbstractSandbox._remap_input      ""4((r4   c                r   )zCalled for path outputsr   )r?   r   r   s   &&&r   r   ZAbstractSandbox._remap_output  r   r4   c                sz    V P                   ! VR,           V.VO5/ VB V P                   ! VR,           V.VO5/ VB 3# )?Called for path pairs like rename, link, and symlink operationsz-fromz-to)r   r?   r   ry   rz   rb   r{      &&&&*,r   rx   ZAbstractSandbox._remap_pair  sL     i'13DDDi%/BtBrB
 	
r4   c               s     V ^8  d   QhRRRR/# )r7   rj   rv   r8   r   r-   r9   r;   r   r<   re     s    9999r4   c                	s    R # r!   r-   ri   rs   r   __getattribute__Z AbstractSandbox.__getattribute__  s    cr4   )ro   rh   )ZrenameZlinkZsymlinkr!   )ZstatZlistdirr#   r   chmodchownmkdirremoveunlinkrmdirutimelchownchrootZlstatZ	startfilemkfifomknodZpathconfZaccess)Zreadlinktempnam)r"   tmpnam)r.   r/   r0   r1   r2   ro   r`   rl   rA   rI   rt   r   Z_AbstractSandbox__namerg   rf   r   r   rm   r   r   r   r   r   rx   r   r   r3   r-   r4   r   r	   r	     s   NG
5

 034V<FHV 0 $FE2E* 36v>FHV-0	 *35f=FHV *	 '3(0FHV '))
  	:9 r4   devnullc                  s    ] tR tRt$ Rt]P                  . RO4      tR]R&   . t	R]R&    ]
3R R lltR	 tRR
 ltR R ltR tR tR tR tRR R lltRtR# )r
   i  z<Restrict operations to a single subdirectory - pseudo-chrootzClassVar[dict[str, None]]	write_opszlist[str | re.Pattern]_exception_patternsc               r6   rd   r-   r9   r;   r   r<   DirectorySandbox.__annotate__  s     ' '4 'r4   c                	s   \         P                  P                  \         P                  P                  V4      4      V n        \         P                  P                  V P                  R 4      V n        V Uu. uF?  p\         P                  P                  \         P                  P                  V4      4      NKA  	  upV n        \        P                  V 4       R# u upi )Z N)
r   r   normcaserealpath_sandboxrX   _prefix_exceptionsr	   r`   )r?   ZsandboxZ
exceptionsr   s   &&& r   r`   ZDirectorySandbox.__init__  s    (()9)9')BCww||DMM26AK
AKBGGRWW--d34
 	  &
s   5ACc                	s     ^ RI Hp V! WV4      h)r    )r   )r(   r   )r?   r   rb   r{   r   s   &&*, r   
_violationZDirectorySandbox._violation  s    7y33r4   c                	s    VR9  d/   V P                  V4      '       g   V P                  ! RW.VO5/ VB  \        W.VO5/ VB # )rr   )r   Zrtr   ZrUZU)_okr   rm   )r?   r   r   rb   r{   r   r   rm   ZDirectorySandbox._open  sD    33DHHTNNOOFD<<<T-$-"--r4   c               r6   rd   r-   r9   r;   r   r<   r     s     " " "r4   c                	s(    V P                  R 4       R# )r   N)r   r>   r@   r   r   ZDirectorySandbox.tmpnam  s    !r4   c                	sZ   V P                   p R V n         \        P                  P                  \        P                  P	                  V4      4      pV P                  V4      ;'       g2    W0P                  8H  ;'       g    VP                  V P                  4       W n         #   Y n         i ; i)F)	ro   r   r   r   r   	_exemptedr   rL   r   )r?   r   Zactiver   s   &&  r   r   ZDirectorySandbox._ok  s    		" DLww''(8(8(>?Hx( 5 5}},5 5&&t||4 "L6Ls   AB" )B" ?B" "B*c                	s   a V3R  lV P                    4       pV3R lV P                   4       p\        P                  ! W#4      p\	        V4      # )c              3  sF   <"   T F  pSP                  V4      x  K  	  R # 5ir!   rK   )rM   Z	exceptionfilepathrO   r   rP   -DirectorySandbox._exempted.<locals>.<genexpr>  s#      
<LyH	**<Ls   !c              3  sR   <"   T F  p\         P                  ! VS4      x  K  	  R # 5ir!   )reZmatch)rM   Zpatternr   rO   r   rP   r     s#      
7OGBHHWh''7Os   $')r   r   	itertoolsZchainZany)r?   r   Zstart_matchesZpattern_matchesZ
candidatess   &f   r   r   ZDirectorySandbox._exempted  sG    
<@<L<L

7;7O7O
 __]D
:r4   c                s    WP                   9   dL   V P                  V4      '       g5   V P                  ! V\        P                  P                  V4      .VO5/ VB  V# r   )r   r   r   r   r   r   r   r   r   r   ZDirectorySandbox._remap_input  sD    &txx~~OOIrww'7'7'=KKKr4   c                s    V P                  V4      '       d   V P                  V4      '       g   V P                  ! WV.VO5/ VB  W#3# )r   )r   r   r   r   r   rx   ZDirectorySandbox._remap_pair  s;    xx}}DHHSMMOOIC=$="=zr4   c               s     V ^8  d   QhRRRR/# )r7   r   Zintr8   r-   r9   r;   r   r<   r     s     8 8c 83 8r4   c                s    V\         ,          '       d0   V P                  V4      '       g   V P                  ! RWV.VO5/ VB  \        P                  ! WV.VO5/ VB # )zCalled for low-level os.open()zos.open)WRITE_FLAGSr   r   rf   r   )r?   ZfileZflagsr   rb   r{   r   r   r   ZDirectorySandbox.open  sN    ;txx~~OOItDF4F2FxxT7D7B77r4   )ro   r   r   r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   )r   )i  )r.   r/   r0   r1   r2   ra   Zfromkeysr   Z__annotations__r   _EXCEPTIONSr`   r   rm   r   r   r   r   rx   r   r3   r-   r4   r   r
   r
     sf    F+/== : ,I(   35/44+6 '4
.
""8 8r4   z4O_WRONLY O_RDWR O_APPEND O_CREAT O_TRUNC O_TEMPORARYc                  sf    ] tR tRtRt]P                  ! R4      P                  4       tR R lt	Rt
R# )r   i  zEA setup script attempted to modify the filesystem outside the sandboxa  
        SandboxViolation: {cmd}{args!r} {kwargs}

        The package setup script has attempted to modify files on your system
        that are not within the EasyInstall build area, and has been aborted.

        This package cannot be safely installed by EasyInstall, and may not
        support alternate installation locations even if you run its setup
        script by hand.  Please inform the package's author and the EasyInstall
        maintainers to find out if a fix or workaround is available.
        c               r6   )r7   r8   rv   r-   r9   r;   r   r<   ZSandboxViolation.__annotate__  s     , , ,r4   c                	sh    V P                   w  rpV P                  P                  ! R/ \        4       B # )Nr-   )rb   tmplr:   r   )r?   Zcmdrb   Zkwargss   &   r   __str__ZSandboxViolation.__str__  s*     II6yy+&(++r4   r-   N)r.   r/   r0   r1   r2   textwrapZdedentZlstripr   r   r3   r-   r4   r   r   r     s.    O??
	 fh 	, ,r4   )r	   r
   r   rc   r!   >   ZCythonZ	distutilsrW   rU   r_   )AZ
__future__r   rn   Z
contextlibZ	functoolsr   Zoperatorr   r&   r   r   r   r   Ztypesr   Ztypingr   r   r   rU   r   Zdistutils.errorsr   rf   ZplatformrL   Z$org.python.modules.posix.PosixModuleZpythonrQ   ZposixZPosixModulerj   r   rm   Ztyping_extensionsr   Z__all__r   Zcontextmanagerr   r   r    r$   r'   r%   r5   rS   rR   rV   r[   r]   r^   rY   rc   r	   rg   r   r   r
   ZreduceZor_r\   rk   r   r   )Zas   0r   <module>r      s   "      	  	 
    / /  % +\\V$$66
++bgg
C &
      ! !   1I 1( +  +F  2"
 * * " " +*(I: I:X 2y::,KKR8 R8j LL HMMOOA 	QO,~ ,s   	G0
