+
    i                        R 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Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHtHtHt ]'       d   ^ R
IHt ^ RI H!t!H"t" ]! R]#4      t$]%]$R3,          t&. R*Ot']PP                  R8H  t)])'       d   R+MR,t*]PV                  ! R]PX                  ]PZ                  ,          4      t.]
! R. R-O4      t/]PV                  ! R]PX                  ]PZ                  ,          4      t0]! RR.4      t1R R lt2R R lt3R R lt4R R lt5R R lt6R R lt7]Pp                  R R  l4       t9R! 3R" R# llt:R$ R% lt;R& R' lt<R( R) lt=R# )/z=Utilities related to handling / interacting with wheel files.N)
namedtuple)CallableIterableIterator)ConfigParser)Message)
FeedParser)compat32Path)TYPE_CHECKINGBinaryIONewTypecast)RecordEntry)LauncherKindScriptSectionScheme.WheelFilenamentz
    ^
    (?P<distribution>.+?)
    -(?P<version>.*?)
    (?:-(?P<build_tag>\d[^-]*?))?
    -(?P<tag>.+?-.+?-.+?)
    \.whl
    $
    zZ
    (?P<module>[\w.]+)\s*
    (:\s*(?P<attrs>[\w.]+))\s*
    (?P<extras>\[.*\])?\s*$
    
AllSchemesc                0    V ^8  d   QhR\         R\        /# )   contentsreturn)strr   )formats   "@/root/miniconda3/lib/python3.14/site-packages/installer/utils.py__annotate__r   P   s     
 
# 
' 
    c                d    \        \        R7      pVP                  V 4       VP                  4       # )zParse :pep:`376` ``PKG-INFO``-style metadata files.

``METADATA`` and ``WHEEL`` files (as per :pep:`427`) use the same syntax
and can also be parsed using this function.

:param contents: The entire contents of the file
)policy)r   r	   feedclose)r   feed_parsers   & r   parse_metadata_filer%   P   s+     H-KXr   c                0    V ^8  d   QhR\         R\         /# )r   namer   )r   )r   s   "r   r   r   ]   s     0 0C 0C 0r   c                N    \         P                  ! RRV 4      P                  4       # )zaCanonicalize a project name according to PEP-503.

:param name: The project name to canonicalize
z[-_.]+-)resublower)r'   s   &r   canonicalize_namer-   ]   s     
 66)S$'--//r   c                0    V ^8  d   QhR\         R\        /# )r   filenamer   )r   r   )r   s   "r   r   r   e   s     / /3 /= /r   c                    \         P                  V 4      pV'       g   \        RV  24      h\        VP	                  4       !  # )z^Parse a wheel filename, into it's various components.

:param filename: The filename to parse
zNot a valid wheel filename: )_WHEEL_FILENAME_REGEXmatch
ValueErrorr   groups)r/   
wheel_infos   & r   parse_wheel_filenamer6   e   s>    
 ',,X6J7zBCC*++-..r   c          
      j    V ^8  d   QhR\         R\         R\        R\        \        \        3,          /# )r   sourcedesthash_algorithmr   )r   r   tupleint)r   s   "r   r   r   p   s>     W WW
W W 38_	Wr   c                d   \         P                  ! V4      p^ p V P                  \        4      pV'       g   M6VP	                  V4       VP                  V4       V\        V4      ,          pKU  \        P                  ! VP                  4       4      P                  R4      P                  R4      V3# )aw  Copy a buffer while computing the content's hash and size.

Copies the source buffer into the destination buffer while computing the
hash of the contents. Adapted from :any:`shutil.copyfileobj`.

:param source: buffer holding the source data
:param dest: destination buffer
:param hash_algorithm: hashing algorithm

:return: hash digest of the contents, size of the contents
ascii=)hashlibnewread_COPY_BUFSIZEupdatewritelenbase64urlsafe_b64encodedigestdecoderstrip)r8   r9   r:   hashersizebufs   &&&   r   copyfileobj_with_hashingrO   p   s      [[(FD
kk-(c

3C##FMMO4;;GDKKCPRVVVr   c                0    V ^8  d   QhR\         R\        /# )r   r8   r   )r   r<   )r   s   "r   r   r      s      h 3 r   c                p    ^ p V P                  \        4      pV'       g    V# V\        V4      ,          pK5  )zRead a buffer while computing the content's size.

:param source: buffer holding the source data
:return: size of the contents
)rB   rC   rF   )r8   rM   rN   s   &  r   get_stream_lengthrR      s7     D
kk-( K 	Cr   c                    V ^8  d   QhRR/# )r   r   r    )r   s   "r   r   r      s     H H> Hr   c                 R   \         P                  R8w  d   R# R\        P                  P	                  4       9   d   R# R\        P                  P	                  4       9   d   R# R\        P                  P	                  4       9   d   R# \        P
                  R	8X  d   R
# \        R4      h)z.Get the launcher kind for the current machine.r   posixamd64z	win-amd64z(arm64)z	win-arm64z(arm)zwin-armwin32zwin-ia32z&Unknown launcher kind for this machine)osr'   sysversionr,   platformNotImplementedErrorrT   r   r   get_launcher_kindr^      ss    	ww$#++##%%CKK%%''#++##%%
||w
F
GGr   c                R    V ^8  d   QhR\         R\        R\        \         ,          /# )r   streaminterpreterr   )r   r   r   )r   s   "r   r   r      s&       s x7I r   c              #    "   V P                  ^ 4       V P                  ^4      R8X  d   \        P                  ! 4       pVP	                  RV R2P                  4       4       V P                  ^ 4       V P                  4         V P                  \        4      pV'       g   MVP	                  V4       K2  VP                  ^ 4       Vx  VP                  4        R# V P                  ^ 4       V x  R# 5i)zReplace ``#!python`` shebang in a stream with the correct interpreter.

:param stream: stream to modify
:param interpreter: "correct interpreter" to substitute the shebang with

:returns: A context manager, that provides an appropriately modified stream.
s   #!pythonz#!
N)	seekrB   ioBytesIOrE   encodereadlinerC   r#   )r`   ra   
new_streamrN   s   &&  r   fix_shebangrj      s      KKN{{1~$ZZ\
2k]"-4467A++m,CS!As   BC3!AC3c                     R # )NrT   )_s   &r   <lambda>rm      s    $r   c                    V ^8  d   QhR\         \        \        R3,          ,          R\        \        .\        R,          3,          R\
        /# )r   recordsr   prefix_for_schemeNr   )r   r;   r   r   r   r   )r   s   "r   r   r      sE      eFM123#* 45 r   c                L   \         P                  ! \         P                  ! 4       RRRR7      p\        P                  ! VRRRR7      p\        V R	 R
7       F+  w  rEVP                  VP                  V! V4      4      4       K-  	  VP                  ^ 4       VP                  4       # )a'  Construct a RECORD file.

:param records:
    ``records`` as passed into :any:`WheelDestination.finalize_installation`
:param prefix_for_scheme:
    function to get a prefix to add for RECORD entries, within a scheme

:return: A stream that can be written to file. Must be closed by the caller.
zutf-8T )encodingwrite_throughnewline,"rc   )	delimiter	quotecharlineterminatorc                 (    V ^,          P                   # )   path)xs   &r   rm   'construct_record_file.<locals>.<lambda>   s    !		r   )key)
re   TextIOWrapperrf   csvwritersortedwriterowto_rowrd   detach)ro   rp   r`   r   schemerecords   &&    r   construct_record_filer      s     


wdBF ZZ#TRF .AB&7&?@A C
KKN==?r   c          	      t    V ^8  d   QhR\         R\        \        \         \         \         R3,          ,          /# )r   textr   r   )r   r   r;   )r   s   "r   r   r      s-     6 6C 6HU3S/3Q-R$S 6r   c           
   #  .  "   \        RR7      p\        Vn        VP                  V 4       VP	                  4        F  pVR9  d   K  VP                  V4       F  w  r4\        V\        4      '       g   Q h\        P                  V4      pV'       g   Q hVP                  R4      p\        V\        4      '       g   Q hVP                  R4      pVf   Q h\        V\        4      '       g   Q h\        RVR\        R4      )  4      pW6Wx3x  K  	  K  	  R# 5i)	zParse ``entry_points.txt``-style files.

:param text: entire contents of the file
:return:
    name of the script, module to use, attribute to call, kind of script (cli / gui)
r?   )
delimitersmoduleattrsNr   _scripts)console_scriptsgui_scripts)r   r   optionxformread_stringsectionsitems
isinstance_ENTRYPOINT_REGEXr2   groupr   rF   )	r   configsectionr'   valuer2   r   r   script_sections	   &        r   parse_entrypointsr      s      S)FF
t??$<<!<<0KDdC((((%++E2EL5[[*Ffc****KK(E$$$eS))))!/7;Mc*o=M3NON55 1	 %s   BDBDc                $    V ^8  d   QhR\         /# )r   r   )r<   )r   s   "r   r   r     s       r   c                 ^    \         P                  ! ^ 4      p \         P                  ! V 4       V # )zBGet the current umask which involves having to set it temporarily.)rY   umask)masks    r   _current_umaskr     s    88A;DHHTNKr   c                (    V ^8  d   QhR\         RR/# )r   r~   r   Nr
   )r   s   "r   r   r     s     2 2t 2 2r   c                V    V P                  R\        4       ( ,          ^I,          4       R# )z.Make the file at the provided path executable.i  N)chmodr   r}   s   &r   make_file_executabler     s    JJu(((501r   )
SCHEME_NAMESr   r   rO   rj   r^   r   r   r%   r6   i   i   )distributionr[   	build_tagtag)purelibplatlibheadersscriptsdata)>__doc__rG   
contextlibr   r@   re   rY   r*   rZ   collectionsr   collections.abcr   r   r   configparserr   email.messager   email.parserr   email.policyr	   pathlibr   typingr   r   r   r   installer.recordsr   installer.scriptsr   r   r   r   r;   r   __all__r'   _WINDOWSrC   compileVERBOSEUNICODEr1   r   r   r   r%   r-   r6   rO   rR   r^   contextmanagerrj   r   r   r   r   rT   r   r   <module>r      sL   C   
  	 	 	 
 " 8 8 % ! # !   -=	3	63;
 77d?'Y 

 JJ  D
 JJ
 JJ  L"VW
0/W: H"  > 9G.6D2r   