HEX
Server: Apache/2.4.65 (Unix) OpenSSL/1.1.1k
System: Linux vps109042.inmotionhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: cisa (1010)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //opt/imh-python/lib/python3.9/importlib/__pycache__/metadata.cpython-39.opt-2.pyc
a

b�h#G�@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�3/opt/imh-python/lib/python3.9/importlib/metadata.pyr	%sr	c@sjeZdZe�d�Zdd�Zedd��Zedd��Z	edd	��Z
ed
d��Zedd
��Z
dd�Zdd�ZdS)�
EntryPointzF(?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�loadGszEntryPoint.loadcCs|j�|j�}|�d�S)Nr�rrrr�r$rrrrrQszEntryPoint.modulecCs|j�|j�}|�d�S)Nrr'r(rrrrVszEntryPoint.attrcCs(|j�|j�}tt�d|�d�p"d��S)Nz\w+�extrasr)rrr�list�re�finditerrr(rrrr)[szEntryPoint.extrascs��fdd����D�S)Ncs,g|]$}��|�D]\}}�|||��qqSr��items)�.0r�namer��cls�configrr�
<listcomp>bs�z+EntryPoint._from_config.<locals>.<listcomp>)�sectionsr1rr1r�_from_config`s�zEntryPoint._from_configcCsLtdd�}t|_z|�|�Wn"ty@|�t�|��Yn0t�	|�S)N�=)Z
delimiters)
r�strZoptionxformZread_string�AttributeErrorZreadfp�io�StringIOrr6)r2�textr3rrr�
_from_texths
zEntryPoint._from_textcCst|j|f�S�N)�iterr0�r$rrr�__iter__tszEntryPoint.__iter__cCs|j|j|j|jffSr>)�	__class__r0rrr@rrr�
__reduce__zs�zEntryPoint.__reduce__N)rrrr+�compilerr&�propertyrrr)�classmethodr6r=rArCrrrrr)s 	�





rZEntryPointBasezname value groupc@s&eZdZd	dd�Zdd�Zdd�ZdS)
�PackagePath�utf-8cCs<|��j|d��}|��Wd�S1s.0YdS)N��encoding��locate�open�read)r$rJ�streamrrr�	read_text�szPackagePath.read_textcCs:|���d��}|��Wd�S1s,0YdS)N�rbrK)r$rOrrr�read_binary�szPackagePath.read_binarycCs|j�|�Sr>)�dist�locate_filer@rrrrL�szPackagePath.locateN)rH)rrrrPrRrLrrrrrG�s
rGc@seZdZdd�Zdd�ZdS)�FileHashcCs|�d�\|_}|_dS)Nr7)�	partition�moder)r$�spec�_rrr�__init__�szFileHash.__init__cCsd�|j|j�S)Nz<FileHash mode: {} value: {}>)�formatrWrr@rrr�__repr__�szFileHash.__repr__N)rrrrZr\rrrrrU�srUc@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$�filenamerrrrP�szDistribution.read_textcCsdSr>r�r$�pathrrrrT�szDistribution.locate_filecCsH|��D]2}|tj|d��}tt|�d�}|dur|Sqt|��dS)N�r0)�_discover_resolversr�Context�nextr?r	)r2r0�resolverZdistsrSrrr�	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/re�rgrr�	<genexpr>�s�z(Distribution.discover.<locals>.<genexpr>)�pop�
ValueErrorrrc�	itertools�chain�
from_iterablerb)r2�kwargsrrhr�discover�s
�zDistribution.discovercCstt�|��Sr>)�PathDistribution�pathlib�Path)r`rrr�at�szDistribution.atcCsdd�tjD�}td|�S)Ncss|]}t|dd�VqdS)�find_distributionsN)r#)r/�finderrrrri�s�z3Distribution._discover_resolvers.<locals>.<genexpr>)�sys�	meta_pathr)Zdeclaredrrrrb�s�z Distribution._discover_resolversrcCs@ddlm}m}|�|�}tj|j||d�}tt�|�	|���S)Nr)�build�meta)Z
source_dir�system)
Zpep517ryrzZ
compat_systemr!�partialrq�zipfilersZbuild_as_zip)r2�rootryrzr{Zbuilderrrr�_local�s
�zDistribution._localcCs(|�d�p|�d�p|�d�}t�|�S)NZMETADATAzPKG-INFOr)rP�emailZmessage_from_string�r$r<rrrr�s
��zDistribution.metadatacCs
|jdS)NZVersion)rr@rrrr�szDistribution.versioncCst�|�d��S)Nzentry_points.txt)rr=rPr@rrrrszDistribution.entry_pointscs6���p���}d�fdd�	}|o4tt|t�|���S)Ncs6t|�}|rt|�nd|_|r&t|�nd|_�|_|Sr>)rGrU�hash�int�sizerS)r0r�Zsize_str�resultr@rr�	make_files
z%Distribution.files.<locals>.make_file)NN)�_read_files_distinfo�_read_files_egginfor*r�csv�reader)r$Z
file_linesr�rr@rr
szDistribution.filescCs|�d�}|o|��S)NZRECORD)rP�
splitlinesr�rrrr�s
z!Distribution._read_files_distinfocCs|�d�}|otdj|���S)NzSOURCES.txtz"{}")rP�mapr[r�r�rrrr�$s
z Distribution._read_files_egginfocCs|��p|��}|ot|�Sr>)�_read_dist_info_reqs�_read_egg_info_reqsr*)r$Zreqsrrrr,szDistribution.requirescCs|j�d�S)Nz
Requires-Dist)rZget_allr@rrrr�2sz!Distribution._read_dist_info_reqscCs|�d�}|o|�|�S)Nzrequires.txt)rP�_deps_from_requires_text)r$�sourcerrrr�5s
z Distribution._read_egg_info_reqscCs4|�|���}dd�t�|t�d��D�}|�|�S)NcSs&i|]\}}|ttt�d�|���qS)�line)r*r��operator�
itemgetter)r/�section�resultsrrr�
<dictcomp><s�z9Distribution._deps_from_requires_text.<locals>.<dictcomp>r�)�_read_sectionsr�rl�groupbyr�r��%_convert_egg_info_reqs_to_simple_reqs)r2r�Z
section_pairsr5rrrr�9s
�z%Distribution._deps_from_requires_textccs<d}td|�D](}t�d|�}|r.|�d�}qt�VqdS)Nz	\[(.*)\]$�)rr+rr�locals)�linesr�r�Z
section_matchrrrr�Cs
zDistribution._read_sectionsc#sBdd���fdd�}|��D] \}}|D]}|||�Vq(qdS)NcSs|odj|d�S)Nzextra == "{name}"ra)r[rarrr�make_conditionXszJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_conditioncsX|pd}|�d�\}}}|r,|r,dj|d�}ttd|�|�g��}|rTdd�|�SdS)Nr�:z({markers}))�markersz; z and )rVr[r*r�join)r��extra�sepr�Z
conditions�r�rr�parse_condition[szKDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.parse_conditionr-)r5r�r�ZdepsZdeprr�rr�Ms
z2Distribution._convert_egg_info_reqs_to_simple_reqsN)r)rrr�abc�abstractmethodrPrTrFrfrp�staticmethodrtrbrrErrr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$rorrrrZsz#DistributionFinder.Context.__init__cCst|��dtj�S)Nr`)r��getrwr`r@rrrr`�szDistributionFinder.Context.path)rrrr0rZrEr`rrrrrcmsrccCsdSr>r)r$rgrrrru�sz%DistributionFinder.find_distributionsN)rrrrcr�r�rurrrrrhsrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�FastPathcCs||_tj�|j���|_dSr>)r~�osr`�basename�lower�base)r$r~rrrrZ�szFastPath.__init__cCst�|j|�Sr>)rrrsr~)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�rrrri�s�z(FastPath.zip_children.<locals>.<genexpr>)r}rsr~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$r0r�Zn_lowrrrr��s

�
���zFastPath.searchN)	rrrrZr�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�-rYcsg|]}�j|�qSr)�
normalized)r/�suffixr@rrr4�sz%Prepared.__init__.<locals>.<listcomp>r�)r0r��replacer�r�r�r�r�)r$r0rr@rrZ�s
�zPrepared.__init__)	rrrr�r�r�r�r�rZrrrrr��sr�c@s,eZdZee��fdd��Zedd��ZdS)�MetadataPathFindercCs|�|j|j�}tt|�Sr>)�
_search_pathsr0r`r�rq)r2rg�foundrrrru�s
z%MetadataPathFinder.find_distributionscs tj��fdd�tt|�D��S)Nc3s|]}|�t���VqdSr>)r�r�)r/r`rarrri�s�z3MetadataPathFinder._search_paths.<locals>.<genexpr>)rlrmrnr�r�)r2r0�pathsrrarr��s�z MetadataPathFinder._search_pathsN)rrrrFrrcrur�rrrrr��sr�c@s.eZdZdd�Zdd�Zejje_dd�ZdS)rqcCs
||_dSr>)�_pathr_rrrrZ�szPathDistribution.__init__cCsHtttttt��$|j�|�jdd�Wd�S1s:0YdS)NrHrI)	r�FileNotFoundError�IsADirectoryError�KeyError�NotADirectoryError�PermissionErrorr�r�rPr]rrrrP�s�zPathDistribution.read_textcCs|jj|Sr>)r��parentr_rrrrTszPathDistribution.locate_fileN)rrrrZrPr�__doc__rTrrrrrq�s
rqcCs
t�|�Sr>)rrf�Zdistribution_namerrrr
sr
cKstjfi|��Sr>)rrp)rorrrrsrcCst�|�jSr>)rrfrr�rrrrsrcCs
t|�jSr>)r
rr�rrrr srcCsHtj�dd�t�D��}t�d�}t||d�}t�||�}dd�|D�S)Ncss|]}|jVqdSr>)r)r/rSrrrri/szentry_points.<locals>.<genexpr>r)�keycSsi|]\}}|t|��qSr)�tuple)r/r�epsrrrr�4s�z entry_points.<locals>.<dictcomp>)rlrmrnrr��
attrgetter�sortedr�)r�Zby_groupZorderedZgroupedrrrr*s�
�rcCs
t|�jSr>)r
r
r�rrrr
:sr
cCs
t|�jSr>)r
rr�rrrrCsr),r:r�r+r�r�rwr�rrr}r�r!rlr��collections�configparserr�
contextlibr�	importlibr�
importlib.abcrr�__all__�ModuleNotFoundErrorr	�
namedtupler�
PurePosixPathrGrUrrr�r�r�rqr
rrrrr
rrrrr�<module>sN

�XP/0