+
    Îiz                    Z   ^ RI t ^ RIHt ^ RIt^ RIt^ 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t^ RIt ^ RIt^ RIt^RIHt ^RIHtHtHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/ ]
P`                  ! ]14      t2]Pf                  ! R4      t4]Pf                  ! R4      t5]Pf                  ! R4      t6]Pf                  ! R	4      t7]Pf                  ! R
4      t8]Pf                  ! R4      t9]Pf                  ! R4      t:]Pf                  ! R4      t;R t<R t=R t>R t?R t@RhR ltAR tBR tCR tD]P                  R 4       tF]P                  R 4       tG]P                  RiR l4       tH ! R R]I4      tJR tK ! R R]I4      tLR tM ! R  R!]I4      tN]Pf                  ! R"]P                  4      tPR# tQRjR$ ltRRkR% ltSR& tTR' tUR( tVR) tW]Pf                  ! R*]P                  4      tY]Pf                  ! R+4      tZRjR, lt[]Pf                  ! R-4      t\R. t]R/ t^R0 t_R1t`R2 taR3 tb ! R4 R5]I4      tc ! R6 R7]I4      td ! R8 R9]I4      teRltfRmR: ltgR; thRnti ! R< R=]I4      tj]Pf                  ! R>4      tk]Pf                  ! R?4      tl]Pf                  ! R@4      tmRA tRB tn]'       d7   ^RCIHotpHqtqHrtr  ! RD RE]$P                  4      ts ! RF RG]p4      to ! RH RI]o]&4      tt ! RJ RK]%P                  4      tu]'       d    ! RL RM]%P                  4      tv ! RN RO]%P                  4      twRP tx ! RQ RR]I4      ty ! RS RT]y4      tz ! RU RV]y4      t{ ! RW RX]'4      t| ! RY RZ]I4      t}R[ t~ ! R\ R]]I4      tR^ tR_ tR` tRaRbRcRdReRf/tRg tR#   ] d    Rt EL]i ; i  ] d	    ^ RIt ELVi ; i)o    N)deque)iglob)DistlibException)string_types	text_typeshutil	raw_inputStringIOcache_from_sourceurlopenurljoinhttplib	xmlrpclibHTTPHandlerBaseConfiguratorvalid_ident	ContainerconfigparserURLErrorZipFilefsdecodeunquoteurlparsez^([\w\.-]+)\s*z^([\w\.*+-]+)\s*z^(<=?|>=?|={2,3}|[~!]=)\s*z*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*z^or\b\s*z	^and\b\s*z(\S+)\s*z(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)c                F   aaaa R oVV3R loV3R loV3R loS! V 4      # )aM  
Parse a marker string and return a dictionary containing a marker expression.

The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
the expression grammar, or strings. A string contained in quotes is to be
interpreted as a literal string, and a string not contained in quotes is a
variable (such as os_name).
c                 L   \         P                  V 4      pV'       d-   VP                  4       ^ ,          pWP                  4       R p W 3# V '       g   \	        R4      hV ^ ,          pVR9  d   \	        RV ,          4      hRP                  VR4      pV R,          p V.pV '       d   V ^ ,          V8X  d   MV ^ ,          V8X  d   VP                  V4       V R,          p KA  \        P                  V 4      pV'       g   \	        RV ,          4      hVP                  VP                  4       ^ ,          4       WP                  4       R p K  RP                  V4      p\	        RV,          4      hVP                  V4       RP                  V4      pV R,          P                  4       p W 3# )	r   Nzunexpected end of inputz'"zinvalid expression: %s    NNzerror in string literal: %szunterminated string: %s)

IDENTIFIERmatchgroupsendSyntaxErrorreplaceappendSTRING_CHUNKjoinlstrip)	remainingmresultqoqpartsss   &      g/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/pip/_vendor/distlib/util.py
marker_var parse_marker.<locals>.marker_var@   s_   Y'XXZ]F!%%'(+I:   9 788!A~!":Y"FGGq"%B!"ICEQ<1$q\R'LL$ )"I$**95A)*G)*STTLLA/ )%%'( 3IGGEN!";a"?@@LLOWWU^F!",,.I      c                   < V '       dh   V ^ ,          R8X  dZ   S! V R,          P                  4       4      w  rV ^ ,          R8w  d   \        RV ,          4      hV R,          P                  4       p W3# S! V 4      w  r V '       d\   \        P                  V 4      pV'       g   M=VP	                  4       ^ ,          pWP                  4       R p S! V 4      w  rPRVRVRV/pKc  TpW3# )	r   (r   )unterminated parenthesis: %sNoplhsrhs)r(   r#   	MARKER_OPr    r!   r"   )r)   r+   r9   r*   r8   r:   markerr1   s   &     r0   marker_expr!parse_marker.<locals>.marker_exprd   s    1, &y}';';'= >F|s"!"@9"LMM!",,.I    (	2NCOOI.XXZ]%eegh/	!+I!6RUC8F  r3   c                    < S! V 4      w  rV '       dH   \         P                  V 4      pV'       g    W3# WP                  4       R  p S! V 4      w  r0RRRVRV/pKO  W3# )Nr8   andr9   r:   )ANDr    r"   )r)   r9   r*   r:   r=   s   &   r0   
marker_and parse_marker.<locals>.marker_andw   sh    $Y/		)$A ~ "%%'(+I(3NCsE37C~r3   c                    < S! V 4      w  rV '       dH   \         P                  V 4      pV'       g    W3# WP                  4       R  p S! V 4      w  r0RRRVRV/pKO  W3# )Nr8   orr9   r:   )ORr    r"   )r)   r9   r*   r:   rB   s   &   r0   r<   parse_marker.<locals>.marker   sh    #I.#A ~ "%%'(+I'	2NCuc5#6C~r3    )marker_stringr<   rB   r=   r1   s   &@@@@r0   parse_markerrJ   6   s%    "!H!&		 -  r3   c           	        V P                  4       pV'       d   VP                  R4      '       d   R# \        P                  V4      pV'       g   \	        RV,          4      hVP                  4       ^ ,          pWP                  4       R pR;p;p;rgV'       Ed   V^ ,          R8X  Ed   VP                  R^4      pV^ 8  d   \	        RV,          4      hV^V p	W^,           R P                  4       p. pV	'       d   \        P                  V	4      pV'       g   \	        RV	,          4      hVP                  VP                  4       ^ ,          4       WP                  4       R p	V	'       g   M9V	^ ,          R8w  d   \	        R	V	,          4      hV	R
,          P                  4       p	K  V'       g   RpV'       Ed   V^ ,          R8X  d   VR
,          P                  4       p\        P                  V4      pV'       g   \	        RV,          4      hVP                  4       ^ ,          p\        V4      p
V
P                  '       d   V
P                  '       g   \	        RV,          4      hWP                  4       R P                  4       pEMR pV^ ,          R8w  d   V! V4      w  raMVP                  R^4      pV^ 8  d   \	        RV,          4      hV^V p	W^,           R P                  4       p\        P                  V	4      '       d   V! V	4      w  rlM\        P                  V	4      pV'       g   \	        RV	,          4      hVP                  4       ^ ,          pWP                  4       R P                  4       p	V	'       d   \	        RV	,          4      hRV3.pV'       dE   V^ ,          R8w  d   \	        RV,          4      hVR
,          P                  4       p\!        V4      w  rQV'       d!   V^ ,          R8w  d   \	        RV,          4      hV'       g   TpM/V: RRP#                  V Uu. uF  pRV,          NK  	  up4      : 2p\%        W4WeW~R7      # u upi )z~
Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement.
#Nzname expected: %s[]zunterminated extra: %szmalformed extra: %s,zcomma expected in extras: %sr   @zinvalid URI: %szInvalid URL: %sc                X   \         P                  V 4      pRpV'       Ed	   . p VP                  4       ^ ,          pWP                  4       R p \        P                  V 4      pV'       g   \        RV ,          4      hVP                  4       ^ ,          pVP                  W434       WP                  4       R p V '       d   V ^ ,          R8w  d   MQV R,          P                  4       p V '       g   M1\         P                  V 4      pV'       d   K  \        RV ,          4      hV'       g   RpW 3# )zL
Return a list of operator, version tuples if any are
specified, else None.
Nzinvalid version: %srO   r   invalid constraint: %s)
COMPARE_OPr    r!   r"   VERSION_IDENTIFIERr#   r%   r(   )ver_remainingr*   versionsr8   vs   &    r0   get_versions'parse_requirement.<locals>.get_versions   s    
 $$]31!HXXZ](5eegh(?.44]C "-.Cm.S"TTHHJqM 0(5eegh(?,a0@C0G!(5b(9(@(@(B  -!&,,]; q"-.F.V"WW##'..r3   r5   r6   r7   rR   z~=;zinvalid requirement: %szunexpected trailing data: %s , z%s %s)nameextrasconstraintsr<   urlrequirement)strip
startswithr   r    r#   r!   r"   findr(   r%   	NON_SPACEr   schemenetlocrS   rT   rJ   r'   r   )reqr)   r*   distnamer^   	mark_exprrV   uriir/   trX   _rW   rscons   &               r0   parse_requirementrq      s   
 		I	,,S11#A-	9::xxz!}H%%'(#I*..F.Y.yYq\S(NN3"q56BCCaN!ef%,,.	  #A!"7!";<<MM!((*Q-(%%'(Ats{!"@1"DEE"AFyQ<3!",,.I	*A!"3i"?@@((*Q-CA
 HHH!"3c"9::!%%'(+224I/@ |s"&29&=#)NN3*q5%&Dy&PQQaN%!ef-446	 ##A&&".q/KHa*003A)*BQ*FGG
1A%%'(**,A)*BQ*FGG!%q	{HQ<37)CDDbM((*	+I6	Yq\S(89DEE $))h,OhsWs]]h,O"PQ(x_bss -Ps   (Qc                   R p/ pV F  w  rEp\         P                  P                  W4      p\        V4       F  p\         P                  P                  W4      p	\        V	4       Fv  p
V! W
4      pVf   VP	                  VR4       K#  V! W4      pVP                  \         P                  P                  R4      P                  R4      pVR,           V,           W;&   Kx  	  K  	  K  	  V# )z%Find destinations for resources filesc                    V P                  \        P                  P                  R 4      p VP                  \        P                  P                  R 4      pVP	                  V 4      '       g   Q hV\        V 4      R P                  R 4      # )/N)r$   ospathseprc   lenr(   )rootrv   s   &&r0   get_rel_path)get_resources_dests.<locals>.get_rel_path  sc    ||BGGKK-||BGGKK-t$$$$CIJ&&s++r3   Nrt   )ru   rv   r'   r   popr$   rw   rstrip)resources_rootrulesrz   destinationsbasesuffixdestprefixabs_baseabs_globabs_pathresource_filerel_pathrel_dests   &&            r0   get_resources_destsr     s    , L#dn3fHww||H5H!(O ,^ F< $$]D9+H?H#||BGGKK=DDSIH2:S.82KL/ , & $ r3   c                      \        \        R 4      '       d   Rp V # \        P                  \        \        R\        P                  4      8g  p V # )real_prefixTbase_prefix)hasattrsysr   getattrr+   s    r0   in_venvr   &  s=    sM"" M wsM3::FFMr3   c                  h    \         P                  p \        V \        4      '       g   \	        V 4      p V # N)r   
executable
isinstancer   r   r   s    r0   get_executabler   0  s)     ^^Ffi((&!Mr3   c                     T p \        V4      pT pV'       g   V'       d   TpV'       g   K*  V^ ,          P                  4       pWa9   d    V# V'       g   KT  RWbV 3,          pKa  )Tz	%c: %s
%s)r	   lower)promptallowed_charserror_promptdefaultpr/   cs   &&&&   r0   proceedr   B  s\    A
aLWA1!

A! H | AV#<<r3   c                     \        V\        4      '       d   VP                  4       p/ pV F  pW09   g   K  W,          W#&   K  	  V# r   )r   r   split)dkeysr+   keys   &&  r0   extract_by_keyr   R  s>    $%%zz|F8&FK  Mr3   c                    \         P                  ^ ,          ^8  d   \        P                  ! R4      ! V 4      p V P	                  4       p\        V4      p  \        P                  ! V 4      pVR,          R,          R,          pVP                  4        F<  w  rEVP                  4        F#  w  rgV: RV: 2p\        V4      p	V	f   Q hWV&   K%  	  K>  	  V#   \         d    T P                  ^ ^ 4        Mi ; iR p
\        P                  ! 4       p T
! Y4       MT  \        P                   d=    T P                  4        \         P"                  ! T4      p\        T4      p T
! Y4        Mi ; i/ pTP%                  4        FA  p/ ;Y<&   pTP                  T4       F#  w  rT: RT: 2p\        T4      p	T	f   Q hYT&   K%  	  KC  	  T# )r   utf-8
extensionszpython.exportsexports = c                 r    \        V R 4      '       d   V P                  V4       R# V P                  V4       R# )	read_fileN)r   r   readfp)cpstreams   &&r0   read_stream!read_exports.<locals>.read_streamp  s'    2{##LL IIfr3   )r   version_infocodecs	getreaderreadr
   jsonloaditemsget_export_entry	Exceptionseekr   ConfigParserMissingSectionHeaderErrorclosetextwrapdedentsections)r   datajdatar+   groupentrieskrW   r/   entryr   r   r   r]   values   &              r0   read_exportsr   \  s   
a!!'*62;;=Dd^F		&!|$%56yA$llnNE!"A&(+((("
	 ( -  Aq 
	"	"	$B B11  t$$B	  F{{} ""g88C=KD!5)A$Q'E$$$!DM )  Ms&   A>C C43C4D AE*)E*c                 V   \         P                  ^ ,          ^8  d   \        P                  ! R4      ! V4      p\        P
                  ! 4       pV P                  4        F  w  r4VP                  V4       VP                  4        F  pVP                  f   VP                  pMVP                  : RVP                  : 2pVP                  '       d$   V: RRP                  VP                  4      : R2pVP                  W5P                  V4       K  	  K  	  VP                  V4       R# )r   r   N:z [r\   rN   )r   r   r   	getwriterr   r   r   add_sectionvaluesr   r   flagsr'   setr]   write)r   r   r   r   rW   r   r/   s   &&     r0   write_exportsr     s    
a!!'*62		"	"	$B
qXXZE||#LL$||U\\:{{{!"DIIekk$:;FF1jj!$     HHVr3   c               #      "   \         P                  ! 4       p  V x  \        P                  ! V 4       R #   \        P                  ! T 4       i ; i5ir   )tempfilemkdtempr   rmtree)tds    r0   tempdirr     s5     				Bbbs   A5 AAAc              #      "   \         P                  ! 4       p \         P                  ! V 4       R x  \         P                  ! V4       R #   \         P                  ! T4       i ; i5ir   )ru   getcwdchdir)r   cwds   & r0   r   r     s9     
))+C

   A&A A&A##A&c              #      "   \         P                  ! 4       p \         P                  ! V 4       R x  \         P                  ! V4       R #   \         P                  ! T4       i ; i5ir   )socketgetdefaulttimeoutsetdefaulttimeout)secondsctos   & r0   socket_timeoutr     sE     

"
"
$C&  )  %  %r   c                   0   a  ] tR tRt o R tRR ltRtV tR# )cached_propertyi  c                    Wn         R # r   func)selfr   s   &&r0   __init__cached_property.__init__  s    	r3   Nc                    Vf   V # V P                  V4      p\        P                  WP                   P                  V4       V# r   )r   object__setattr____name__)r   objclsr   s   &&& r0   __get__cached_property.__get__  s8    ;K		#3		 2 2E:r3   r   r   )r   
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classdict__s   @r0   r   r     s     
 r3   r   c                   \         P                  R8X  d   V # V '       g   V # V ^ ,          R8X  d   \        RV ,          4      hV R,          R8X  d   \        RV ,          4      hV P                  R4      p\         P                  V9   d"   VP                  \         P                  4       K6  V'       g   \         P                  # \         P                  P                  ! V!  # )a  Return 'pathname' as a name that will work on the native filesystem.

The path is split on '/' and put back together again using the current
directory separator.  Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem.  Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.
rt   zpath '%s' cannot be absolutezpath '%s' cannot end with '/')ru   rw   
ValueErrorr   curdirremoverv   r'   )pathnamepathss   & r0   convert_pathr    s     
vv}{c7(BCC|s88CDDNN3E
))u
RYYyy77<<r3   c                      a  ] tR tRt o RR ltR tR tR tRR ltRR lt	R	 t
R
 tR tR tR tRR ltR tR tR tR tRtV tR# )FileOperatori  c                P    Wn         \        4       V n        V P                  4        R # r   )dry_runr   ensured_init_record)r   r	  s   &&r0   r   FileOperator.__init__  s    ur3   c                P    R V n         \        4       V n        \        4       V n        R# FN)recordr   files_writtendirs_createdr   s   &r0   r  FileOperator._init_record  s     UEr3   c                d    V P                   '       d   V P                  P                  V4       R # R # r   )r  r  add)r   rv   s   &&r0   record_as_writtenFileOperator.record_as_written  s$    ;;;""4( r3   c                z   \         P                  P                  V4      '       g0   \        R\         P                  P	                  V4      ,          4      h\         P                  P                  V4      '       g   R# \         P
                  ! V4      P                  \         P
                  ! V4      P                  8  # )a  Tell if the target is newer than the source.

Returns true if 'source' exists and is more recently modified than
'target', or if 'source' exists and 'target' doesn't.

Returns false if both exist and 'target' is the same age or younger
than 'source'. Raise PackagingFileError if 'source' does not exist.

Note that this test is not very accurate: files created in the same
second will have the same "age".
zfile '%r' does not existT)ru   rv   existsr   abspathstatst_mtime)r   sourcetargets   &&&r0   newerFileOperator.newer  ss     ww~~f%%"#=PV@W#WXXww~~f%%wwv''"''&/*B*BBBr3   c                L   V P                  \        P                  P                  V4      4       \        P                  RW4       V P                  '       g   RpV'       d   \        P                  P                  V4      '       d   RV,          pMS\        P                  P                  V4      '       d/   \        P                  P                  V4      '       g
   RV,          pV'       d   \        VR,           4      h\        P                  ! W4       V P                  V4       R# )z8Copy a file respecting dry-run and force flags.
        zCopying %s to %sNz%s is a symlinkz%s is a non-regular filez which would be overwritten)
ensure_dirru   rv   dirnameloggerinfor	  islinkr  isfiler   r   copyfiler  )r   infileoutfilecheckmsgs   &&&& r0   	copy_fileFileOperator.copy_file	  s     	01&8|||C77>>'**+g5CWW^^G,,RWW^^G5L5L4w>C 'D!DEEOOF,w'r3   Nc                   \         P                  P                  V4      '       d   Q hV P                  \         P                  P	                  V4      4       \
        P                  R W4       V P                  '       gR   Vf   \        VR4      pM\        P                  ! VRVR7      p \        P                  ! W4       VP                  4        V P                  V4       R#   TP                  4        i ; i)zCopying stream %s to %sNwbwencoding)ru   rv   isdirr"  r#  r$  r%  r	  openr   r   copyfileobjr   r  )r   instreamr*  r3  	outstreams   &&&& r0   copy_streamFileOperator.copy_stream  s    77==))))01-xA||| $/	"KKxH	"""87!w' !s   )C" "C4c                   V P                  \        P                  P                  V4      4       V P                  '       gj   \        P                  P                  V4      '       d   \        P                  ! V4       \        VR 4      ;_uu_ 4       pVP                  V4       RRR4       V P                  V4       R#   + '       g   i     L#; i)r0  N)
r"  ru   rv   r#  r	  r  r  r5  r   r  )r   rv   r   fs   &&& r0   write_binary_fileFileOperator.write_binary_file)  sx    -.|||ww~~d##		$dD!!Q "t$ "!s   B==C	c                F    V P                  WP                  V4      4       R # r   )r=  encode)r   rv   r   r3  s   &&&&r0   write_text_fileFileOperator.write_text_file2  s    t[[%:;r3   c                   \         P                  R 8X  g+   \         P                  R8X  d   \         P                  R 8X  d   V F  pV P                  '       d   \        P                  RV4       K-  \         P                  ! V4      P                  V,          V,          p\        P                  RWE4       \         P                  ! WE4       K  	  R# R# R# )posixjavazchanging mode of %szchanging mode of %s to %oN)	ru   r]   _namer	  r$  r%  r  st_modechmod)r   bitsmaskfilesr<  modes   &&&&  r0   set_modeFileOperator.set_mode5  s    77g"''V"3G8K <<<KK 5q9GGAJ..5=DKK ;QEHHQ%  9L"3r3   c                (    V P                  R RV4      # )im  i  )rM  )r/   r<  s   &&r0   <lambda>FileOperator.<lambda>A  s    qzz%'Cr3   c                6   \         P                  P                  V4      pWP                  9  d   \         P                  P	                  V4      '       g   V P                  P                  V4       \         P                  P                  V4      w  r#V P                  V4       \        P                  R V,          4       V P                  '       g   \         P                  ! V4       V P                  '       d   V P                  P                  V4       R# R# R# R# )zCreating %sN)ru   rv   r  r
  r  r  r   r"  r$  r%  r	  mkdirr  r  )r   rv   r   r<  s   &&  r0   r"  FileOperator.ensure_dirC  s    wwt$||#BGGNN4,@,@LLT"77==&DAOOAKK,-<<<{{{!!%%d+  -A#r3   c                (   \        W'       * 4      p\        P                  R W4       V P                  '       g   V'       g   V P	                  W4      '       d3   V'       g   RpM'VP                  V4      '       g   Q hV\        V4      R p/ pV'       dU   \        \        R4      '       d?   \        V\        P                  4      '       g   \        P                  P                  pWXR&   \        P                  ! WXR3/ VB  V P                  V4       V# )zByte-compiling %s to %sNPycInvalidationModeinvalidation_modeT)r   r$  r%  r	  r  rc   rx   r   
py_compiler   rV  CHECKED_HASHcompiler  )	r   rv   optimizeforcer   hashed_invalidationdpathdiagpathcompile_kwargss	   &&&&&&   r0   byte_compileFileOperator.byte_compileO  s    !$5-t;|||

4//#H??62222#CKL1HN"wz;P'Q'Q!"5z7U7UVV*4*H*H*U*U'6I23tHdMnMu%r3   c                >   \         P                  P                  V4      '       Edw   \         P                  P                  V4      '       d   \         P                  P	                  V4      '       g   \
        P                  R V4       V P                  '       g   \        P                  ! V4       V P                  '       d0   WP                  9   d   V P                  P                  V4       R# R# R# \         P                  P	                  V4      '       d   RpMRp\
        P                  RW!4       V P                  '       g   \         P                  ! V4       V P                  '       d0   WP                  9   d   V P                  P                  V4       R# R# R# R# )zRemoving directory tree at %slinkfilezRemoving %s %sN)ru   rv   r  r4  r&  r$  debugr	  r   r   r  r  r  r  )r   rv   r/   s   && r0   ensure_removedFileOperator.ensure_removedb  s   77>>$ww}}T""277>>$+?+?<dC|||MM$';;;000))006 1  77>>$''AA-q7|||IIdO;;;111**11$7 2 !  r3   c                   R pV'       gz   \         P                  P                  V4      '       d)   \         P                  ! V\         P                  4      p V# \         P                  P                  V4      pW18X  d    V# TpK  V# F)ru   rv   r  accessW_OKr#  )r   rv   r+   parents   &&  r0   is_writableFileOperator.is_writablew  sh    ww~~d##41
 	 WW__T*F~ Dr3   c                ~    V P                   '       g   Q hV P                  V P                  3pV P                  4        V# )z>
Commit recorded changes, turn off recording, return
changes.
)r  r  r  r  )r   r+   s   & r0   commitFileOperator.commit  s9    
 {{{{##T%6%66r3   c                0   V P                   '       g   \        V P                  4       F@  p\        P                  P                  V4      '       g   K*  \        P                  ! V4       KB  	  \        V P                  R R7      pV F}  p\        P                  ! V4      pV'       dG   VR.8X  g   Q h\        P                  P                  W4^ ,          4      p\        P                  ! V4       \        P                  ! V4       K  	  V P                  4        R# )T)reverse__pycache__N)r	  listr  ru   rv   r  r  sortedr  listdirr'   rmdirr  )r   r<  dirsr   flistsds   &     r0   rollbackFileOperator.rollback  s    |||$,,-77>>!$$IIaL . $++T:D

1 ]O333aq2BHHRL  	r3   )r  r	  r
  r  r  rj  Tr   )FFNF)r   r   r   r   r   r  r  r  r-  r9  r=  rA  rM  set_executable_moder"  ra  rg  rn  rq  r}  r   r   r   s   @r0   r  r    s_     
"
)C&("(%<
& D
,&8*
 r3   r  c                    V \         P                  9   d   \         P                  V ,          pM\        V 4      pVf   TpV# VP                  R4      p\	        W$P                  ^ 4      4      pV F  p\	        W54      pK  	  V# )N.)r   modules
__import__r   r   r|   )module_namedotted_pathmodr+   r.   r   s   &&    r0   resolver    su    ckk!kk+&% M	 !!#&iil+AV'F Mr3   c                   Z   a  ] tR tRt o R t]R 4       tR tR t]	P                  t
RtV tR# )ExportEntryi  c                6    Wn         W n        W0n        W@n        R # r   r]   r   r   r   )r   r]   r   r   r   s   &&&&&r0   r   ExportEntry.__init__  s    	
r3   c                B    \        V P                  V P                  4      # r   )r  r   r   r  s   &r0   r   ExportEntry.value  s    t{{DKK00r3   c           	     x    R V P                   : RV P                  : RV P                  : RV P                  : R2	# )z<ExportEntry r   r   r[   >r  r  s   &r0   __repr__ExportEntry.__repr__  s$    04		4;;UYU_U_``r3   c                2   \        V\        4      '       g   R pV# V P                  VP                  8H  ;'       d\    V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P
                  VP
                  8H  pV# rj  )r   r  r]   r   r   r   )r   otherr+   s   && r0   __eq__ExportEntry.__eq__  s    %--F  ii5::- 0 0$++2M 0 0RVR]R]afamamRm 0 0jjEKK/ r3   )r   r]   r   r   N)r   r   r   r   r   r   r   r  r  r   __hash__r   r   r   s   @r0   r  r    s4      1 1a Hr3   r  z(?P<name>([^\[]\S*))
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c                 :   \         P                  V 4      pV'       g&   R pRV 9   g   RV 9   d   \        RV ,          4      h V# VP                  4       pVR,          pVR,          pVP	                  R4      pV^ 8X  d   TR rM,V^8w  d   \        RV ,          4      hVP                  R4      w  rxVR,          p	V	f$   RV 9   g   RV 9   d   \        RV ,          4      h. p	M-V	P                  R4       U
u. uF  qP                  4       NK  	  p	p
\        WGW4      pV# u up
i )	NrM   rN   zInvalid specification '%s'r]   callabler   r   rO   )ENTRY_REsearchr   	groupdictcountr   rb   r  )specificationr*   r+   r   r]   rv   colonsr   r   r   r<  s   &          r0   r   r     s,   &A-3-#7" $*,9$: ; ; $80 M) KKMy}CQ;!4F{& (.0=(> ? ?!ZZ_NF'
=m#sm';& (.0=(> ? ?E(-C(89(81WWY(8E9T69M :s   0Dc                   V f   Rp \         P                  R8X  d6   R\         P                  9   d!   \         P                  P	                  R4      pM\         P                  P                  R4      p\         P                  P                  V4      '       dE   \         P                  ! V\         P                  4      pV'       g   \        P                  RV4       M \         P                  ! V4       RpV'       g,   \        P                  ! 4       p\        P                  RV4       \         P                  P                  W4      #   \         d    \        P                  RTRR	7       R
p Lyi ; i)az  
Return the default base location for distlib caches. If the directory does
not exist, it is created. Use the suffix provided for the base directory,
and default to '.distlib' if it isn't provided.

On Windows, if LOCALAPPDATA is defined in the environment, then it is
assumed to be a directory, and will be the parent directory of the result.
On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
directory - using os.expanduser('~') - will be the parent directory of
the result.

The result is just the directory '.distlib' in the parent directory as
determined above, or with the name specified with ``suffix``.
z.distlibntLOCALAPPDATAz$localappdata~z(Directory exists but is not writable: %sTzUnable to create %s)exc_infoFz#Default location unusable, using %s)ru   r]   environrv   
expandvars
expanduserr4  rk  rl  r$  warningmakedirsOSErrorr   r   r'   )r   r+   usables   &  r0   get_cache_baser    s     ~	ww$>RZZ7##O4 ##C( 
ww}}V6277+NNEvN	KKF !!#<fE77<<''  	NN0&4NHF	s   E %E,+E,c                $   \         P                  P                  V'       d    \         P                  P                  V 4      MT 4      w  r#V'       d   VP	                  RR4      pVP	                  \         P
                  R4      pW#,           R,           # )z
Convert an absolute path to a directory name for use in a cache.

The algorithm used is:

#. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
#. Any occurrence of ``os.sep`` is replaced with ``'--'``.
#. ``'.cache'`` is appended.
r   z---z--z.cache)ru   rv   
splitdriver  r$   rw   )rv   use_abspathr   r   s   &&  r0   path_to_cache_dirr    s_     77{bggood3MDAIIc5!			"&&$A58r3   c                 F    V P                  R 4      '       g
   V R ,           # V # )rt   )endswith)r/   s   &r0   ensure_slashr  )  s    ::c??3wHr3   c                     R ;rRV 9   d3   V P                  R^4      w  r0RV9  d   TpMVP                  R^4      w  rV'       d   \        V4      pV'       d   \        V4      pWV 3# )NrP   r   )rsplitr   r   )rg   usernamepasswordr   s   &   r0   parse_credentialsr  /  sh    H
f}sA.fH!'c1!5H8$8$v%%r3   c                  ^    \         P                  ! ^4      p \         P                  ! V 4       V # )   )ru   umaskr   s    r0   get_process_umaskr  >  s     XXd^FHHVMr3   c                 v    R pRp\        V 4       F  w  r#\        V\        4      '       d   K  Rp M	  Vf   Q hV# )TNF)	enumerater   r   )seqr+   rl   r/   s   &   r0   is_string_sequencer  D  sB    FA#!\**F  ==Mr3   z3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)z-py(\d\.?\d?)c                T   RpRp\        V 4      P                  RR4      p \        P                  V 4      pV'       d%   VP	                  ^4      pV RVP                  4        p V'       d|   \        V 4      \        V4      ^,           8  d\   \        P                  ! \        P                  ! V4      R,           V 4      pV'       d"   VP                  4       pV RV W^,           R V3pVfA   \        P                  V 4      pV'       d$   VP	                  ^4      VP	                  ^4      V3pV# )zk
Extract name, version, python version from a filename (no extension)

Return name, version, pyver or None
Nr[   -z\b)r   r$   PYTHON_VERSIONr  r   startrx   rer    escaper"   PROJECT_NAME_AND_VERSION)filenameproject_namer+   pyverr*   ns   &&    r0   split_filenamer  T  s     FEx ((c2Hh'A
JQWWY'HL(9A(==HHRYY|,u4h?Abq\8EF#3U:F~$**84WWQZU2FMr3   z-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$c                    \         P                  V 4      pV'       g   \        RV ,          4      hVP                  4       pVR,          P	                  4       P                  4       VR,          3# )z
A utility method used to get name and version from a string.

From e.g. a Provides-Dist value.

:param p: A value in a form 'foo (1.0)'
:return: The name and version as a tuple.
z$Ill-formed name/version string: '%s'r]   ver)NAME_VERSION_REr    r   r  rb   r   )r   r*   r   s   &  r0   parse_name_and_versionr  r  sV     	a AG!KLL	AV9??""$ah..r3   c                    \        4       p\        T ;'       g    . 4      p \        T;'       g    . 4      pR V 9   d   V P                  R 4       W!,          pV  F  pVR8X  d   VP                  V4       K  VP                  R4      '       dG   VR,          pWA9  d   \        P                  RV,          4       WB9   d   VP                  V4       Kx  Kz  W19  d   \        P                  RV,          4       VP                  V4       K  	  V# )*r  r   zundeclared extra: %s)r   r  r  rc   r$  r  )	requested	availabler+   runwanteds   &&   r0   
get_extrasr    s    UFIOO$IIOO$I
i8JJqM\\#uH(5@A!h' " !59:JJqM  Mr3   c                    / p \        V 4      pVP                  4       pVP                  R 4      pVP                  R4      '       g   \        P                  RV4       V# \        P                  ! R4      ! V4      p\        P                  ! V4      p V#   \         d"   p\        P                  RY4        Rp?T# Rp?ii ; i)zContent-Typezapplication/jsonz(Unexpected response for JSON request: %sr   z&Failed to get external data for %s: %sN)r   r%  getrc   r$  rf  r   r   r   r   r   	exception)r`   r+   respheadersctreaderes   &      r0   _get_external_datar    s    FK s|))+[[(}}/00LLCRH M %%g.t4F YYv&F M  KA3JJMKs   AB 2B C B;;C z'https://www.red-dove.com/pypi/projects/c                 z    V ^ ,          P                  4       : RV : R2p\        \        V4      p\        V4      pV# )r   rt   z/project.jsonupperr   _external_data_base_urlr  )r]   r`   r+   s   &  r0   get_project_datar    s2    "&q'--/4
8C
)3
/C$FMr3   c                 ~    V ^ ,          P                  4       : RV : RV: R2p\        \        V4      p\        V4      # )r   rt   z	/package-z.jsonr  )r]   versionr`   s   && r0   get_package_datar    s0    %)!W]]_dG
DC
)3
/Cc""r3   c                   :   a  ] tR tRt o RtR tRR ltR tRtV t	R# )	Cachei  z
A class implementing a cache for resources that need to live in the file system
e.g. shared libraries. This class was moved from resources to here because it
could be used by other modules, e.g. the wheel module.
c                   \         P                  P                  V4      '       g   \         P                  ! V4       \         P                  ! V4      P
                  ^?,          ^ 8w  d   \        P                  RV4       \         P                  P                  \         P                  P                  V4      4      V n
        R# )z]
Initialise an instance.

:param base: The base directory where the cache should be located.
zDirectory '%s' is not privateN)ru   rv   r4  r  r  rG  r$  r  r  normpathr   )r   r   s   &&r0   r   Cache.__init__  sp     ww}}T""KKGGDM!!D(Q.NN<dCGGOOBGG$4$4T$:;	r3   c                    \        WR7      # )z>
Converts a resource prefix to a directory name in the cache.
)r  )r  )r   r   r  s   &&&r0   prefix_to_dirCache.prefix_to_dir  s     !AAr3   c                2   . p\         P                  ! V P                  4       F  p\         P                  P	                  V P                  V4      p \         P                  P                  V4      '       g&   \         P                  P                  V4      '       d   \         P                  ! V4       K  \         P                  P                  V4      '       d   \        P                  ! V4       K  K  	  V#   \         d    TP                  T4        K  i ; i)z
Clear the cache.
)ru   rx  r   rv   r'   r&  r'  r  r4  r   r   r   r%   )r   not_removedfns   &  r0   clearCache.clear  s     **TYY'Bdii,B'77>>"%%););IIbMWW]]2&&MM"% ' (   '""2&'s%   A	C6C63$C6C66DDr   Nr  )
r   r   r   r   __doc__r   r  r  r   r   r   s   @r0   r  r    s     <B r3   r  c                   F   a  ] tR tRt o RtR tR
R ltR tR tR t	Rt
V tR	# )
EventMixini  z)
A very simple publish/subscribe system.
c                    / V n         R # r   _subscribersr  s   &r0   r   EventMixin.__init__  s
    r3   c                    V P                   pW9  d   \        V.4      WA&   R# WA,          pV'       d   VP                  V4       R# VP                  V4       R# )a(  
Add a subscriber for an event.

:param event: The name of an event.
:param subscriber: The subscriber to be added (and called when the
                   event is published).
:param append: Whether to append or prepend the subscriber to an
               existing subscriber list for the event.
N)r  r   r%   
appendleft)r   event
subscriberr%   subssqs   &&&&  r0   r  EventMixin.add  sE       -DKB		*%j)r3   c                |    V P                   pW9  d   \        RV,          4      hW1,          P                  V4       R# )zy
Remove a subscriber for an event.

:param event: The name of an event.
:param subscriber: The subscriber to be removed.
zNo subscribers: %rN)r  r   r  )r   r  r  r  s   &&& r0   r  EventMixin.remove  s6       1E9:::&r3   c                L    \        V P                  P                  VR4      4      # )zi
Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.
rH   )iterr  r  )r   r  s   &&r0   get_subscribersEventMixin.get_subscribers  s"    
 D%%))%455r3   c                    . pV P                  V4       F!  p V! V.VO5/ VB pVP	                  V4       K#  	  \        P                  RWW44       V#   \         d    \        P                  R4       Rp LRi ; i)a  
Publish a event and return a list of values returned by its
subscribers.

:param event: The event to publish.
:param args: The positional arguments to pass to the event's
             subscribers.
:param kwargs: The keyword arguments to pass to the event's
               subscribers.
z"Exception during event publicationNz/publish %s: args = %s, kwargs = %s, result = %s)r
  r   r$  r  r%   rf  )r   r  argskwargsr+   r  r   s   &&*,   r0   publishEventMixin.publish  s     ..u5J"5:4:6: MM%  6 	FU[d    !EFs   A"A76A7r  Nr  )r   r   r   r   r  r   r  r  r
  r  r   r   r   s   @r0   r  r    s(     *(
'6 r3   r  c                   n   a  ] tR tRt o R tR tRR ltR tR tR t	R t
]R	 4       t]R
 4       tRtV tR# )	Sequenceri8  c                @    / V n         / V n        \        4       V n        R # r   )_preds_succsr   _nodesr  s   &r0   r   Sequencer.__init__:  s    er3   c                <    V P                   P                  V4       R # r   )r  r  )r   nodes   &&r0   add_nodeSequencer.add_node?  s    r3   c                r   WP                   9   d   V P                   P                  V4       V'       Ed   \        V P                  P	                  VR4      4       F  pV P                  W14       K  	  \        V P
                  P	                  VR4      4       F  pV P                  W4       K  	  \        V P                  P                  4       4       F  w  rVV'       d   K  V P                  V K  	  \        V P
                  P                  4       4       F  w  rVV'       d   K  V P
                  V K  	  R # R # )NrH   )r  r  r   r  r  r  rv  r   )r   r  edgesr   r/   r   rW   s   &&&    r0   remove_nodeSequencer.remove_nodeB  s    ;;KKt$5r23A$ 4r23D$ 4 T[[..01qA 2 T[[..01qA 2 r3   c                    W8w  g   Q hV P                   P                  V\        4       4      P                  V4       V P                  P                  V\        4       4      P                  V4       R # r   )r  
setdefaultr   r  r  )r   predsuccs   &&&r0   r  Sequencer.addR  sN    ||tSU+//5tSU+//5r3   c                .   W8w  g   Q h V P                   V,          pV P                  V,          p TP	                  T4       TP	                  T4       R#   \         d    \        R T,          4      hi ; i  \         d    \        T: RT: 24      hi ; i)z%r not a successor of anythingz not a successor of N)r  r  KeyErrorr   r  )r   r"  r#  predssuccss   &&&  r0   r  Sequencer.removeW  s    ||	FKK%EKK%E	HLLLL	  	F=DEE	F
  	H4FGG	Hs   &A "A6 A36Bc                v    WP                   9   ;'       g%    WP                  9   ;'       g    WP                  9   # r   )r  r  r  )r   steps   &&r0   is_stepSequencer.is_stepd  s-    #QQt{{':QQdkk>QRr3   c                   V P                  V4      '       g   \        R V,          4      h. p. p\        4       pVP                  V4       V'       d   VP	                  ^ 4      pWT9   d-   WQ8w  d%   VP                  V4       VP                  V4       KI  KK  VP                  V4       VP                  V4       V P                  P                  VR4      pVP                  V4       K  \        V4      # )zUnknown: %rrH   )r,  r   r   r%   r|   r  r  r  r  extendreversed)r   finalr+   todoseenr+  r'  s   &&     r0   	get_stepsSequencer.get_stepsg  s    ||E""]U233uE88A;D| =MM$'MM$' ! d#b1E"r3   c                   aaaaaaa ^ .o. o/ o/ o. oV P                   oVVVVVVV3R loS F  pVS9  g   K  S! V4       K  	  S# )r   c                 8  < S^ ,          SV &   S^ ,          SV &   S^ ;;,          ^,          uu&   S
P                  V 4        SV ,          pV FW  pVS9  d(   S! V4       \        SV ,          SV,          4      SV &   K1  VS
9   g   K:  \        SV ,          SV,          4      SV &   KY  	  SV ,          SV ,          8X  dL   . p S
P                  4       pVP                  V4       W 8X  g   K*   \	        T4      pS	P                  T4       R# R#   \         d    . p Li ; ir   N)r%   r   minr|   tuple)r  
successors	successorconnected_component	componentgraphindexindex_counterlowlinksr+   stackstrongconnects   &    r0   rD  3Sequencer.strong_connections.<locals>.strongconnect  s   '*E$K*1-HTN!!LL "4[
 (	H,!),%($)9L%MHTN%' &)$y9I%JHTN ( ~t,&(# %		I'..y9 (!"56	i( -   
 s   	D	 	DD)r  )	r   r  r?  r@  rA  rB  r+   rC  rD  s	   & @@@@@@@r0   strong_connectionsSequencer.strong_connections  sW     !	) !	)F D8#d#  r3   c           	     4   R .pV P                    F9  pV P                   V,          pV F  pVP                  RV: RV: R24       K  	  K;  	  V P                   F  pVP                  RV,          4       K  	  VP                  R4       RP                  V4      # )zdigraph G {z  z -> rZ   z  %s;}
)r  r%   r  r'   )r   r+   r#  r'  r"  r  s   &     r0   dotSequencer.dot  s{    KKDKK%EtT:;    KKDMM'D.)  cyy  r3   )r  r  r  Nrj  )r   r   r   r   r   r  r  r  r  r,  r4  propertyrF  rK  r   r   r   s   @r0   r  r  8  sS     
' 6
HS 2 1 1f 	! 	!r3   r  c                   aa VV3R  lp\         P                  P                  S4      o\        S4      oRpVf   V P	                  R4      '       d   RpMfV P	                  R4      '       d   RpRpMJV P	                  R4      '       d   RpRpM.V P	                  R4      '       d   RpR	pM\        R
V ,          4      h VR8X  d7   \        V R	4      pV'       d"   VP                  4       pV F  pV! V4       K  	  M@\        P                  ! V X4      pV'       d"   VP                  4       pV F  pV! V4       K  	  VR8w  dv   \        P                  ^ ,          ^8  dZ   VP                  4        FE  p	\        V	P                  \         4      '       d   K%  V	P                  P#                  R4      V	n        KG  	  R p
Wn        VP'                  S4       V'       d   VP)                  4        R# R#   T'       d   TP)                  4        i i ; i)c                 Z  < \        V \        4      '       g   V P                  R 4      p \        P                  P                  \        P                  P                  SV 4      4      pVP                  S4      '       d   VS,          \        P                  8w  d   \        RV,          4      hR# )r   zpath outside destination: %rN)
r   r   decoderu   rv   r  r'   rc   rw   r   )rv   r   dest_dirplens   & r0   
check_pathunarchive.<locals>.check_path  ss    $	**;;w'DGGOOBGGLL489||H%%4BFF):;a?@@ *;r3   Nziptgzzr:gztbzzr:bz2.tartarr  zUnknown format for %rr   c                     \         P                  ! W4      #   \         P                   d   p\        \	        T4      4      hRp?ii ; i)z9Run tarfile.tar_filter, but raise the expected ValueErrorN)tarfile
tar_filterFilterErrorr   str)memberrv   excs   && r0   extraction_filter$unarchive.<locals>.extraction_filter  s=    +))&77&& + S**+s    AAA).zip.whl).tar.gz.tgz).tar.bz2.tbz)ru   rv   r  rx   r  r   r   namelistr[  r5  getnamesr   r   
getmembersr   r]   r   rP  ra  
extractallr   )archive_filenamerQ  formatr+  rS  archiverL  namesr]   tarinfora  rR  s   &f&&       @r0   	unarchiverr    s   A wwx(Hx=DG~$$%566F&&':;;FD&&';<<FD&&v..FD47GGHH'U?.4G((*!Dt$ " ll#3T:G((*!Dt$ "U?s//2Q6
 #--/!',,	::#*<<#6#6w#?GL 0	+ %6!8$ MMO 7MMO s   ;AG* A4G* >G* *Hc                   \         P                  ! 4       p\        V 4      p\        VR4      ;_uu_ 4       p\        P
                  ! V 4       Fb  w  rEpV FV  p\        P                  P                  WG4      pWBR p	\        P                  P                  W4      p
VP                  W4       KX  	  Kd  	  RRR4       V#   + '       g   i     T# ; i)z*zip a directory tree into a BytesIO objectr1  N)	ioBytesIOrx   r   ru   walkrv   r'   r   )	directoryr+   dlenzfry   rz  rK  r]   fullrelr   s   &          r0   zip_dirr|    s    ZZ\Fy>D			!#!3Dww||D/5kww||C.$	  "4 
 M 
	 Ms   A=B<<C	c                      a  ] tR tRt o RtRR ltR tR tR tR t	]
R 4       t]
R	 4       tR
 t]
R 4       t]
R 4       tRtV tR# )Progressi!  UNKNOWNc                p    Ve	   W!8  g   Q hV;V n         V n        W n        R V n        ^ V n        RV n        R # )NF)r9  curmaxstartedelapseddone)r   minvalmaxvals   &&&r0   r   Progress.__init__$  s:    ~!111$$48	r3   c                    V P                   V8:  g   Q hV P                  e   WP                  8:  g   Q hWn        \        P                  ! 4       pV P                  f	   W n        R # W P                  ,
          V n        R # r   )r9  r  r  timer  r  )r   curvalnows   && r0   updateProgress.update,  sZ    xx6!!!xx6XX#555iik<<L-DLr3   c                \    V^ 8  g   Q hV P                  V P                  V,           4       R# r8  )r  r  )r   incrs   &&r0   	incrementProgress.increment6  s"    qyyDHHtO$r3   c                <    V P                  V P                  4       V # r   )r  r9  r  s   &r0   r  Progress.start:  s    DHHr3   c                f    V P                   e   V P                  V P                   4       RV n        R # NT)r  r  r  r  s   &r0   stopProgress.stop>  s#    88KK!	r3   c                N    V P                   f   V P                  # V P                   # r   )r  unknownr  s   &r0   maximumProgress.maximumC  s    #xx/t||=TXX=r3   c                    V P                   '       d   R pV# V P                  f   RpV# RV P                  V P                  ,
          ,          V P                  V P                  ,
          ,          pRV,          pV# )z100 %z ?? %g      Y@z%3d %%)r  r  r  r9  )r   r+   rW   s   &  r0   
percentageProgress.percentageG  sh    999F  XXF  DHH,-DHH1DEA\Fr3   c                    V^ 8:  d   V P                   e   V P                  V P                  8X  d   RpV# \        P                  ! R\        P
                  ! V4      4      pV# )r   z??:??:??z%H:%M:%S)r  r  r9  r  strftimegmtime)r   durationr+   s   && r0   format_durationProgress.format_durationR  sM    Mtxx/488txx3GF
  ]]:t{{8/DEFr3   c                   V P                   '       d   R pV P                  pMRpV P                  f   RpMV P                  ^ 8X  g   V P                  V P                  8X  d   ^ pMc\        V P                  V P                  ,
          4      pW P                  V P                  ,
          ,          pV^,
          V P                  ,          pV: RV P                  V4      : 2# )DonezETA z: r   )r  r  r  r  r9  floatr  )r   r   rm   s   &  r0   ETAProgress.ETA[  s    999FA Fxx"txx488'; $((TXX-.XX((Udll*!4#7#7#:;;r3   c                    V P                   ^ 8X  d   RpM.V P                  V P                  ,
          V P                   ,          p\         F  pVR8  d    MVR,          pK  	  RVX3,          # )r   g        i  g     @@z%d %sB/s)r  r  r9  UNITS)r   r+   units   &  r0   speedProgress.speedn  s]    <<1Fhh)T\\9FD}fF  VTN**r3   )r  r  r  r  r9  r  N)r   d   )r   r   r   r   r  r   r  r  r  r  rM  r  r  r  r  r  r   r   r   s   @r0   r~  r~  !  sx     G.%
 > >   < <$ 	+ 	+r3   r~  z\{([^}]*)\}z[^/\\,{]\*\*|\*\*[^/\\,}]z^[^{]*\}|\{[^}]*$c                    \         P                  V 4      '       d   Rp\        W,          4      h\        P                  V 4      '       d   Rp\        W,          4      h\	        V 4      # )zAExtended globbing function that supports ** and {opt1,opt2,opt3}.z7invalid glob %r: recursive glob "**" must be used alonez2invalid glob %r: mismatching set marker '{' or '}')_CHECK_RECURSIVE_GLOBr  r   _CHECK_MISMATCH_SET_iglob)	path_globr,  s   & r0   r   r     sS    ##I..K))!!),,F)))r3   c              #     "   \         P                  V ^4      p\        V4      ^8  d^   \        V4      ^8X  g   Q V4       hVw  r#pVP                  R4       F*  p\        RP	                  W%V34      4       F  pVx  K	  	  K,  	  R# RV 9  d   \        V 4       F  pVx  K	  	  R# V P                  R^4      w  r'VR8X  d   RpVR8X  d   RpM"VP                  R4      pVP                  R4      p\        P                  ! V4       FX  w  rhp	\        P                  P                  V4      p\        \        P                  P	                  Wg4      4       F  p
V
x  K	  	  KZ  	  R# 5i)	r   rO   r   z**r  r  rt   \N)	RICH_GLOBr   rx   r  r'   	std_iglobr(   ru   rv  rv   r  )r  rich_path_globr   r   r   itemrv   radicaldirrK  r  s   &          r0   r  r    s-    __Y2N
>Q>"a'77',VIIcNDrwwf'=>?
 @ # y !),
 - (oodA6OF|"} "..-!...$&GGFO 5ww''- d!<=BH > %4s   E E")HTTPSHandlermatch_hostnameCertificateErrorc                   .   a  ] tR tRt o RtRtR tRtV tR# )HTTPSConnectioni  NTc                   \         P                  ! V P                  V P                  3V P                  4      p\        V R R4      '       d   Wn        V P                  4        \        P                  ! \        P                  4      p\        \        R4      '       d(   V;P                  \        P                  ,          un        \        V RR4      '       d'   VP                  V P                  V P                   4       / pV P"                  '       dX   \        P$                  Vn        VP)                  V P"                  R7       \        \        RR4      '       d   V P                  VR&   VP*                  ! V3/ VB V n        V P"                  '       df   V P,                  '       dR    \/        V P                  P1                  4       V P                  4       \2        P5                  RV P                  4       R# R# R#   \6         dF    T P                  P9                  \         P:                  4       T P                  P=                  4        h i ; i)	_tunnel_hostFOP_NO_SSLv2	cert_fileN)cafileHAS_SNIserver_hostnamezHost verified: %s)r   create_connectionhostporttimeoutr   sock_tunnelssl
SSLContextPROTOCOL_SSLv23r   optionsr  load_cert_chainr  key_fileca_certsCERT_REQUIREDverify_modeload_verify_locationswrap_socketcheck_domainr  getpeercertr$  rf  r  shutdown	SHUT_RDWRr   )r   r  contextr  s   &   r0   connectHTTPSConnection.connect  s   ++TYY		,BDLLQDt^U33 	nnS%8%89GsM**3??2t[$//''FF}}}&)&7&7#--T]]-C3	51104		F,-++D;F;DI}}}!2!2!2"499#8#8#:DIIFLL!4dii@ "3} ( II&&v'7'78IIOO%s   #AG7 7AI)r  )	r   r   r   r   r  r  r  r   r   r   s   @r0   r  r    s     	 	r3   r  c                   6   a  ] tR tRt o RR ltR tR tRtV tR# )r  i  c                J    \         P                  ! V 4       Wn        W n        R # r   )BaseHTTPSHandlerr   r  r  )r   r  r  s   &&&r0   r   HTTPSHandler.__init__  s    %%d+$M ,r3   c                    \        V/ VB pV P                  '       d#   V P                  Vn        V P                  Vn        V# )a  
This is called to create a connection instance. Normally you'd
pass a connection class to do_open, but it doesn't actually check for
a class, and just expects a callable. As long as we behave just as a
constructor would have, we should be OK. If it ever changes so that
we *must* pass a class, we'll create an UnsafeHTTPSConnection class
which just sets check_domain to False in the class definition, and
choose which one to pass to do_open.
)r  r  r  )r   r  r  r+   s   &*, r0   _conn_makerHTTPSHandler._conn_maker  s:     %d5f5F}}}"&--&*&7&7#Mr3   c                     V P                  V P                  V4      #   \         d=   pR \        TP                  4      9   d   \        RTP                  ,          4      hh Rp?ii ; i)zcertificate verify failedz*Unable to verify server certificate for %sN)do_openr  r   r^  reasonr  r  )r   rh   r  s   && r0   
https_openHTTPSHandler.https_open  sc    ||D$4$4c:: .#ahh-?* ,469hh,? @ @ s    A%7A  A%)r  r  Nr  )	r   r   r   r   r   r  r  r   r   r   s   @r0   r  r    s     	-
	 	 	r3   r  c                   &   a  ] tR tRt o R tRtV tR# )HTTPSOnlyHandleri  c                &    \        R V,          4      h)zAUnexpected HTTP request on what should be a secure connection: %s)r   )r   rh   s   &&r0   	http_openHTTPSOnlyHandler.http_open  s     ,.12 3 3r3   rH   N)r   r   r   r   r  r   r   r   s   @r0   r  r    s     	3 	3r3   r  c                   0   a  ] tR tRt o RR ltR tRtV tR# )	Transporti  c                P    Wn         \        P                  P                  W4       R # r   )r  r   r  r   r   r  use_datetimes   &&&r0   r   Transport.__init__	  s    $$T8r3   c                    V P                  V4      w  r#pV P                  '       d   WP                  ^ ,          8w  d$   W0n        V\        P                  ! V4      3V n        V P                  ^,          # r   )get_host_info_connection_extra_headersr   HTTPConnection)r   r  hehx509s   &&   r0   make_connectionTransport.make_connection  sa    ((.t4+;+;A+>#>"$#W%;%;A%>>D""r3   r  r  r  Nr  r   r   r   r   r   r  r   r   r   s   @r0   r  r    s     9# #r3   r  c                   0   a  ] tR tRt o RR ltR tRtV tR# )SafeTransporti  c                P    Wn         \        P                  P                  W4       R # r   )r  r   r  r   r  s   &&&r0   r   SafeTransport.__init__  s    "L##,,T@r3   c                   V P                  V4      w  r#pV'       g   / pV P                  VR &   V P                  '       d   WP                  ^ ,          8w  d&   W0n        V\        P
                  ! VR3/ VB 3V n        V P                  ^,          # )r  N)r  r  r  r  r   r  )r   r  r  r   r  s   &&   r0   r  SafeTransport.make_connection  s~     ..t4MA6 $F9###t/?/?/B'B&(##')@)@D)SF)S#S ##A&&r3   r  Nr  r  r   s   @r0   r  r    s     	A	' 	'r3   r  c                   &   a  ] tR tRt o R tRtV tR# )ServerProxyi(  c                   VP                  R R4      ;V n        pVeM   \        V4      ^ ,          pVP                  R^ 4      pVR8X  d   \        pM\
        pV! W5R7      ;VR&   pWpn        \        P                  P                  ! W3/ VB  R# )r  Nr  https)r  	transport)
r|   r  r   r  r  r  r  r   r  r   )r   rk   r  r  rf   r  tclsrm   s   &&,     r0   r   ServerProxy.__init__*  s    !'It!<<w c]1%F!::na8L $ &*7&NNF;!N&&t;F;r3   )r  r  N)r   r   r   r   r   r   r   r   s   @r0   r  r  (  s     < <r3   r  c                 z    \         P                  ^ ,          ^8  d   VR,          pM
RVR&   RVR&   \        W3/ VB # )r   br   newliner   r3  )r   r   r5  )r  rL  r  s   &&,r0   	_csv_openr  A  sD    
Qy %z#F##r3   c                   `   a  ] tR tRt o R]! R4      R]! R4      R]! R4      /tR tR	 tR
tV t	R# )CSVBaseiL  	delimiterrO   	quotechar"lineterminatorrJ  c                    V # r   rH   r  s   &r0   	__enter__CSVBase.__enter__S      r3   c                :    V P                   P                  4        R # r   )r   r   )r   r  s   &*r0   __exit__CSVBase.__exit__V  s    r3   rH   N)
r   r   r   r   r^  defaultsr  r"  r   r   r   s   @r0   r  r  L  s6     SXSX#d)H r3   r  c                   6   a  ] tR tRt o R tR tR t]tRtV t	R# )	CSVReaderiZ  c                4   R V9   dI   VR ,          p\         P                  ^ ,          ^8  d   \        P                  ! R4      ! V4      pW n        M\        VR,          R4      V n        \        P                  ! V P                  3/ V P                  B V n        R# )r   r   rv   r  N)	r   r   r   r   r   r  csvr  r$  )r   r  r   s   &, r0   r   CSVReader.__init__\  sp    vH%F"a'))'26: K#F6NC8DKjj>>r3   c                    V # r   rH   r  s   &r0   __iter__CSVReader.__iter__g  r   r3   c                    \        V P                  4      p\        P                  ^ ,          ^8  d@   \	        V4       F0  w  r#\        V\        4      '       d   K  VP                  R4      W&   K2  	  V# )r   r   )nextr  r   r   r  r   r   rP  )r   r+   rl   r  s   &   r0   r.  CSVReader.nextj  sX    dkk"A"$V,!$	22 $G 4FI - r3   )r  r   N)
r   r   r   r   r   r+  r.  __next__r   r   r   s   @r0   r&  r&  Z  s     	? Hr3   r&  c                   ,   a  ] tR tRt o R tR tRtV tR# )	CSVWriteriu  c                    \        VR 4      V n        \        P                  ! V P                  3/ V P                  B V n        R# )r1  N)r  r   r(  writerr$  )r   r  r  s   &&,r0   r   CSVWriter.__init__w  s-    C(jj>>r3   c                    \         P                  ^ ,          ^8  dF   . pV F;  p\        V\        4      '       d   VP	                  R4      pVP                  V4       K=  	  TpV P                  P                  V4       R# )r   r   N)r   r   r   r   r@  r%   r4  writerow)r   rowr  r  s   &&  r0   r7  CSVWriter.writerow{  sc    A"AdI..;;w/D  CS!r3   )r   r4  N)r   r   r   r   r   r7  r   r   r   s   @r0   r2  r2  u  s     ?" "r3   r2  c                   v   a a ] tR tRt o]! ]P                  4      tR]R&   R	V 3R lltR tR t	R t
RtVtV ;t# )
Configuratori  inc_convertincc                v   < \         \        V `  V4       T;'       g    \        P                  ! 4       V n        R # r   )superr;  r   ru   r   r   )r   configr   	__class__s   &&&r0   r   Configurator.__init__  s'    lD*62''BIIK	r3   c                  a a VV 3R  loVP                  R4      p\        V4      '       g   S P                  V4      pVP                  RR4      pVP                  RR4      pV'       d"   \        V Uu. uF  pS! V4      NK  	  up4      pV Uu. uF&  p\	        V4      '       g   K  VS! W,          4      3NK(  	  pp\        V4      pV! V/ VB p	V'       d,   VP                  4        F  w  r\        WS! V4      4       K  	  V	# u upi u upi )c                 Z  < \        V \        \        34      '       d*   \        V 4      ! V  Uu. uF  pS! V4      NK  	  up4      pV# \        V \        4      '       d9   R V 9   d   SP                  V 4      pV# / pV  F  pS! W,          4      W#&   K  	   V# SP                  V 4      pV# u upi ())r   rv  r:  typedictconfigure_customconvert)orl   r+   r   rJ  r   s   &   r0   rJ  .Configurator.configure_custom.<locals>.convert  s    !dE]++aa!8a'!*a!89 M At$$19!2215F M  F$+ADM	  M aM "9s   B(rF  r  Nz[]rH   )r|   r  r  r:  r   rH  r   setattr)r   r@  r   propsr  rK  r   r   r  r+   r  rW   rJ  s   f&          @r0   rI  Configurator.configure_custom  s    	 JJt{{QA

3%zz$#d3d'!*d34D28K&QKN(!WVY'(&KeD#F#71:. & 4Ks   2DD	&D	c                    V P                   V,          p\        V\        4      '       d(   R V9   d!   V P                  V4      ;V P                   V&   pV# rE  )r@  r   rH  rI  )r   r   r+   s   && r0   __getitem__Configurator.__getitem__  sF    S!fd##(,(=(=f(EEDKKvr3   c                L   \         P                  P                  V4      '       g+   \         P                  P                  V P                  V4      p\
        P                  ! VRRR7      ;_uu_ 4       p\        P                  ! V4      pRRR4       V#   + '       g   i     X# ; i)z*Default converter for the inc:// protocol.r  r   r2  N)	ru   rv   isabsr'   r   r   r5  r   r   )r   r   r<  r+   s   &&  r0   r<  Configurator.inc_convert  sg    ww}}U##GGLLE2E[[g66!YYq\F 7 76s   1BB#	r  r   )r   r   r   r   rH  r   value_convertersr   rI  rQ  r<  r   r   __classcell__)rA  r   s   @@r0   r;  r;    s<     ,==>+U(@ r3   r;  c                   :   a  ] tR tRt o RtRR ltR tR tRtV t	R# )	SubprocessMixini  z;
Mixin for running subprocesses and capturing their output
Nc                    Wn         W n        R # r   )verboseprogress)r   r[  r\  s   &&&r0   r   SubprocessMixin.__init__  s     r3   c                   V P                   pV P                  p VP                  4       pV'       g   MVe   V! WR4       K(  V'       g!   \        P                  P                  R4       M.\        P                  P                  VP                  R4      4       \        P                  P                  4        K  VP                  4        R# )z
Read lines from a subprocess' output stream and either pass to a progress
callable (if specified) or write progress information to sys.stderr.
Nr  r   )	r\  r[  readliner   stderrr   rP  flushr   )r   r   r  r\  r[  r/   s   &&&   r0   r  SubprocessMixin.reader  s    
 ==,,!A#$JJ$$S)JJ$$QXXg%67

  "r3   c                r   \         P                  ! V3R \         P                  R\         P                  /VB p\        P                  ! V P
                  VP                  R 3R7      pVP                  4        \        P                  ! V P
                  VP                  R3R7      pVP                  4        VP                  4        VP                  4        VP                  4        V P                  e   V P                  RR4       V# V P                  '       d    \        P                  P                  R4       V# )stdoutr`  )r  r  zdone.mainzdone.
)
subprocessPopenPIPE	threadingThreadr  rd  r  r`  waitr'   r\  r[  r   r   )r   cmdr  r   t1t2s   &&,   r0   run_commandSubprocessMixin.run_command  s    S[[[TZ[T[[(7KL

T[[(7KL

	
	
	==$MM'6*  \\\JJY'r3   )r\  r[  r  )
r   r   r   r   r  r   r  ro  r   r   r   s   @r0   rY  rY    s     !* r3   rY  c                N    \         P                  ! RRV 4      P                  4       # )z,Normalize a python package name a la PEP 503z[-_.]+r  )r  subr   )r]   s   &r0   normalize_namers    s      66(C&,,..r3   c                   >   a  ] tR tRt o RtRtR	R ltR tR tRt	V t
R# )

PyPIRCFilei  zhttps://upload.pypi.org/legacy/pypiNc                    Vf>   \         P                  P                  \         P                  P                  R4      R4      pWn        W n        R # )Nr  z.pypirc)ru   rv   r'   r  r  r`   )r   r  r`   s   &&&r0   r   PyPIRCFile.__init__  s4    :bgg005yABr3   c           
        / p\         P                  P                  V P                  4      '       Ed   V P                  ;'       g    V P
                  p\        P                  ! 4       pVP                  V P                  4       VP                  4       pR V9   Ed1   VP                  R R4      pVP                  R4       Uu. uF)  qfP                  4       R8w  g   K  VP                  4       NK+  	  ppV. 8X  d   RV9   d   R.pV# V F  pRV/pVP                  VR4      VR&   RV P
                  3RV P                  3R3 F5  w  rVP                  Wh4      '       d   VP                  Wh4      W&   K1  WV&   K7  	  VR8X  d$   W P
                  R39   d   V P
                  VR&   K  VR,          V8w  g   K  VR,          V8w  g   K  / pK  	   V# R
V9   dp   R
pVP                  VR4      '       d   VP                  VR4      pMV P
                  pRVP                  VR4      R	VP                  VR	4      RVRVRV P                  /pV# u upi )	distutilszindex-serversrJ  r   rv  serverr  
repositoryrealmr  zserver-login)r  N)ru   rv   r  r  r`   DEFAULT_REPOSITORYr   RawConfigParserr   r   r  r   rb   DEFAULT_REALM
has_option)
r   r+   r|  r@  r   index_serversr{  _serversr   r   s
   &         r0   r   PyPIRCFile.read  s,   77>>$--((<<T%<%<J!113FKK&(Hh& &

; H9F9L9LT9Rk9RvVbVbVdhjVjNFLLN9Rkr>)$*8F C #+"*F!3-3ZZ
-Kz* /;D<S<S-TW^`d`r`rVs-?-ALC%00==.4jj.E.5s-A #f,@W@WY_?`1`373J3JF<0$X.*<AUYcAc%'F% #+B   8+'$$V\::!'FL!AJ!%!8!8J

6: >

6: > *fT// O ls    IIc                   \         P                  ! 4       pV P                  pVP                  V4       VP	                  R 4      '       g   VP                  R 4       VP                  R RV4       VP                  R RV4       \        VR4      ;_uu_ 4       pVP                  V4       RRR4       R#   + '       g   i     R# ; i)rv  r  r  r1  N)	r   r  r  r   has_sectionr   r   r5  r   )r   r  r  r@  r  r<  s   &&&   r0   r  PyPIRCFile.updateB  s    --/]]B!!&))v&

6:x0

6:x0"c]]aLLO ]]]s   B11C	)r  r`   NN)r   r   r   r   r~  r  r   r   r  r   r   r   s   @r0   ru  ru    s%     :M3j
 
r3   ru  c                J    \        V P                  R7      P                  4       # )z?
Read the PyPI access configuration as supported by distutils.
)r`   )ru  r`   r   r@  s   &r0   _load_pypircr  O  s     %))$))++r3   c                 b    \        4       P                  V P                  V P                  4       R # r   )ru  r  r  r  r  s   &r0   _store_pypircr  V  s    L7r3   c                 t   \         P                  R8X  d   R\        P                  P	                  4       9   d   R# R\        P                  P	                  4       9   d   R# R\        P                  P	                  4       9   d   R# \        P
                  # R\         P                  9   d   \         P                  R,          # \         P                  R	8w  g   \        \         R
4      '       g   \        P
                  # \         P                  ! 4       w  rr#pV P	                  4       P                  RR4      p VP                  RR4      P                  RR4      pV R,          R8X  d
   V : RV: 2# V R,          R8X  df   V^ ,          R8  dW   Rp R\        V^ ,          4      ^,
          VR,          3,          pRRRR/pVRV\        P                  ,          ,          ,          pMV R,          R8X  d   ^ RIHp V! 4       # V R,          R 8X  dR   R p \        P                  ! R!\        P                   4      pVP#                  V4      pV'       d   VP%                  4       pM=V R,          R"8X  d0   ^ R#Ip	 ^ R$IHp
 V	P/                  V
P1                  4       WV4      w  rpV : RV: RV: 2#   \,         d    ^ R#Ip
 LBi ; i)%a  Return a string that identifies the current platform.  This is used mainly to
distinguish platform-specific build directories and platform-specific built
distributions.  Typically includes the OS name and version and the
architecture (as supplied by 'os.uname()'), although the exact information
included depends on the OS; eg. on Linux, the kernel version isn't
particularly important.

Examples of returned values:
   linux-i586
   linux-alpha (?)
   solaris-2.6-sun4u

Windows will return one of:
   win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
   win32 (all others - specifically, sys.platform is returned)

For other non-POSIX platforms, currently just returns 'sys.platform'.

r  amd64	win-amd64z(arm)	win-arm32z(arm64)z	win-arm64_PYTHON_HOST_PLATFORMrD  unamert   r   r[   rn   r  :N   Nlinuxsunos5solarisz%d.%s:   NNi32bitl    64bitz.%s:N   Naix)aix_platform:N   Ncygwinz[\d.]+darwinN)	sysconfig)ru   r]   r   r  r   platformr  r   r  r$   intmaxsize_aix_supportr  r  rZ  ASCIIr    r   _osx_supportrz  r  ImportErrorget_platform_osxget_config_vars)osnamer  releaser  machinebitnessr  rel_rer*   r  r  s              r0   get_host_platformr  `  s%   ( 
ww$ckk''))ckk''))))++|| "**,zz122	ww'W!5!5 || 13
-V7W \\^##C,Fooc3'//S9GbzW !'**	w	1:FWQZ1!4gbk BBG "7,?IGuws{{333G	u	-~	x	Irxx0LL!ggiG	x		+ $0#@#@AZAZA\^dov#w '22	  		s   .J% %J76J7x86win32x64r  armr  c                      \         P                  R 8w  d   \        4       # \         P                  P	                  R4      p V \
        9  d   \        4       # \
        V ,          # )r  VSCMD_ARG_TGT_ARCH)ru   r]   r  r  r  _TARGET_TO_PLAT)cross_compilation_targets    r0   get_platformr    sG    	ww$ ""!zz~~.BC6 ""344r3   r  )   r   r  )re  rg  rX  rc  rf  rh  rd  r  )r   KMGTP)r   collectionsr   
contextlibr(  globr   r  rt  r   loggingru   rX  r  r   r  r  rf  r   r[  r   r   ri  dummy_threadingr  r   r   compatr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	getLoggerr   r$  rZ  r   rT   rS   r;   rF   rA   re   r&   rJ   rq   r   r   r   r   r   r   r   contextmanagerr   r   r   r   r   r  r  r  r  VERBOSEr  r   r  r  r  r  r  r  Ir  r  r  r  r  r  r  r  r  r  r  r  r  ARCHIVE_EXTENSIONSrr  r|  r  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r&  r2  r;  rY  rs  ru  r  r  r  r  r  rH   r3   r0   <module>r     s  
    
 # 	   	  	   
   (  2 2 2 2 2 2 
		8	$ ZZ)*
ZZ 34 ZZ56
JJDE	ZZjjJJ{#	zzEFW!tytx4$ ,^&     & &f   6w6 wt& 4 :: ::	'>&(R"& :: '89;? ,-4 ** 9 :/ 8* D #)F )XC CRF! F!Z U AH$ 	&W+v W+| JJ~&	

#?@ jj!56 8 \\'11 B' T3< 3#	## # '	// '"<)'' <2$f  6" ",5# 5p+f +\/"J JZ,8P3h 
7	;	;5O=  
C  ('(s#   N N 	NNN*)N*