Hacked By AnonymousFox

Current Path : /opt/alt/python39/lib64/python3.9/importlib/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/importlib/__pycache__/metadata.cpython-39.opt-2.pyc

a

R�f>I�@s�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZddlmZddlmZddlmZgd�ZGdd	�d	e�ZGd
d�de
�dd
��ZGdd�dej�ZGdd�d�ZGdd�d�ZGdd�de�Z Gdd�d�Z!Gdd�d�Z"Gdd�de �Z#Gdd�de�Z$dd�Z%d d!�Z&d"d#�Z'd$d%�Z(d&d'�Z)d(d)�Z*d*d+�Z+dS),�N)�ConfigParser)�suppress)�
import_module)�MetaPathFinder)�starmap)
�Distribution�DistributionFinder�PackageNotFoundError�distribution�
distributions�entry_points�files�metadata�requires�versionc@seZdZdS)r	N)�__name__�
__module__�__qualname__�rr�7/opt/alt/python39/lib64/python3.9/importlib/metadata.pyr	%sr	c@sjeZdZe�d�Zdd�Zedd��Zedd��Z	edd	��Z
ed
d��Zedd
��Z
dd�Zdd�ZdS)�
EntryPointzH(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+)\s*)?((?P<extras>\[.*\])\s*)?$cCsD|j�|j�}t|�d��}td|�d�p,d�d��}t�t	||�S)N�module�attr��.)
�pattern�match�valuer�group�filter�split�	functools�reduce�getattr)�selfrr�attrsrrr�loadPszEntryPoint.loadcCs|j�|j�}|�d�S)Nr�rrrr�r$rrrrrZszEntryPoint.modulecCs|j�|j�}|�d�S)Nrr'r(rrrr_szEntryPoint.attrcCs$|j�|j�}t�d|�d�p d�S)Nz\w+�extrasr)rrr�re�findallrr(rrrr)dszEntryPoint.extrascs��fdd����D�S)Ncs,g|]$}��|�D]\}}�|||��qqSr��items)�.0r�namer��cls�configrr�
<listcomp>ks�z+EntryPoint._from_config.<locals>.<listcomp>)�sectionsr0rr0r�_from_configis�zEntryPoint._from_configcCsLtdd�}t|_z|�|�Wn"ty@|�t�|��Yn0t�	|�S)N�=)Z
delimiters)
r�strZoptionxformZread_string�AttributeErrorZreadfp�io�StringIOrr5)r1�textr2rrr�
_from_textqs
zEntryPoint._from_textcCst|j|f�S�N)�iterr/�r$rrr�__iter__}szEntryPoint.__iter__cCs|j|j|j|jffSr=)�	__class__r/rrr?rrr�
__reduce__�s�zEntryPoint.__reduce__N)rrrr*�compilerr&�propertyrrr)�classmethodr5r<r@rBrrrrr)s �





rZEntryPointBasezname value groupc@s&eZdZd	dd�Zdd�Zdd�ZdS)
�PackagePath�utf-8cCs<|��j|d��}|��Wd�S1s.0YdS)N��encoding��locate�open�read)r$rI�streamrrr�	read_text�szPackagePath.read_textcCs:|���d��}|��Wd�S1s,0YdS)N�rbrJ)r$rNrrr�read_binary�szPackagePath.read_binarycCs|j�|�Sr=)�dist�locate_filer?rrrrK�szPackagePath.locateN)rG)rrrrOrQrKrrrrrF�s
rFc@seZdZdd�Zdd�ZdS)�FileHashcCs|�d�\|_}|_dS)Nr6)�	partition�moder)r$�spec�_rrr�__init__�szFileHash.__init__cCsd�|j|j�S)Nz<FileHash mode: {} value: {}>)�formatrVrr?rrr�__repr__�szFileHash.__repr__N)rrrrYr[rrrrrT�srTc@s�eZdZejdd��Zejdd��Zedd��Zedd��Z	e
d	d
��Ze
dd��Zed)dd��Z
edd��Zedd��Zedd��Zedd��Zdd�Zdd�Zedd��Zdd�Zd d!�Zed"d#��Ze
d$d%��Ze
d&d'��Zd(S)*rcCsdSr=r�r$�filenamerrrrO�szDistribution.read_textcCsdSr=r�r$�pathrrrrS�szDistribution.locate_filecCsH|��D]2}|tj|d��}tt|�d�}|dur|Sqt|��dS)N�r/)�_discover_resolversr�Context�nextr>r	)r1r/�resolverZdistsrRrrr�	from_name�s

zDistribution.from_namecsN|�dd���r|rtd���p.tjfi|���tj��fdd�|��D��S)N�contextz cannot accept context and kwargsc3s|]}|��VqdSr=r)r.rd�rfrr�	<genexpr>�s�z(Distribution.discover.<locals>.<genexpr>)�pop�
ValueErrorrrb�	itertools�chain�
from_iterablera)r1�kwargsrrgr�discover�s
�zDistribution.discovercCstt�|��Sr=)�PathDistribution�pathlib�Path)r_rrr�at�szDistribution.atcCsdd�tjD�}td|�S)Ncss|]}t|dd�VqdS)�find_distributionsN)r#)r.�finderrrrrh�s�z3Distribution._discover_resolvers.<locals>.<genexpr>)�sys�	meta_pathr)Zdeclaredrrrra�s�z Distribution._discover_resolversrcCs@ddlm}m}|�|�}tj|j||d�}tt�|�	|���S)Nr)�build�meta)Z
source_dir�system)
Zpep517rxryZ
compat_systemr!�partialrp�zipfilerrZbuild_as_zip)r1�rootrxryrzZbuilderrrr�_local�s
�zDistribution._localcCs(|�d�p|�d�p|�d�}t�|�S)NZMETADATAzPKG-INFOr)rO�emailZmessage_from_string�r$r;rrrr�s
��zDistribution.metadatacCs
|jdS)NZVersion)rr?rrrrszDistribution.versioncCst�|�d��S)Nzentry_points.txt)rr<rOr?rrrrszDistribution.entry_pointscs6���p���}d�fdd�	}|o4tt|t�|���S)Ncs6t|�}|rt|�nd|_|r&t|�nd|_�|_|Sr=)rFrT�hash�int�sizerR)r/r�Zsize_str�resultr?rr�	make_files
z%Distribution.files.<locals>.make_file)NN)�_read_files_distinfo�_read_files_egginfo�listr�csv�reader)r$Z
file_linesr�rr?rr
szDistribution.filescCs|�d�}|o|��S)NZRECORD)rO�
splitlinesr�rrrr�&s
z!Distribution._read_files_distinfocCs|�d�}|otdj|���S)NzSOURCES.txtz"{}")rO�maprZr�r�rrrr�-s
z Distribution._read_files_egginfocCs|��p|��}|ot|�Sr=)�_read_dist_info_reqs�_read_egg_info_reqsr�)r$Zreqsrrrr5szDistribution.requirescCs|j�d�S)Nz
Requires-Dist)rZget_allr?rrrr�;sz!Distribution._read_dist_info_reqscCs |�d�}|durdS|�|�S)Nzrequires.txt)rO�_deps_from_requires_text)r$�sourcerrrr�>s
z Distribution._read_egg_info_reqscCs4|�|���}dd�t�|t�d��D�}|�|�S)NcSs&i|]\}}|ttt�d�|���qS)�line)r�r��operator�
itemgetter)r.�sectionZresultsrrr�
<dictcomp>Es�z9Distribution._deps_from_requires_text.<locals>.<dictcomp>r�)�_read_sectionsr�rk�groupbyr�r��%_convert_egg_info_reqs_to_simple_reqs)r1r�Z
section_pairsr4rrrr�Bs
�z%Distribution._deps_from_requires_textccs<d}td|�D](}t�d|�}|r.|�d�}qt�VqdS)Nz	\[(.*)\]$�)rr*rr�locals)�linesr�r�Z
section_matchrrrr�Ls
zDistribution._read_sectionsc#sVdd���fdd�}dd�}|��D],\}}|D]}||�}||||�Vq0q$dS)NcSs|odj|d�S)Nzextra == "{name}"r`)rZr`rrr�make_conditionaszJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_conditioncsX|pd}|�d�\}}}|r,|r,d|�d�}ttd|�|�g��}|rTdd�|�SdS)Nr�:�(�)z; z and )rUr�r�join)r�Zextra�sepZmarkersZ
conditions�r�rr�
quoted_markerdszIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.quoted_markercSsdd|vS)N� �@r)Zreqrrr�
url_req_spacelszIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.url_req_spacer,)r4r�r�r�ZdepsZdepZspacerr�rr�Vsz2Distribution._convert_egg_info_reqs_to_simple_reqsN)r)rrr�abc�abstractmethodrOrSrErero�staticmethodrsrar~rDrrrr
r�r�rr�r�r�r�r�rrrrr�sD












	
	rc@s.eZdZGdd�d�Zeje�fdd��ZdS)rc@s$eZdZdZdd�Zedd��ZdS)zDistributionFinder.ContextNcKst|��|�dSr=)�vars�update)r$rnrrrrY�sz#DistributionFinder.Context.__init__cCst|��dtj�S)Nr_)r��getrvr_r?rrrr_�szDistributionFinder.Context.path)rrrr/rYrDr_rrrrrbsrbcCsdSr=r)r$rfrrrrt�sz%DistributionFinder.find_distributionsN)rrrrbr�r�rtrrrrrzsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�FastPathcCs||_tj�|j���|_dSr=)r}�osr_�basename�lower�base)r$r}rrrrY�szFastPath.__init__cCst�|j|�Sr=)rqrrr})r$�childrrr�joinpath�szFastPath.joinpathcCsltt�� t�|jpd�Wd�S1s.0Ytt��|��Wd�S1s^0YgS)Nr)r�	Exceptionr��listdirr}�zip_childrenr?rrr�children�s

.
&zFastPath.childrencCs2t�|j�}|j��}|j|_t�dd�|D��S)Ncss |]}|�tjd�dVqdS)r�rN)r �	posixpathr�)r.r�rrrrh�s�z(FastPath.zip_children.<locals>.<genexpr>)r|rrr}Znamelistr��dict�fromkeys)r$Zzip_path�namesrrrr��s

�zFastPath.zip_childrencCs&|j}||jkp$|�|j�o$|�d�S)N�.egg)r��versionless_egg_name�
startswith�prefix�endswith)r$�searchr�rrr�is_egg�s

�zFastPath.is_eggccsZ|��D]L}|��}||jvsH|�|j�r6|�|j�sH|�|�r|dkr|�|�VqdS)Nzegg-info)	r�r��
exact_matchesr�r�r��suffixesr�r�)r$r/r�Zn_lowrrrr��s

�
���zFastPath.searchN)	rrrrYr�r�r�r�r�rrrrr��s
r�c@s2eZdZdZdZdZdgdd�ZdZdd�ZdS)�Preparedr)z
.dist-infoz	.egg-infoNrcsV|�_|durdS|���dd��_�jd�_�fdd��jD��_�jd�_dS)N�-rXcsg|]}�j|�qSr)�
normalized)r.�suffixr?rrr3�sz%Prepared.__init__.<locals>.<listcomp>r�)r/r��replacer�r�r�r�r�)r$r/rr?rrY�s
�zPrepared.__init__)	rrrr�r�r�r�r�rYrrrrr��sr�c@s,eZdZee��fdd��Zedd��ZdS)�MetadataPathFindercCs|�|j|j�}tt|�Sr=)�
_search_pathsr/r_r�rp)r1rf�foundrrrrt�s
z%MetadataPathFinder.find_distributionscs tj��fdd�tt|�D��S)Nc3s|]}|�t���VqdSr=)r�r�)r.r_r`rrrh�s�z3MetadataPathFinder._search_paths.<locals>.<genexpr>)rkrlrmr�r�)r1r/�pathsrr`rr��s�z MetadataPathFinder._search_pathsN)rrrrErrbrtr�rrrrr��sr�c@s.eZdZdd�Zdd�Zejje_dd�ZdS)rpcCs
||_dSr=)�_pathr^rrrrYszPathDistribution.__init__cCsHtttttt��$|j�|�jdd�Wd�S1s:0YdS)NrGrH)	r�FileNotFoundError�IsADirectoryError�KeyError�NotADirectoryError�PermissionErrorr�r�rOr\rrrrOs�zPathDistribution.read_textcCs|jj|Sr=)r��parentr^rrrrSszPathDistribution.locate_fileN)rrrrYrOr�__doc__rSrrrrrps
rpcCs
t�|�Sr=)rre�Zdistribution_namerrrr
sr
cKstjfi|��Sr=)rro)rnrrrr!srcCst�|�jSr=)rrerr�rrrr)srcCs
t|�jSr=)r
rr�rrrr2srcCsHtj�dd�t�D��}t�d�}t||d�}t�||�}dd�|D�S)Ncss|]}|jVqdSr=)r)r.rRrrrrhAszentry_points.<locals>.<genexpr>r)�keycSsi|]\}}|t|��qSr)�tuple)r.r�epsrrrr�Fs�z entry_points.<locals>.<dictcomp>)rkrlrmrr��
attrgetter�sortedr�)r�Zby_groupZorderedZgroupedrrrr<s�
�rcCs
t|�jSr=)r
r
r�rrrr
Lsr
cCs
t|�jSr=)r
rr�rrrrUsr),r9r�r*r�r�rvrrqr|r�r!rkr��collectionsZconfigparserr�
contextlibr�	importlibr�
importlib.abcrr�__all__�ModuleNotFoundErrorr	�
namedtuplerZ
PurePosixPathrFrTrrr�r�r�rpr
rrrrr
rrrrr�<module>sN

�aY/0		
	

Hacked By AnonymousFox1.0, Coded By AnonymousFox