AlkantarClanX12

Your IP : 18.119.125.61


Current Path : /usr/lib64/python3.8/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/__pycache__/pkgutil.cpython-38.opt-2.pyc

U

e5d�S�@stddlmZddlmZddlZddlZddlZddlZddl	Zddl
Z
ddlmZddl
Z
ddddd	d
ddd
dddgZedd�Zde_dd�Zdd�Zd*dd	�Zd+dd
�Zed,dd��Zd-dd�Ze�ejje�dd�ZGdd�d�ZGd d
�d
�Zz.ddlZdd!lmZd.d"d#�Ze�ee�Wne k
�r<YnXd$d�Z!d/d%d�Z"d&d�Z#d'd�Z$d(d�Z%d)d�Z&dS)0�)�
namedtuple)�singledispatchN)�
ModuleType�get_importer�iter_importers�
get_loader�find_loader�
walk_packages�iter_modules�get_data�ImpImporter�	ImpLoader�	read_code�extend_path�
ModuleInfozmodule_finder name ispkgz.A namedtuple with minimal info about a module.cCsRz
|j}Wn:tk
rD|�|�}|dkr2YdStj�||�YSX||�SdS�N)�	find_spec�AttributeError�find_module�	importlib�util�spec_from_loader)�finder�namer�loader�r�/usr/lib64/python3.8/pkgutil.py�	_get_specs

rcCs6ddl}|�d�}|tjjkr"dS|�d�|�|�S)Nr��)�marshal�readrr�MAGIC_NUMBER�load)�streamr �magicrrrr(s

�c	#s�ifdd��t||�D]�}|V|jrzt|j�WnNtk
rZ|dk	rV||j�Yqtk
r�|dk	r|||j�n�YqXttj|jdd�p�g}�fdd�|D�}t	||jd|�EdHqdS)NcSs||krdSd||<dS)NTr)�p�mrrr�seenRszwalk_packages.<locals>.seen�__path__csg|]}�|�s|�qSrr)�.0r'�r)rr�
<listcomp>isz!walk_packages.<locals>.<listcomp>�.)
r
�ispkg�
__import__r�ImportError�	Exception�getattr�sys�modulesr	)�path�prefix�onerror�inforr,rr	5s ccsr|dkrt�}nt|t�r$td��n
tt|�}i}|D]6}t||�D]&\}}||krDd||<t|||�VqDq6dS)Nz9path must be None or list of paths to look for modules in�)r�
isinstance�str�
ValueError�mapr�iter_importer_modulesr)r6r7Z	importers�yielded�irr/rrrr
ns



cCst|d�sgS|�|�S)Nr
)�hasattrr
)�importerr7rrrr?�s
r?c	cs$|jdkstj�|j�sdSi}ddl}zt�|j�}Wntk
rPg}YnX|��|D]�}|�|�}|dks^||kr~q^tj�|j|�}d}|s�tj�|�r�d|kr�|}zt�|�}	Wntk
r�g}	YnX|	D]}|�|�}
|
dkr�d}q�q�q^|r^d|kr^d||<|||fVq^dS�Nr�__init__Fr.Tr:�	r6�os�isdir�inspect�listdir�OSError�sort�
getmodulename�join)rCr7r@rI�	filenames�fn�modnamer6r/�dircontents�subnamerrr�_iter_file_finder_modules�s<



rTc	Cs.t���t�dt�t�d�aW5QRXdS)N�ignore�imp)�warnings�catch_warnings�simplefilter�DeprecationWarningr�
import_modulerVrrrr�_import_imp�s
r\c@s*eZdZd	dd�Zd
dd�Zddd�ZdS)rNcCst�dt�t�||_dS�Nz5This emulation is deprecated, use 'importlib' instead)rW�warnrZr\r6)�selfr6rrrrE�s
�zImpImporter.__init__cCs�|�d�d}||kr$|jdkr$dS|jdkr4d}ntj�|j�g}zt�||�\}}}Wntk
rpYdSXt||||�S)Nr.���)�splitr6rG�realpathrVrr1r
)r_�fullnamer6rS�file�filename�etcrrrr�s
zImpImporter.find_moduler&c	cs$|jdkstj�|j�sdSi}ddl}zt�|j�}Wntk
rPg}YnX|��|D]�}|�|�}|dks^||kr~q^tj�|j|�}d}|s�tj�|�r�d|kr�|}zt�|�}	Wntk
r�g}	YnX|	D]}|�|�}
|
dkr�d}q�q�q^|r^d|kr^d||<|||fVq^dSrDrF)r_r7r@rIrOrPrQr6r/rRrSrrrr
�s<



zImpImporter.iter_modules)N)N)r&)�__name__�
__module__�__qualname__rErr
rrrrr�s

c@sjeZdZdZZdd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
ddd�Zddd�Zdd�Z
ddd�ZdS)r
NcCs.t�dt�t�||_||_||_||_dSr])rWr^rZr\rdrercrf)r_rcrdrerfrrrrEs�zImpLoader.__init__cCs:|��zt�||j|j|j�}W5|jr4|j��X|Sr)�_reopenrd�closerV�load_modulererf)r_rc�modrrrrlszImpLoader.load_modulec
Cs*t|d��}|��W5QR�SQRXdS)N�rb)�openr!)r_�pathnamerdrrrr%szImpLoader.get_datacCsT|jrP|jjrP|jd}|tjkr2t|jd�|_n|tjtjfkrPt|jd�|_dS)N��rrn)	rd�closedrfrV�	PY_SOURCErore�PY_COMPILED�C_EXTENSION)r_�mod_typerrrrj)s

zImpLoader._reopencCs0|dkr|j}n||jkr,td|j|f��|S)Nz,Loader for module %s cannot handle module %s)rcr1�r_rcrrr�	_fix_name1s
�zImpLoader._fix_namecCs|�|�}|jdtjkS�Nrq)ryrfrV�
PKG_DIRECTORYrxrrr�
is_package9s
zImpLoader.is_packagecCs�|�|�}|jdkr�|jd}|tjkrD|�|�}t||jd�|_nJ|tjkrv|�	�zt|j
�|_W5|j
��Xn|tj
kr�|����|_|jS)Nrq�exec)ry�coderfrVrt�
get_source�compilererurjrdrkrr{�
_get_delegate�get_code)r_rcrw�sourcerrrr�=s






zImpLoader.get_codec	Cs�|�|�}|jdkr�|jd}|tjkrP|��z|j��|_W5|j��Xnd|tj	kr�t
j�|j
dd��r�t|j
dd�d��}|��|_W5QRXn|tjkr�|����|_|jS)Nrqr`rr)ryr�rfrVrtrjrdrkr!rurGr6�existsreror{r�r)r_rcrw�frrrrNs





zImpLoader.get_sourcecCst|j�}t|d�}|jS)NrE)rrerr)r_r�specrrrr�`s

zImpLoader._get_delegatecCsH|�|�}|jd}|tjkr*|����S|tjtjtjfkrD|j	SdSrz)
ryrfrVr{r��get_filenamertrurvre)r_rcrwrrrr�es


zImpLoader.get_filename)N)N)N)rgrhrir~r�rErlrrjryr|r�rr�r�rrrrr
s	

)�zipimporterc	cs�ttj|j�}|j}t|�}i}ddl}|D]�}|�|�s>q.||d��t	j
�}t|�dkr�|d�d�r�|d|kr�d||d<||ddfVt|�dkr�q.|�|d�}|dkr�q.|r.d|kr.||kr.d||<||dfVq.dS)	Nrrqr:z__init__.pyTrEr.F)�sorted�	zipimport�_zip_directory_cache�archiver7�lenrI�
startswithrarG�seprM)	rCr7Zdirlist�_prefixZplenr@rIrPrQrrr�iter_zipimport_modulesss*
r�cCsxt�|�}ztj|}WnZtk
rrtjD]:}z ||�}tj�||�WqnWq.tk
rfYq.Xq.d}YnX|Sr)rG�fsdecoder4�path_importer_cache�KeyError�
path_hooks�
setdefaultr1)Z	path_itemrC�	path_hookrrrr�s	



ccs�|�d�rd�|�}t|��d|krV|�d�d}t�|�}t|dd�}|dkrhdSntjEdHtj	}|D]}t
|�VqldS)Nr.�'Relative module name {!r} not supportedrr*)r��formatr1�
rpartitionrr[r3r4�	meta_pathr6r)rc�msgZpkg_nameZpkgr6�itemrrrr�s


cCsn|tjkr tj|}|dkr dSt|t�rb|}t|dd�}|dk	rF|St|dd�dkrZdS|j}n|}t|�S)N�
__loader__�__spec__)r4r5r;rr3rgr)Zmodule_or_name�modulerrcrrrr�s


cCs�|�d�rd�|�}t|��ztj�|�}WnFttttfk
rr}z d}t|�|t	|�|��|�W5d}~XYnX|dk	r�|j
SdS)Nr.r�z,Error while finding loader for {!r} ({}: {}))r�r�r1rrrr�	TypeErrorr=�typer)rcr�r�Zexrrrr�s

*cCs�t|t�s|S|d}|dd�}|�d�\}}}|rfztj|j}Wqlttfk
rb|YSXntj}|D�]&}t|t	�s�qpt
|�}|dk	r�g}	t|d�r�|�|�}
|
dk	r�|
j
p�g}	nt|d�r�|�|�\}}	|	D]}||kr�|�|�q�tj�||�}tj�|�rpzt|�}
Wn8tk
�rP}ztj�d||f�W5d}~XYqpX|
�<|
D]0}|�d�}|�r\|�d��r��q\|�|��q\W5QRXqp|S)Nz.pkgr.rrzCan't open %s: %s
�
�#)r;�listr�r4r5r*r�rr6r<rrBr�submodule_search_locationsr�appendrGrN�isfilerorK�stderr�write�rstripr�)r6rZ	sname_pkgZparent_package�_Z
final_nameZsearch_path�dirr�portionsr�ZportionZpkgfiler�r��linerrrr�sR!





�
cCs�tj�|�}|dkrdS|j}|dks0t|d�s4dStj�|�pJtj�	|�}|dks^t|d�sbdS|�
d�}|�dtj
�|j��tj
j|�}|�|�S)Nr�__file__�/r)rrrrrBr4r5�get�
_bootstrap�_loadra�insertrGr6�dirnamer�rNr)�package�resourcer�rrm�partsZ
resource_namerrrrVs
�
)Nr&N)Nr&)r&)r&)r&)r&)'�collectionsr�	functoolsrZ
simplegenericr�importlib.util�importlib.machineryrGZos.pathr4�typesrrW�__all__r�__doc__rrr	r
r?rT�register�	machinery�
FileFinderr\rr
r�r�r�r1rrrrrrrrrr�<module>sf�

9

(�Jc

^