o
    gq                     @   s  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 ddlmZmZ ddlmZ ddl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 de(Z)G dd dZ*G dd de+ddZ,G dd de-Z.G dd de.Z/G dd dZ0G dd de0e1Z2G dd  d ej3Z4G d!d" d"Z5G d#d$ d$Z6G d%d& d&e Z7G d'd( d(Z8G d)d* d*Z9G d+d, d,Z:G d-d. d.e7Z;G d/d0 d0e6Z<d1d2 Z=d3d4 Z>d5ejfd6d7Z?d8d9 Z@d5e&e/e2f fd:d;ZAd<d= ZBd>d? ZCd5e$eDe#eD f fd@dAZEdS )B    N   )	_adapters_meta)PackageMetadata)FreezableDefaultDictPair)method_cache)unique_everseen)r   
SimplePath)suppress)import_module)MetaPathFinder)starmap)ListMappingOptionalUnion)DistributionDistributionFinderr   PackageNotFoundErrordistributiondistributionsentry_pointsfilesmetadatapackages_distributionsrequiresversionc                   @   s"   e Zd Z	 dd Zedd ZdS )r   c                 C   s   d| j  S )Nz"No package metadata was found for nameself r"   Q/Users/admin/.pyenv/versions/3.10.0/lib/python3.10/importlib/metadata/__init__.py__str__2      zPackageNotFoundError.__str__c                 C   s   | j \}|S N)argsr!   r   r"   r"   r#   r   5   s   zPackageNotFoundError.nameN)__name__
__module____qualname__r$   propertyr   r"   r"   r"   r#   r   /   s
    r   c                   @   sB   e Zd Z	 ed Zedd Ze	d	ddZ
e	dd ZdS )
	Sectionedzm
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        c                 C   s   dd | j || jdD S )Nc                 s   s.    | ]}|j d ur|jt|jdV  qd S )N)value)r   _replacer   parser.   ).0sectionr"   r"   r#   	<genexpr>f   s    
z*Sectioned.section_pairs.<locals>.<genexpr>)filter_)readvalidclstextr"   r"   r#   section_pairsd   s   zSectioned.section_pairsNc                 c   sZ    t |ttj|  }d }|D ]}|do|d}|r$|d}qt||V  qd S )N[]z[])filtermapstrstrip
splitlines
startswithendswithr   )r9   r4   linesr   r.   Zsection_matchr"   r"   r#   r5   l   s   
zSectioned.readc                 C   s   | o|  d S )N#)rB   )liner"   r"   r#   r6   w      zSectioned.validr&   )r)   r*   r+   textwrapdedentlstripZ_sampleclassmethodr:   staticmethodr5   r6   r"   r"   r"   r#   r-   ;   s    


r-   c                   @   sx   e Zd ZU 	 edZ	 dZed ed< dd Z	e
dd Ze
d	d
 Ze
dd Zdd Zdd Zdd Zdd ZdS )
EntryPointzF(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+))?\s*(?P<extras>\[.*\])?\s*$Nr   distc                 C   sF   	 | j | j}t|d}td |dpdd}tt	||S )Nmoduleattr .)
patternmatchr.   r   groupr=   split	functoolsreducegetattr)r!   rT   rO   attrsr"   r"   r#   load   s
   zEntryPoint.loadc                 C      | j | j}|dS )NrO   rS   rT   r.   rU   r!   rT   r"   r"   r#   rO         
zEntryPoint.modulec                 C   r\   )NrP   r]   r^   r"   r"   r#   rP      r_   zEntryPoint.attrc                 C   s(   | j | j}ttd|dpdS )Nz\w+extrasrQ   )rS   rT   r.   listrefinditerrU   r^   r"   r"   r#   r`      s   zEntryPoint.extrasc                 C   s
   || _ | S r&   rN   )r!   rN   r"   r"   r#   _for   s   zEntryPoint._forc                 C   s    	 d}t |t t| j| fS )NzJConstruction of dict of EntryPoints is deprecated in favor of EntryPoints.)warningswarnDeprecationWarningiterr   )r!   msgr"   r"   r#   __iter__   s
   zEntryPoint.__iter__c                 C   s   | j | j| j| jffS r&   )	__class__r   r.   rU   r    r"   r"   r#   
__reduce__   s   zEntryPoint.__reduce__c                    s(    fdd|D }t ttj| |S )Nc                 3   s    | ]}t  |V  qd S r&   rY   )r1   Zparamr    r"   r#   r3          z%EntryPoint.matches.<locals>.<genexpr>)allr>   operatoreqvalues)r!   paramsrZ   r"   r    r#   matches   s   zEntryPoint.matches)r)   r*   r+   rb   compilerS   rN   r   __annotations__r[   r,   rO   rP   r`   re   rk   rm   ru   r"   r"   r"   r#   rM   |   s$   
 



rM   ZEntryPointBasezname value groupc                       s   e Zd Z	 ejejdeddZ fddZ	 fddZ
 fdd	Z fd
dZ fddZ fddZ fddZ fddZdd Z fddZ fddZdd Z  ZS )DeprecatedListzAEntryPoints list interface is deprecated. Cast to list if needed.   
stacklevelc                       |    t j|i |S r&   )_warnsuper__setitem__r!   r'   kwargsrl   r"   r#   r         zDeprecatedList.__setitem__c                    r|   r&   )r}   r~   __delitem__r   r   r"   r#   r      r   zDeprecatedList.__delitem__c                    r|   r&   )r}   r~   appendr   r   r"   r#   r      r   zDeprecatedList.appendc                    r|   r&   )r}   r~   reverser   r   r"   r#   r     r   zDeprecatedList.reversec                    r|   r&   )r}   r~   extendr   r   r"   r#   r     r   zDeprecatedList.extendc                    r|   r&   )r}   r~   popr   r   r"   r#   r   
  r   zDeprecatedList.popc                    r|   r&   )r}   r~   remover   r   r"   r#   r     r   zDeprecatedList.removec                    r|   r&   )r}   r~   __iadd__r   r   r"   r#   r     r   zDeprecatedList.__iadd__c                 C   s,   t |ts|   t|}| t| | S r&   )
isinstancetupler}   rl   r!   otherr"   r"   r#   __add__  s   
zDeprecatedList.__add__c                    r|   r&   )r}   r~   insertr   r   r"   r#   r     r   zDeprecatedList.insertc                    r|   r&   )r}   r~   sortr   r   r"   r#   r      r   zDeprecatedList.sortc                 C   s(   t |ts|   t|}t| |S r&   )r   r   r}   __eq__r   r"   r"   r#   r   $  s   
zDeprecatedList.__eq__)r)   r*   r+   rW   partialrf   rg   rh   r}   r   r   r   r   r   r   r   r   r   r   r   r   __classcell__r"   r"   r   r#   rx      s(    rx   c                       sf   e Zd Z	 dZ fddZdd Zedd Zedd	 Ze	d
d Z
e	dd Zedd Z  ZS )EntryPointsr"   c                    sV   	 t |trtjdtdd t |S ztt| j	|dW S  t
y*   t|w )NzGAccessing entry points by index is deprecated. Cast to tuple if needed.ry   rz   r   )r   intrf   rg   rh   r~   __getitem__nextri   selectStopIterationKeyErrorr(   r   r"   r#   r   3  s   
zEntryPoints.__getitem__c                    s   	 t  fdd| D S )Nc                 3   s$    | ]}|j di  r|V  qd S Nr"   )ru   r1   Zeprt   r"   r#   r3   I  s   " z%EntryPoints.select.<locals>.<genexpr>r   r!   rt   r"   r   r#   r   D  s   zEntryPoints.selectc                 C      	 t dd | D S )Nc                 s       | ]}|j V  qd S r&   r   r   r"   r"   r#   r3   P      z$EntryPoints.names.<locals>.<genexpr>setr    r"   r"   r#   namesK  s   zEntryPoints.namesc                 C   r   )Nc                 s   r   r&   )rU   r   r"   r"   r#   r3   [  r   z%EntryPoints.groups.<locals>.<genexpr>r   r    r"   r"   r#   groupsR     zEntryPoints.groupsc                    s   |  fdd|  |D S )Nc                 3       | ]}|  V  qd S r&   )re   r   rd   r"   r#   r3   _  ro   z-EntryPoints._from_text_for.<locals>.<genexpr>)
_from_text)r8   r9   rN   r"   rd   r#   _from_text_for]  s   zEntryPoints._from_text_forc                 C   s   t t| |pdS NrQ   )	itertoolsr   rM   _parse_groupsr7   r"   r"   r#   r   a  s   zEntryPoints._from_textc                 C   s   dd t | D S )Nc                 s   s$    | ]}|j j|j j |jfV  qd S r&   r.   r   )r1   itemr"   r"   r#   r3   g  s
    
z,EntryPoints._parse_groups.<locals>.<genexpr>)r-   r:   )r9   r"   r"   r#   r   e  s   zEntryPoints._parse_groups)r)   r*   r+   	__slots__r   r   r,   r   r   rK   r   r   rL   r   r   r"   r"   r   r#   r   ,  s    




r   c                       sp   e Zd Z	 ejejdeddZ fddZ	d fdd	Z
 fd	d
Z fddZ fddZ fddZ  ZS )
Deprecatedz:SelectableGroups dict interface is deprecated. Use select.ry   rz   c                    s   |    t |S r&   )r}   r~   r   r(   r   r"   r#   r        zDeprecated.__getitem__Nc                    s   |    t ||S r&   )r}   r~   get)r!   r   defaultr   r"   r#   r     s   zDeprecated.getc                       |    t  S r&   )r}   r~   rk   r    r   r"   r#   rk        
zDeprecated.__iter__c                    s   |    t j| S r&   )r}   r~   __contains__)r!   r'   r   r"   r#   r     r   zDeprecated.__contains__c                    r   r&   )r}   r~   keysr    r   r"   r#   r     r   zDeprecated.keysc                    r   r&   )r}   r~   rs   r    r   r"   r#   rs     r   zDeprecated.valuesr&   )r)   r*   r+   rW   r   rf   rg   rh   r}   r   r   rk   r   r   rs   r   r"   r"   r   r#   r   m  s    r   c                       sN   e Zd Z	 edd Ze fddZedd Zedd Zd	d
 Z	  Z
S )SelectableGroupsc                 C   s4   t d}t||d}t||}| dd |D S )NrU   keyc                 s   s     | ]\}}|t |fV  qd S r&   r   )r1   rU   epsr"   r"   r#   r3     s    z(SelectableGroups.load.<locals>.<genexpr>)rq   
attrgettersortedr   groupby)r8   r   Zby_groupZorderedZgroupedr"   r"   r#   r[     s   
zSelectableGroups.loadc                    s    	 t t|  }ttj|S r&   )r~   r   rs   r   r   chainfrom_iterable)r!   r   r   r"   r#   _all  s   zSelectableGroups._allc                 C   s   | j jS r&   )r   r   r    r"   r"   r#   r        zSelectableGroups.groupsc                 C   s
   	 | j jS r&   )r   r   r    r"   r"   r#   r     s   zSelectableGroups.namesc                 K   s   |s| S | j jdi |S r   )r   r   r   r"   r"   r#   r     s   zSelectableGroups.select)r)   r*   r+   rK   r[   r,   r   r   r   r   r   r"   r"   r   r#   r     s    


r   c                   @   s(   e Zd Z	 d	ddZdd Zdd ZdS )
PackagePathutf-8c                 C   s<   |   j|d}| W  d    S 1 sw   Y  d S )Nencodinglocateopenr5   )r!   r   streamr"   r"   r#   	read_text  s   $zPackagePath.read_textc                 C   s:   |   d}| W  d    S 1 sw   Y  d S )Nrbr   )r!   r   r"   r"   r#   read_binary  s   $zPackagePath.read_binaryc                 C   s   	 | j | S r&   )rN   locate_filer    r"   r"   r#   r     s   zPackagePath.locateN)r   )r)   r*   r+   r   r   r   r"   r"   r"   r#   r     s
    
r   c                   @   s   e Zd Zdd Zdd ZdS )FileHashc                 C   s   | d\| _}| _d S )N=)	partitionmoder.   )r!   spec_r"   r"   r#   __init__  s   zFileHash.__init__c                 C   s   d| j  d| j dS )Nz<FileHash mode: z value: >)r   r.   r    r"   r"   r#   __repr__  s   zFileHash.__repr__N)r)   r*   r+   r   r   r"   r"   r"   r#   r     s    r   c                   @   s   e Zd Z	 ejdd Zejdd Zedd Zedd Z	e
d	d
 Ze
dd Zed,ddZedejfddZedd Zedd Zedd Zedd Zedd Zdd Zdd  Zed!d" Zd#d$ Zd%d& Zed'd( Ze
d)d* Zd+S )-r   c                 C      d S r&   r"   r!   filenamer"   r"   r#   r        zDistribution.read_textc                 C   r   r&   r"   r!   pathr"   r"   r#   r     r   zDistribution.locate_filec                 C   sF   	 |   D ]}|tj|d}tt|d }|d ur|  S qt|)Nr   )_discover_resolversr   Contextr   ri   r   )r8   r   resolverZdistsrN   r"   r"   r#   	from_name  s   zDistribution.from_namec                    sP   	 | dd   r|rtd ptjdi | tj fdd|  D S )Ncontextz cannot accept context and kwargsc                 3   s    | ]}| V  qd S r&   r"   )r1   r   r   r"   r#   r3     s    
z(Distribution.discover.<locals>.<genexpr>r"   )r   
ValueErrorr   r   r   r   r   r   )r8   r   r"   r   r#   discover  s   zDistribution.discoverc                 C   s   	 t t| S r&   )PathDistributionpathlibPath)r   r"   r"   r#   at  s   zDistribution.atc                  C   s   	 dd t jD } td | S )Nc                 s   s    | ]	}t |d dV  qdS )find_distributionsNrn   )r1   finderr"   r"   r#   r3   &  s    
z3Distribution._discover_resolvers.<locals>.<genexpr>)sys	meta_pathr=   )Zdeclaredr"   r"   r#   r   #  s
   
z Distribution._discover_resolversrR   c                 C   s@   ddl m}m} ||}tj|j||d}tt|	|S )Nr   )buildmeta)Z
source_dirsystem)
Zpep517r   r   Zcompat_systemrW   r   r   zipfiler   Zbuild_as_zip)r8   rootr   r   r   Zbuilderr"   r"   r#   _local+  s   
zDistribution._localreturnc                 C   s0   	 |  dp|  dp|  d}tt|S )NZMETADATAzPKG-INFOrQ   )r   r   ZMessageemailZmessage_from_stringr!   r9   r"   r"   r#   r   7  s   
zDistribution.metadatac                 C      	 | j d S )NNamer   r    r"   r"   r#   r   H     
zDistribution.namec                 C   s   	 t | jS r&   )Prepared	normalizer   r    r"   r"   r#   _normalized_nameM  s   zDistribution._normalized_namec                 C   r   )NZVersionr   r    r"   r"   r#   r   R  r   zDistribution.versionc                 C   s   t | d| S )Nzentry_points.txt)r   r   r   r    r"   r"   r#   r   W  s   zDistribution.entry_pointsc                    s8   	    p  }d fdd	}|ott|t|S )Nc                    s6   t | }|r
t|nd |_|rt|nd |_ |_|S r&   )r   r   hashr   sizerN   )r   r   Zsize_strresultr    r"   r#   	make_fileh  s
   z%Distribution.files.<locals>.make_file)NN)_read_files_distinfo_read_files_egginfora   r   csvreader)r!   Z
file_linesr  r"   r    r#   r   [  s   	zDistribution.filesc                 C   s   	 |  d}|o| S )NZRECORD)r   rA   r   r"   r"   r#   r  q  s   
z!Distribution._read_files_distinfoc                 C   s    	 |  d}|otdj| S )NzSOURCES.txtz"{}")r   r>   formatrA   r   r"   r"   r#   r  x  s   
z Distribution._read_files_egginfoc                 C   s   	 |   p|  }|ot|S r&   )_read_dist_info_reqs_read_egg_info_reqsra   )r!   Zreqsr"   r"   r#   r     s   zDistribution.requiresc                 C   s   | j dS )NzRequires-Dist)r   Zget_allr    r"   r"   r#   r	    r%   z!Distribution._read_dist_info_reqsc                 C   s   |  d}|o| |S )Nzrequires.txt)r   _deps_from_requires_text)r!   sourcer"   r"   r#   r
    s   
z Distribution._read_egg_info_reqsc                 C   s   |  t|S r&   )%_convert_egg_info_reqs_to_simple_reqsr-   r5   )r8   r  r"   r"   r#   r    rG   z%Distribution._deps_from_requires_textc                 #   s8    	 dd   fdd}| D ]}|j ||j V  qd S )Nc                 S   s   | od|  dS )Nz
extra == ""r"   r   r"   r"   r#   make_condition  s   zJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_conditionc                    sX   | pd} |  d\}}}|r|rd| d}ttd | |g}|r*dd| S dS )NrQ   :()z; z and )r   ra   r=   join)r2   extrasepZmarkersZ
conditionsr  r"   r#   parse_condition  s   zKDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.parse_conditionr   )Zsectionsr  r2   r"   r  r#   r    s   
z2Distribution._convert_egg_info_reqs_to_simple_reqsN)rR   )r)   r*   r+   abcabstractmethodr   r   rK   r   r   rL   r   r   r   r,   r   r   r   r   r   r   r   r   r  r  r   r	  r
  r  r  r"   r"   r"   r#   r     sL    












r   c                   @   s0   e Zd Z	 G dd dZeje fddZdS )r   c                   @   s(   e Zd Z	 dZ	 dd Zedd ZdS )zDistributionFinder.ContextNc                 K   s   t | | d S r&   )varsupdate)r!   r   r"   r"   r#   r        z#DistributionFinder.Context.__init__c                 C   s   	 t | dtjS )Nr   )r  r   r   r   r    r"   r"   r#   r     r   zDistributionFinder.Context.path)r)   r*   r+   r   r   r,   r   r"   r"   r"   r#   r     s    r   c                 C   r   r&   r"   )r!   r   r"   r"   r#   r     r   z%DistributionFinder.find_distributionsN)r)   r*   r+   r   r  r  r   r"   r"   r"   r#   r     s
     r   c                       sf   e Zd Z	 e  fddZdd Zdd Zdd Zd	d
 Z	dd Z
edd Zedd Z  ZS )FastPathc                    s   t  | S r&   )r~   __new__)r8   r   r   r"   r#   r    s   zFastPath.__new__c                 C   s   || _ tj| j  | _d S r&   )r   osr   basenamelowerbase)r!   r   r"   r"   r#   r     s   zFastPath.__init__c                 C   s   t | j|S r&   )r   r   r   )r!   childr"   r"   r#   joinpath     zFastPath.joinpathc                 C   sl   t t t| jpdW  d    S 1 sw   Y  t t |  W  d    S 1 s/w   Y  g S r   )r   	Exceptionr  listdirr   zip_childrenr    r"   r"   r#   children  s   
 
 zFastPath.childrenc                 C   s2   t | j}|j }|j| _tdd |D S )Nc                 s   s"    | ]}| tjd d V  qdS )r   r   N)rV   	posixpathr  )r1   r#  r"   r"   r#   r3     s     z(FastPath.zip_children.<locals>.<genexpr>)r   r   r   Znamelistr$  dictfromkeys)r!   Zzip_pathr   r"   r"   r#   r(    s   
zFastPath.zip_childrenc                 C   s   |  | j|S r&   )lookupmtimesearchr(   r"   r"   r#   r/    r  zFastPath.searchc                 C   sD   t t t| jjW  d    S 1 sw   Y  | j  d S r&   )r   OSErrorr  statr   st_mtimer-  cache_clearr    r"   r"   r#   r.    s   
 zFastPath.mtimec                 C   s   t | S r&   )Lookup)r!   r.  r"   r"   r#   r-    r   zFastPath.lookup)r)   r*   r+   rW   	lru_cacher  r   r$  r)  r(  r/  r,   r.  r   r-  r   r"   r"   r   r#   r    s    
r  c                   @   s"   e Zd ZdefddZdd ZdS )r4  r   c           	      C   s   t j|j }|d}tt| _tt| _	|
 D ]J}| }|drD|dd dd }t|}| j| || q|rf|dkrf|dd dd }t|}| j	| || q| j  | j	  d S )Nz.eggz
.dist-infoz	.egg-inforR   r   -zegg-info)r  r   r   r   r!  rC   r   ra   infoseggsr)  
rpartitionr   r   r   r   r$  legacy_normalizeZfreeze)	r!   r   r"  Zbase_is_eggr#  lowr   
normalizedlegacy_normalizedr"   r"   r#   r   
  s"   






zLookup.__init__c                 C   sP   |r| j |j ntj| j  }|r| j|j ntj| j }t||S r&   )r8  r=  r   r   r   rs   r9  r>  )r!   preparedr8  r9  r"   r"   r#   r/    s   zLookup.searchN)r)   r*   r+   r  r   r/  r"   r"   r"   r#   r4  	  s    r4  c                   @   s>   e Zd Z	 dZdZdd Zedd Zedd Zdd	 Z	dS )
r   Nc                 C   s.   || _ |d u r	d S | || _| || _d S r&   )r   r   r=  r;  r>  r(   r"   r"   r#   r   5  s
   zPrepared.__init__c                 C   s   	 t dd|  ddS )Nz[-_.]+r7  r   )rb   subr!  replacer   r"   r"   r#   r   <  s   zPrepared.normalizec                 C   s   	 |   ddS )Nr7  r   )r!  rA  r   r"   r"   r#   r;  C  s   zPrepared.legacy_normalizec                 C   s
   t | jS r&   )boolr   r    r"   r"   r#   __bool__K  s   
zPrepared.__bool__)
r)   r*   r+   r=  r>  r   rL   r   r;  rC  r"   r"   r"   r#   r   -  s    

r   c                   @   s4   e Zd Zee fddZedd Zdd ZdS )MetadataPathFinderc                 C   s   	 |  |j|j}tt|S r&   )_search_pathsr   r   r>   r   )r8   r   foundr"   r"   r#   r   P  s   
z%MetadataPathFinder.find_distributionsc                    s*   	 t | tj fddtt|D S )Nc                 3   r   r&   )r/  )r1   r   r?  r"   r#   r3   a  s    

z3MetadataPathFinder._search_paths.<locals>.<genexpr>)r   r   r   r   r>   r  )r8   r   pathsr"   rG  r#   rE  ]  s
   z MetadataPathFinder._search_pathsc                 C   s   t j  d S r&   )r  r  r3  )r8   r"   r"   r#   invalidate_cachese  r%  z$MetadataPathFinder.invalidate_cachesN)	r)   r*   r+   rK   r   r   r   rE  rI  r"   r"   r"   r#   rD  O  s    
rD  c                       sP   e Zd ZdefddZdd Zejje_dd Ze	 fdd	Z
d
d Z  ZS )r   r   c                 C   s   	 || _ d S r&   )_pathr   r"   r"   r#   r   j  s   
zPathDistribution.__init__c                 C   sH   t ttttt | j|jddW  d    S 1 sw   Y  d S )Nr   r   )	r   FileNotFoundErrorIsADirectoryErrorr   NotADirectoryErrorPermissionErrorrJ  r$  r   r   r"   r"   r#   r   q  s   $zPathDistribution.read_textc                 C   s   | j j| S r&   )rJ  parentr   r"   r"   r#   r   }  r%   zPathDistribution.locate_filec                    s&   	 t jt| j}| |pt jS r&   )r  r   r   r?   rJ  _name_from_stemr~   r   )r!   stemr   r"   r#   r     s   z!PathDistribution._normalized_namec                 C   s0   t j|\}}|dvrd S |d\}}}|S )Nr6  r7  )r  r   splitextr   )r!   rQ  r   extr  restr"   r"   r#   rP    s
   z PathDistribution._name_from_stem)r)   r*   r+   r
   r   r   r   __doc__r   r,   r   rP  r   r"   r"   r   r#   r   i  s    

r   c                 C   s   	 t | S r&   )r   r   Zdistribution_namer"   r"   r#   r        
r   c                  K   s   	 t jdi | S r   )r   r   )r   r"   r"   r#   r     s   r   r   c                 C   s   	 t | jS r&   )r   r   r   rV  r"   r"   r#   r     s   r   c                 C      	 t | jS r&   )r   r   rV  r"   r"   r#   r        
r   c                  K   sL   	 t d}tjt|d}tjdd |t D }t	
|jdi | S )Nr   r   c                 s   r   r&   )r   )r1   rN   r"   r"   r#   r3     s    
zentry_points.<locals>.<genexpr>r"   )rq   r   rW   r   r	   r   r   r   r   r   r[   r   )rt   Z	norm_nameuniquer   r"   r"   r#   r     s   
r   c                 C   rX  r&   )r   r   rV  r"   r"   r#   r     rW  r   c                 C   rX  r&   )r   r   rV  r"   r"   r#   r     rY  r   c                  C   sL   	 t t} t D ]}|dpd D ]}| | |jd  qq	t| S )Nztop_level.txtrQ   r   )	collectionsdefaultdictra   r   r   rV   r   r   r+  )Zpkg_to_distrN   pkgr"   r"   r#   r     s   
	
r   )Fr  rb   r  r  r   r   r   r   rq   rH   rf   rW   r   r*  r[  rQ   r   r   r   _collectionsr   r   
_functoolsr   
_itertoolsr	   r
   
contextlibr   	importlibr   Zimportlib.abcr   r   typingr   r   r   r   __all__ModuleNotFoundErrorr   r-   
namedtuplerM   ra   rx   r   r   r+  r   PurePosixPathr   r   r   r   r  r4  r   rD  r   r   r   r   r   r   r   r   r?   r   r"   r"   r"   r#   <module>   sl    
A
S]A7( I0-$"(		
	
