
   ٠>gG                      d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlZd dlZddlmZmZ ddlmZmZ ddlmZmZ ddlmZmZ ddlmZmZ d dlmZ d d	lm Z  d d
l!m"Z" d dlm#Z# d dl$m%Z%m&Z&m'Z'm(Z( g dZ) G d de*          Z+ G d d          Z, G d d          Z- G d de-          Z. G d de/          Z0 G d de0          Z1 G d d          Z2 G d de2e3          Z4 G d dej5                  Z6 G d  d!          Z7 G d" d#          Z8 G d$ d%e"          Z9 G d& d'          Z: G d( d)          Z; G d* d+          Z< G d, d-e9          Z= G d. d/e8          Z>d0 Z?d1 Z@d2ej        fd3ZAd4 ZB ejC        e ejD        d5          6          ZE	 d2e(e1e4f         fd7ZFd8 ZGd9 ZHd2e&eIe%eI         f         fd:ZJd; ZKd< ZLdS )=    N   )	_adapters_meta)FreezableDefaultDictPair)method_cache	pass_none)always_iterableunique_everseen)PackageMetadata
SimplePath)suppress)import_module)MetaPathFinder)starmap)ListMappingOptionalUnion)DistributionDistributionFinderr   PackageNotFoundErrordistributiondistributionsentry_pointsfilesmetadatapackages_distributionsrequiresversionc                   ,    e Zd Z	 d Zed             ZdS )r   c                     d| j          S )Nz"No package metadata was found for nameselfs    i/nix/store/c6yb989sl77467xxwhylnkph1pqyi47p-python3-3.11.15/lib/python3.11/importlib/metadata/__init__.py__str__zPackageNotFoundError.__str__1   s    ?DI???    c                     | j         \  }|S N)argsr&   r$   s     r'   r$   zPackageNotFoundError.name4   s    )r)   N)__name__
__module____qualname__r(   propertyr$    r)   r'   r   r   .   sD        $@ @ @   X  r)   r   c                       e Zd Z	  ej        d                                          Zed             Ze	dd            Z
e	d             ZdS )	Sectionedzm
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        c                 N    d |                      || j                  D             S )Nc              3   ~   K   | ]8}|j         	|                    t          j        |j                            V  9d S )N)value)r$   _replacer   parser7   ).0sections     r'   	<genexpr>z*Sectioned.section_pairs.<locals>.<genexpr>e   sS       
 
|' 4:gm#<#<==''''
 
r)   )filter_)readvalid)clstexts     r'   section_pairszSectioned.section_pairsc   s5    
 
88D#)8<<
 
 
 	
r)   Nc              #   4  K   t          |t          t          j        |                                                     }d }|D ]V}|                    d          o|                    d          }|r|                    d          }Dt          ||          V  Wd S )N[]z[])filtermapstrstrip
splitlines
startswithendswithr   )rA   r=   linesr$   r7   section_matchs         r'   r>   zSectioned.readk   s      wCIt/@/@ A ABB 	$ 	$E!,,S11IennS6I6IM {{4((tU######	$ 	$r)   c                 2    | o|                      d           S )N#)rK   )lines    r'   r?   zSectioned.validv   s    0DOOC0000r)   r+   )r.   r/   r0   textwrapdedentlstrip_sampleclassmethodrB   staticmethodr>   r?   r2   r)   r'   r4   r4   :   s        8 ho	
 
 fhh  
 
 [
 $ $ $ \$ 1 1 \1 1 1r)   r4   c                   H    e Zd Z	  ej        ej        ded          Zd Z	dS )DeprecatedTuplezAEntryPoint tuple interface is deprecated. Access members by name.   
stacklevelc                 ^    |                                   |                                 |         S r+   )_warn_key)r&   items     r'   __getitem__zDeprecatedTuple.__getitem__   s"    

yy{{4  r)   N)
r.   r/   r0   	functoolspartialwarningswarnDeprecationWarningr^   ra   r2   r)   r'   rY   rY   {   sQ         IK	  E! ! ! ! !r)   rY   c                       e Zd ZU 	  ej        d          Z	 eed<   eed<   eed<   dZe	d         ed<   d Z
d	 Zed
             Zed             Zed             Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )
EntryPointzH(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+)\s*)?((?P<extras>\[.*\])\s*)?$r$   r7   groupNr   distc                 P    t          |                               |||           d S )Nr$   r7   ri   varsupdate)r&   r$   r7   ri   s       r'   __init__zEntryPoint.__init__   s)    T

t5>>>>>r)   c                 ,   	 | j                             | j                  }t          |                    d                    }t          d |                    d          pd                    d                    }t          j        t          ||          S )Nmoduleattr .)
patternmatchr7   r   ri   rF   splitrb   reducegetattr)r&   rw   rr   attrss       r'   loadzEntryPoint.load   s|    	 ""4:..u{{84455tekk&117R>>sCCDD777r)   c                 j    | j                             | j                  }|                    d          S )Nrr   rv   rw   r7   ri   r&   rw   s     r'   rr   zEntryPoint.module   s+    ""4:..{{8$$$r)   c                 j    | j                             | j                  }|                    d          S )Nrs   r~   r   s     r'   rs   zEntryPoint.attr   s+    ""4:..{{6"""r)   c                     | j                             | j                  }t          j        d|                    d          pd          S )Nz\w+extrasrt   )rv   rw   r7   refindallri   r   s     r'   r   zEntryPoint.extras   s<    ""4:..z&%++h"7"7"=2>>>r)   c                 L    t          |                               |           | S )Nrj   rm   )r&   rj   s     r'   _forzEntryPoint._for   s$    T

t$$$r)   c                 h    	 d}t          j        |t                     t          | j        | f          S )NzJConstruction of dict of EntryPoints is deprecated in favor of EntryPoints.)rd   re   rf   iterr$   )r&   msgs     r'   __iter__zEntryPoint.__iter__   s;    	$ 	 	c-...TY%&&&r)   c                      	  fd|D             }t          t          t          j        |                                |                    S )Nc              3   8   K   | ]}t          |          V  d S r+   rz   )r:   paramr&   s     r'   r<   z%EntryPoint.matches.<locals>.<genexpr>   s-      ::%u%%::::::r)   )allrG   operatoreqvalues)r&   paramsr{   s   `  r'   matcheszEntryPoint.matches   sG    	& ;:::6:::3x{FMMOOU;;<<<r)   c                 *    | j         | j        | j        fS r+   rl   r%   s    r'   r_   zEntryPoint._key  s    y$*dj00r)   c                 V    |                                  |                                 k     S r+   r_   r&   others     r'   __lt__zEntryPoint.__lt__  s    yy{{UZZ\\))r)   c                 V    |                                  |                                 k    S r+   r   r   s     r'   __eq__zEntryPoint.__eq__	  s    yy{{ejjll**r)   c                      t          d          )Nz!EntryPoint objects are immutable.)AttributeError)r&   r$   r7   s      r'   __setattr__zEntryPoint.__setattr__  s    @AAAr)   c                 8    d| j         d| j        d| j        dS )NzEntryPoint(name=z, value=z, group=)rl   r%   s    r'   __repr__zEntryPoint.__repr__  s<    %ty % %DJ % %Z% % %	
r)   c                 D    t          |                                           S r+   )hashr_   r%   s    r'   __hash__zEntryPoint.__hash__  s    DIIKK   r)   )r.   r/   r0   r   compilerv   rH   __annotations__rj   r   rp   r|   r1   rr   rs   r   r   r   r   r_   r   r   r   r   r   r2   r)   r'   rh   rh      se          bj	% G
  IIIJJJJJJ%)D(>
")))? ? ?8 8 8 % % X% # # X# ? ? X?  	' 	' 	'= = =.1 1 1* * *+ + +B B B
 
 
! ! ! ! !r)   rh   c                        e Zd Z	 dZ ej        ej        ded          Z	de
f fdZ e                                 eed                                                     d Zd	 Z xZS )
DeprecatedListr2   zAEntryPoints list interface is deprecated. Cast to list if needed.rZ   r[   method_namec                       fd} |fS )Nc                 p    |                                    t          t                                |i |S r+   )r^   rz   super)r&   r,   kwargs	__class__r   s      r'   wrappedz7DeprecatedList._wrap_deprecated_method.<locals>.wrappedC  s3    JJLLL07577K00$A&AAAr)   r2   )r   r   r   s   ` r'   _wrap_deprecated_methodz&DeprecatedList._wrap_deprecated_methodB  s5    	B 	B 	B 	B 	B 	B G##r)   zM__setitem__ __delitem__ append reverse extend pop remove __iadd__ insert sortc                     t          |t                    s#|                                  t          |          }|                     t          |           |z             S r+   )
isinstancetupler^   r   r   s     r'   __add__zDeprecatedList.__add__Q  sI    %'' 	!JJLLL%LLE~~eDkkE1222r)   c                     t          |t                    s#|                                  t          |          }t          |                               |          S r+   )r   r   r^   r   r   s     r'   r   zDeprecatedList.__eq__W  sF    %'' 	!JJLLL%LLET{{!!%(((r)   )r.   r/   r0   	__slots__rb   rc   rd   re   rf   r^   rH   r   localsro   rG   rx   r   r   __classcell__r   s   @r'   r   r     s        > IIK	  E$S $ $ $ $ $ $ FHHOO###(577	
 	
  3 3 3) ) ) ) ) ) )r)   r   c                        e Zd Z	 dZ fdZd Zed             Zed             Ze	d             Z
ed             Z xZS )EntryPointsr2   c                 F   	 t          |t                    r=t          j        dt          d           t                                          |          S 	 t          t          | 	                    |                              S # t          $ r t          |          w xY w)NzGAccessing entry points by index is deprecated. Cast to tuple if needed.rZ   r[   r#   )r   intrd   re   rf   r   ra   nextr   selectStopIterationKeyErrorr&   r$   r   s     r'   ra   zEntryPoints.__getitem__f  s    	 dC   	-M+"	    77&&t,,,	!T[[d[3344555 	! 	! 	!4.. 	!s   /B B c                 <    	 t          fd| D                       S )Nc              3   6   K   | ]} |j         di |V  d S Nr2   )r   )r:   epr   s     r'   r<   z%EntryPoints.select.<locals>.<genexpr>|  s:      EE"

0D0DV0D0DE2EEEEEEr)   r   r&   r   s    `r'   r   zEntryPoints.selectw  s-    	 EEEEEEEEEEr)   c                     	 d | D             S )Nc                     h | ]	}|j         
S r2   r#   r:   r   s     r'   	<setcomp>z$EntryPoints.names.<locals>.<setcomp>  s    '''B'''r)   r2   r%   s    r'   nameszEntryPoints.names~  s    	 ('$''''r)   c                     	 d | D             S )Nc                     h | ]	}|j         
S r2   )ri   r   s     r'   r   z%EntryPoints.groups.<locals>.<setcomp>  s    (((R(((r)   r2   r%   s    r'   groupszEntryPoints.groups  s    	 )(4((((r)   c                 X     | fd|                      |          D                       S )Nc              3   B   K   | ]}|                               V  d S r+   )r   )r:   r   rj   s     r'   r<   z-EntryPoints._from_text_for.<locals>.<genexpr>  s-      @@R2774==@@@@@@r)   )
_from_text)r@   rA   rj   s     `r'   _from_text_forzEntryPoints._from_text_for  s4    s@@@@3>>$+?+?@@@@@@r)   c                 N    d t                               | pd          D             S )Nc              3   l   K   | ]/}t          |j        j        |j        j        |j                   V  0dS )rl   N)rh   r7   r$   )r:   r`   s     r'   r<   z)EntryPoints._from_text.<locals>.<genexpr>  sP       
 
 DJO4:3C49UUU
 
 
 
 
 
r)   rt   )r4   rB   )rA   s    r'   r   zEntryPoints._from_text  s5    
 
!//
;;
 
 
 	
r)   )r.   r/   r0   r   ra   r   r1   r   r   rV   r   rW   r   r   r   s   @r'   r   r   _  s         I! ! ! ! !"F F F ( ( X( ) ) X) A A [A 
 
 \
 
 
 
 
r)   r   c                        e Zd Z	  ej        ej        ded          Z fdZ	d fd	Z
 fdZ fdZ fd	Z fd
Z xZS )
Deprecatedz:SelectableGroups dict interface is deprecated. Use select.rZ   r[   c                 n    |                                   t                                          |          S r+   )r^   r   ra   r   s     r'   ra   zDeprecated.__getitem__  s(    

ww""4(((r)   Nc                 p    |                                   t                                          ||          S r+   )r^   r   get)r&   r$   defaultr   s      r'   r   zDeprecated.get  s(    

ww{{4)))r)   c                 l    |                                   t                                                      S r+   )r^   r   r   r&   r   s    r'   r   zDeprecated.__iter__  s&    

ww!!!r)   c                 X    |                                    t                      j        | S r+   )r^   r   __contains__)r&   r,   r   s     r'   r   zDeprecated.__contains__  s$    

#uww#T**r)   c                 l    |                                   t                                                      S r+   )r^   r   keysr   s    r'   r   zDeprecated.keys  s"    

ww||~~r)   c                 l    |                                   t                                                      S r+   )r^   r   r   r   s    r'   r   zDeprecated.values  s$    

ww~~r)   r+   )r.   r/   r0   rb   rc   rd   re   rf   r^   ra   r   r   r   r   r   r   r   s   @r'   r   r     s        , ID	  E) ) ) ) )* * * * * *" " " " "+ + + + +                     r)   r   c                   x     e Zd Z	 ed             Ze fd            Zed             Zed             Zd Z	 xZ
S )SelectableGroupsc                     t          j        d          }t          ||          }t          j        ||          } | d |D                       S )Nri   keyc              3   >   K   | ]\  }}|t          |          fV  d S r+   r   )r:   ri   epss      r'   r<   z(SelectableGroups.load.<locals>.<genexpr>  s3      GGE;s++,GGGGGGr)   )r   
attrgettersorted	itertoolsgroupby)r@   r   by_grouporderedgroupeds        r'   r|   zSelectableGroups.load  sU    &w//(+++#GX66sGGwGGGGGGr)   c                     	 t          t          |                                           }t          t          j                            |                    S r+   )r   r   r   r   r   chainfrom_iterable)r&   r   r   s     r'   _allzSelectableGroups._all  sC    	 z4((//119?88@@AAAr)   c                     | j         j        S r+   )r   r   r%   s    r'   r   zSelectableGroups.groups  s    yr)   c                     	 | j         j        S r+   )r   r   r%   s    r'   r   zSelectableGroups.names  s    	
 yr)   c                 .    |s| S  | j         j        di |S r   )r   r   r   s     r'   r   zSelectableGroups.select  s*     	Kty))&)))r)   )r.   r/   r0   rV   r|   r1   r   r   r   r   r   r   s   @r'   r   r     s        
 H H [H B B B B XB     X    X* * * * * * *r)   r   c                   $    e Zd Z	 ddZd Zd ZdS )PackagePathutf-8c                     |                                                      |          5 }|                                cd d d            S # 1 swxY w Y   d S )Nencodinglocateopenr>   )r&   r   streams      r'   	read_textzPackagePath.read_text  s    [[]]22 	!f;;==	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!s   A

AAc                     |                                                      d          5 }|                                cd d d            S # 1 swxY w Y   d S )Nrbr  )r&   r  s     r'   read_binaryzPackagePath.read_binary  s    [[]]%% 	!;;==	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!s   A		AAc                 8    	 | j                             |           S r+   )rj   locate_filer%   s    r'   r  zPackagePath.locate  s    5y$$T***r)   N)r   )r.   r/   r0   r  r  r  r2   r)   r'   r   r     sI        ,! ! ! !! ! !+ + + + +r)   r   c                       e Zd Zd Zd ZdS )FileHashc                 L    |                     d          \  | _        }| _        d S )N=)	partitionmoder7   )r&   spec_s      r'   rp   zFileHash.__init__  s"    #'>>##6#6 	1djjjr)   c                 (    d| j          d| j         dS )Nz<FileHash mode: z value: >)r  r7   r%   s    r'   r   zFileHash.__repr__  s    B$)BBTZBBBBr)   N)r.   r/   r0   rp   r   r2   r)   r'   r  r    s7        7 7 7C C C C Cr)   r  c                      e Zd Z	 ej        d             Zej        d             Zedefd            Z	ed             Z
ed             Zed             Zedej        fd	            Zed
             Zed             Zed             Zed             Zed             Zd Zd Zed             Zd Zd Zed             Zed             ZdS )r   c                     d S r+   r2   r&   filenames     r'   r  zDistribution.read_text  s    	 	r)   c                     d S r+   r2   r&   paths     r'   r
  zDistribution.locate_file  s    	 	r)   r$   c                     	 |st          d          	 t          |                     |                    S # t          $ r t	          |          w xY w)Nz A distribution name is required.r#   )
ValueErrorr   discoverr   r   )r@   r$   s     r'   	from_namezDistribution.from_name%  sk    	  	A?@@@	-$//000 	- 	- 	-&t,,,	-s	   "7 Ac                     	 |                     dd           r|rt          d          pt          j        di |t          j                            fd|                                 D                       S )Ncontextz cannot accept context and kwargsc              3   .   K   | ]} |          V  d S r+   r2   )r:   resolverr!  s     r'   r<   z(Distribution.discover.<locals>.<genexpr>E  s>       -
 -
"*HHW-
 -
 -
 -
 -
 -
r)   r2   )popr  r   Contextr   r   r   _discover_resolvers)r@   r   r!  s     @r'   r  zDistribution.discover7  s    	 **Y-- 	Av 	A?@@@A/7AA&AA,, -
 -
 -
 -
.1.E.E.G.G-
 -
 -
 
 
 	
r)   c                 F    	 t          t          j        |                     S r+   )PathDistributionpathlibPath)r  s    r'   atzDistribution.atI  s!    	
  T 2 2333r)   c                  P    	 d t           j        D             } t          d |           S )Nc              3   8   K   | ]}t          |d d          V  dS )find_distributionsNr   )r:   finders     r'   r<   z3Distribution._discover_resolvers.<locals>.<genexpr>U  s@       
 
<BGF0$77
 
 
 
 
 
r)   )sys	meta_pathrF   )declareds    r'   r&  z Distribution._discover_resolversR  s7    1
 
FIm
 
 
 dH%%%r)   returnc                     	 |                      d          p)|                      d          p|                      d          }t          j        t          j        |                    S )NMETADATAzPKG-INFOrt   )r  r   Messageemailmessage_from_stringr&   rA   s     r'   r   zDistribution.metadataZ  se    	 NN:&& "~~j))"
 ~~b!! 	  !:4!@!@AAAr)   c                     	 | j         d         S NNamer   r%   s    r'   r$   zDistribution.namek  s    F}V$$r)   c                 B    	 t                               | j                  S r+   )Prepared	normalizer$   r%   s    r'   _normalized_namezDistribution._normalized_namep  s    6!!$),,,r)   c                     	 | j         d         S )NVersionr=  r%   s    r'   r    zDistribution.versionu  s    I}Y''r)   c                 ^    t                               |                     d          |           S )Nzentry_points.txt)r   r   r  r%   s    r'   r   zDistribution.entry_pointsz  s%    ))$..9K*L*LdSSSr)   c                      	 d fd	t           fd            } |                                 p                                           S )Nc                     t          |           }|rt          |          nd |_        |rt          |          nd |_        |_        |S r+   )r   r  r   r   sizerj   )r$   r   size_strresultr&   s       r'   	make_filez%Distribution.files.<locals>.make_file  sH     &&F,0:(4...dFK+3=#h---FKFKMr)   c                 b    t          t          t          j        |                               S r+   )listr   csvreader)rM   rJ  s    r'   
make_filesz&Distribution.files.<locals>.make_files  s%    	3:e+<+<==>>>r)   )NN)r	   _read_files_distinfo_read_files_egginfo)r&   rO  rJ  s   ` @r'   r   zDistribution.files~  s{    		 	 	 	 	 	 
	? 	? 	? 	? 
	? z$3355S9Q9Q9S9STTTr)   c                 Z    	 |                      d          }|o|                                S )NRECORD)r  rJ   r9  s     r'   rP  z!Distribution._read_files_distinfo  s/    	 ~~h''))))r)   c                     	 |                      d          }|o&t          dj        |                                          S )NzSOURCES.txtz"{}")r  rG   formatrJ   r9  s     r'   rQ  z Distribution._read_files_egginfo  s;    	 ~~m,,=FM4??+<+<===r)   c                 v    	 |                                  p|                                 }|ot          |          S r+   )_read_dist_info_reqs_read_egg_info_reqsrL  )r&   reqss     r'   r   zDistribution.requires  s8    D((**Hd.F.F.H.H"T

"r)   c                 6    | j                             d          S )NzRequires-Dist)r   get_allr%   s    r'   rW  z!Distribution._read_dist_info_reqs  s    }$$_555r)   c                 f    |                      d          } t          | j                  |          S )Nzrequires.txt)r  r	   _deps_from_requires_text)r&   sources     r'   rX  z Distribution._read_egg_info_reqs  s.    //7y677???r)   c                 \    |                      t                              |                    S r+   )%_convert_egg_info_reqs_to_simple_reqsr4   r>   )r@   r^  s     r'   r]  z%Distribution._deps_from_requires_text  s"    889O9OPPPr)   c              #      K   	 d fd}d }| D ]/} ||j                   }|j         |z    ||j                  z   V  0d S )Nc                     | od|  dS )Nz
extra == ""r2   r#   s    r'   make_conditionzJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_condition  s    000000r)   c           	          | pd} |                      d          \  }}}|r|rd| d}t          t          d | |          g                    }|rdd                    |          z   ndS )Nrt   :(r   z; z and )r  rL  rF   join)r;   extrasepmarkers
conditionsrd  s        r'   quoted_markerzIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.quoted_marker  s    mG")"3"3C"8"8E3 ) )(g...fTG^^E5J5J+KLLMMJ6@H4',,z2222bHr)   c                     	 dd| v z  S )N @r2   )reqs    r'   url_req_spacezIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.url_req_space  s    
 #*%%r)   )r7   r$   )sectionsrm  rr  r;   spacerd  s        @r'   r`  z2Distribution._convert_egg_info_reqs_to_simple_reqs  s      		1 	1 	1	I 	I 	I 	I 	I	& 	& 	&   	F 	FG!M'-00E-%'--*E*EEEEEE	F 	Fr)   N)r.   r/   r0   abcabstractmethodr  r
  rV   rH   r  r  rW   r+  r&  r1   r   r   r   r$   rA  r    r   r   rP  rQ  r   rW  rX  r]  r`  r2   r)   r'   r   r     s       (   	   -S - - - [-" 
 
 [
" 4 4 \4 & & \& B%/ B B B XB  % % X% - - X- ( ( X( T T XT U U XU0* * *> > > # # X#
6 6 6@ @ @ Q Q [Q  F  F \ F  F  Fr)   r   c                   ^    e Zd Z	  G d d          Zej         e            fd            ZdS )r   c                   2    e Zd Z	 dZ	 d Zed             ZdS )DistributionFinder.ContextNc                 J    t          |                               |           d S r+   rm   )r&   r   s     r'   rp   z#DistributionFinder.Context.__init__  s"    JJf%%%%%r)   c                 ^    	 t          |                               dt          j                  S )Nr  )rn   r   r0  r  r%   s    r'   r  zDistributionFinder.Context.path  s%     ::>>&#(333r)   )r.   r/   r0   r$   rp   r1   r  r2   r)   r'   r%  ry    sO        		 	
	& 	& 	& 
	4 	4 
	4 	4 	4r)   r%  c                     d S r+   r2   )r&   r!  s     r'   r.  z%DistributionFinder.find_distributions   s    	 	r)   N)r.   r/   r0   r%  ru  rv  r.  r2   r)   r'   r   r     so        4 4 4 4 4 4 4 4@ 	)0      r)   r   c                        e Zd Z	  ej                     fd            Zd Zd Zd Zd Z	d Z
ed             Zed             Z xZS )	FastPathc                 F    t                                          |           S r+   )r   __new__)r@   rootr   s     r'   r  zFastPath.__new__  s    wws###r)   c                     || _         d S r+   )r  )r&   r  s     r'   rp   zFastPath.__init__  s    			r)   c                 6    t          j        | j        |          S r+   )r)  r*  r  )r&   childs     r'   joinpathzFastPath.joinpath  s    |DIu---r)   c                    t          t                    5  t          j        | j        pd          cd d d            S # 1 swxY w Y   t          t                    5  |                                 cd d d            S # 1 swxY w Y   g S )Nru   )r   	Exceptionoslistdirr  zip_childrenr%   s    r'   childrenzFastPath.children  s    i   	0 	0:di.3//	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0i   	' 	'$$&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	'	s!   =AAA==BBc                     t          j        | j                  }|j                                        }|j        | _        t
                              d |D                       S )Nc              3   b   K   | ]*}|                     t          j        d           d         V  +dS )r   r   N)rx   	posixpathrj  )r:   r  s     r'   r<   z(FastPath.zip_children.<locals>.<genexpr>*  s7      QQ%U[[::1=QQQQQQr)   )zipfiler*  r  namelistr  dictfromkeys)r&   zip_pathr   s      r'   r  zFastPath.zip_children%  sQ    <	**&&(( )}}QQ5QQQQQQr)   c                 \    |                      | j                                      |          S r+   )lookupmtimesearchr-   s     r'   r  zFastPath.search,  s$    {{4:&&--d333r)   c                     t          t                    5  t          j        | j                  j        cd d d            S # 1 swxY w Y   | j                                         d S r+   )r   OSErrorr  statr  st_mtimer  cache_clearr%   s    r'   r  zFastPath.mtime/  s    g 	/ 	/749%%.	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/ 	/!!!!!s   A  AAc                      t          |           S r+   )Lookup)r&   r  s     r'   r  zFastPath.lookup5  s    d||r)   )r.   r/   r0   rb   	lru_cacher  rp   r  r  r  r  r1   r  r   r  r   r   s   @r'   r~  r~    s         Y$ $ $ $ $  . . .  R R R4 4 4 " " X"
   \    r)   r~  c                        e Zd ZdefdZd ZdS )r  r  c                    t           j                            |j                                                  }|                    d          }t          t                    | _        t          t                    | _	        |
                                D ]7}|                                }|                    d          r|                    d          d                             d          d         }t                              |          }| j        |                             |                    |                     |r|dk    r|                    d          d                             d          d         }t                              |          }| j	        |                             |                    |                     9| j                                         | j	                                         d S )Nz.eggz
.dist-infoz	.egg-inforu   r   -zegg-info)r  r  basenamer  lowerrL   r   rL  infoseggsr  
rpartitionr  r?  r@  appendr  legacy_normalizefreeze)	r&   r  basebase_is_eggr  lowr$   
normalizedlegacy_normalizeds	            r'   rp   zLookup.__init__;  s   w	**0022mmF++)$//
(..	]]__ 
	J 
	JE++--C||788 J~~c**1-77<<Q?%//55

:&--dmmE.B.BCCCC J
!2!2s++A.88==a@$,$=$=d$C$C!	+,33DMM%4H4HIII
	r)   c                 T   |r| j         |j                 n5t          j                            | j                                                   }|r| j        |j                 n5t          j                            | j                                                  }t          j        ||          S r+   )r  r  r   r   r   r   r  r  )r&   preparedr  r  s       r'   r  zLookup.searchP  s     DDJx*++..tz/@/@/B/BCC 	 CDIh011..ty/?/?/A/ABB 	
 ud+++r)   N)r.   r/   r0   r~  rp   r  r2   r)   r'   r  r  :  s>        X    *, , , , ,r)   r  c                   P    e Zd Z	 dZdZd Zed             Zed             Zd Z	dS )r?  Nc                     || _         |d S |                     |          | _        |                     |          | _        d S r+   )r$   r@  r  r  r  r-   s     r'   rp   zPrepared.__init__f  sB    	<F....!%!6!6t!<!<r)   c                 |    	 t          j        dd|                                                               dd          S )Nz[-_.]+r  r  )r   subr  replacer#   s    r'   r@  zPrepared.normalizem  s9    	 vid++1133;;CEEEr)   c                 T    	 |                                                      dd          S )Nr  r  )r  r  r#   s    r'   r  zPrepared.legacy_normalizet  s'    	 zz||##C---r)   c                 *    t          | j                  S r+   )boolr$   r%   s    r'   __bool__zPrepared.__bool__|  s    DIr)   )
r.   r/   r0   r  r  rp   rW   r@  r  r  r2   r)   r'   r?  r?  ^  s}         J= = = F F \F . . \.    r)   r?  c                   x    e Zd Zee                                fd            Zed             Zed             ZdS )MetadataPathFinderc                 n    	 |                      |j        |j                  }t          t          |          S r+   )_search_pathsr$   r  rG   r(  )r@   r!  founds      r'   r.  z%MetadataPathFinder.find_distributions  s3    	 !!',==#U+++r)   c                     	 t          |          t          j                            fdt	          t
          |          D                       S )Nc              3   B   K   | ]}|                               V  d S r+   )r  )r:   r  r  s     r'   r<   z3MetadataPathFinder._search_paths.<locals>.<genexpr>  s@       -
 -
&*DKK!!-
 -
 -
 -
 -
 -
r)   )r?  r   r   r   rG   r~  )r@   r$   pathsr  s      @r'   r  z MetadataPathFinder._search_paths  s[    ?D>>,, -
 -
 -
 -
.1(E.B.B-
 -
 -
 
 
 	
r)   c                 B    t           j                                         d S r+   )r~  r  r  )r@   s    r'   invalidate_cachesz$MetadataPathFinder.invalidate_caches  s    $$&&&&&r)   N)	r.   r/   r0   rV   r   r%  r.  r  r  r2   r)   r'   r  r    sw        (:(B(B(D(D 
, 
, 
, [
, 
 
 [
 ' ' [' ' 'r)   r  c                   ~     e Zd ZdefdZd Zej        j        e_        d Ze	 fd            Z
ed             Z xZS )r(  r  c                     	 || _         d S r+   )_pathr  s     r'   rp   zPathDistribution.__init__  s    	 


r)   c                     t          t          t          t          t          t
                    5  | j                            |                              d          cd d d            S # 1 swxY w Y   d S )Nr   r   )	r   FileNotFoundErrorIsADirectoryErrorr   NotADirectoryErrorPermissionErrorr  r  r  r  s     r'   r  zPathDistribution.read_text  s    
 
 	M 	M :&&x00::G:LL	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	Ms   .A((A,/A,c                      | j         j        |z  S r+   )r  parentr  s     r'   r
  zPathDistribution.locate_file  s    z 4''r)   c                     	 t           j                            t          | j                            } t          t          j                  |                     |                    pt                      j
        S r+   )r  r  r  rH   r  r	   r?  r@  _name_from_stemr   rA  )r&   stemr   s     r'   rA  z!PathDistribution._normalized_name  sa    	 wDJ00)Ih())$*>*>t*D*DEE (ww'	
r)   c                     	 t           j                            |           \  }}|dvrd S |                    d          \  }}}|S )Nr  r  )r  r  splitextr  )r  r  extr$   rj  rests         r'   r  z PathDistribution._name_from_stem  sQ    	 ((..#111F",,S11c4r)   )r.   r/   r0   r   rp   r  r   __doc__r
  r1   rA  rW   r  r   r   s   @r'   r(  r(    s        Z    M M M %.6I( ( ( 	
 	
 	
 	
 X	
   \    r)   r(  c                 8    	 t                               |           S r+   )r   r  distribution_names    r'   r   r     s    
 !!"3444r)   c                  &    	 t          j        di | S r   )r   r  )r   s    r'   r   r     s       **6***r)   r3  c                 B    	 t                               |           j        S r+   )r   r  r   r  s    r'   r   r     s!    
 !!"344==r)   c                 ,    	 t          |           j        S r+   )r   r    r  s    r'   r    r      s     )**22r)   rA  r   c                      	 t           j                            d t          t	                                D                       }t                              |          j        di | S )Nc              3   $   K   | ]}|j         V  d S r+   )r   )r:   rj   s     r'   r<   zentry_points.<locals>.<genexpr>  s6       ( ("( ( ( ( ( (r)   r2   )r   r   r   _uniquer   r   r|   r   )r   r   s     r'   r   r     so      /
'
' ( (&-moo&>&>( ( (  C   %%,66v666r)   c                 ,    	 t          |           j        S r+   )r   r   r  s    r'   r   r     s    
 )**00r)   c                 ,    	 t          |           j        S r+   )r   r   r  s    r'   r   r     s     )**33r)   c                     	 t          j        t                    } t                      D ]I}t	          |          pt          |          D ](}| |                             |j        d                    )Jt          |           S r;  )	collectionsdefaultdictrL  r   _top_level_declared_top_level_inferredr  r   r  )pkg_to_distrj   pkgs      r'   r   r   '  s     )$//K ; ;&t,,I0CD0I0I 	; 	;C##DM&$9::::	;r)   c                 T    |                      d          pd                                S )Nztop_level.txtrt   )r  rx   r   s    r'   r  r  8  s%    NN?++1r88:::r)   c                 >    d t          | j                  D             S )Nc                     h | ]L}|j         d k    t          |j                  dk    r|j        d         n|                    d          j        MS )z.pyr   r   rt   )suffixlenpartswith_suffixr$   )r:   fs     r'   r   z&_top_level_inferred.<locals>.<setcomp>=  sZ       8u !'llQ&&

AMM",=,=,Br)   )r
   r   r   s    r'   r  r  <  s-      ,,   r)   )Mr  r   ru  rM  r0  r7  r)  r  r   rR   rd   rb   r   r  r  rt   r   r   _collectionsr   r   
_functoolsr   r	   
_itertoolsr
   r   r   r   
contextlibr   	importlibr   importlib.abcr   r   typingr   r   r   r   __all__ModuleNotFoundErrorr   r4   rY   rh   rL  r   r   r   r  r   PurePosixPathr   r  r   r   r~  r  r?  r  r(  r   r   r   r    rc   r   r  r   r   r   rH   r   r  r  r2   r)   r'   <module>r     s   				 				 



 



 



                               4 4 4 4 4 4 4 4 / / / / / / / / 8 8 8 8 8 8 8 8 . . . . . . . .       # # # # # # ( ( ( ( ( (       1 1 1 1 1 1 1 1 1 1 1 1   	 	 	 	 	. 	 	 	>1 >1 >1 >1 >1 >1 >1 >1B! ! ! ! ! ! ! !4A! A! A! A! A! A! A! A!HC) C) C) C) C)T C) C) C)L:
 :
 :
 :
 :
. :
 :
 :
z4  4  4  4  4  4  4  4 n%* %* %* %* %*z4 %* %* %*P+ + + + +'' + + + C C C C C C C CEF EF EF EF EF EF EF EFP- - - - - - - -`, , , , , , , ,^!, !, !, !, !, !, !, !,H       D' ' ' ' '+ ' ' '62 2 2 2 2| 2 2 2j5 5 5+ + +>5#8 > > > >3 3 3 )
.//  
7eK1A$AB 7 7 7 7.1 1 14 4 4T#Y 7    "; ; ;    r)   