Your IP : 3.16.50.1


Current Path : /opt/alt/python37/lib/python3.7/site-packages/distlib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/distlib/__pycache__/util.cpython-37.pyc

B

:��a��@s�ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZyddlZWnek
r�dZYnXddlZddlZddlZddlZddlZyddlZWnek
r�ddlZYnXddlZddlmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0e
�1e2�Z3e
�4d�Z5e
�4d�Z6e
�4d	�Z7e
�4d
�Z8e
�4d�Z9e
�4d�Z:e
�4d
�Z;e
�4d�Z<dd�Z=dd�Z>dd�Z?dd�Z@dd�ZAd�dd�ZBdd�ZCdd�ZDdd �ZEejFd!d"��ZGejFd#d$��ZHejFd�d&d'��ZIGd(d)�d)eJ�ZKd*d+�ZLGd,d-�d-eJ�ZMd.d/�ZNGd0d1�d1eJ�ZOe
�4d2e
jP�ZQd3d4�ZRd�d5d6�ZSd7d8�ZTd9d:�ZUd;d<�ZVd=d>�ZWd?d@�ZXe
�4dAe
jY�ZZe
�4dB�Z[d�dCdD�Z\e
�4dE�Z]dFdG�Z^dHdI�Z_dJdK�Z`dLZadMdN�ZbdOdP�ZcGdQdR�dReJ�ZdGdSdT�dTeJ�ZeGdUdV�dVeJ�ZfdWZgd�dYdZ�Zhd[d\�Zid]ZjGd^d_�d_eJ�Zke
�4d`�Zle
�4da�Zme
�4db�Zndcdd�Zdedf�Zoe�r�ddglmpZqmrZrmsZsGdhdi�die$jt�ZtGdjdk�dkeq�ZpGdldm�dmepe'�ZuGdndo�doe%jv�Zve�rGdpdq�dqe%jw�ZwGdrds�dse%jx�Zxdtdu�ZyGdvdw�dweJ�ZzGdxdy�dyez�Z{Gdzd{�d{ez�Z|Gd|d}�d}e(�Z}Gd~d�deJ�Z~d�d��ZGd�d��d�eJ�Z�d�d��Z�d�d��Z�d�d��Z�d�d�d�d��Z�d�d��Z�dS)��N)�deque)�iglob�)�DistlibException)�string_types�	text_type�shutil�	raw_input�StringIO�cache_from_source�urlopen�urljoin�httplib�	xmlrpclib�	splittype�HTTPHandler�BaseConfigurator�valid_ident�	Container�configparser�URLError�ZipFile�fsdecode�unquote�urlparsez^([\w\.-]+)\s*z^([\w\.*+-]+)\s*z^(<=?|>=?|={2,3}|[~!]=)\s*z*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*z^or\b\s*z	^and\b\s*z(\S+)\s*z(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)cs6dd����fdd���fdd���fdd���|�S)	ae
    Parse a marker string and return a dictionary containing a marker expression.

    The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
    the expression grammar, or strings. A string contained in quotes is to be
    interpreted as a literal string, and a string not contained in quotes is a
    variable (such as os_name).
    cSs0t�|�}|r,|��d}||��d�}n�|s:td��n�|d}|dkrVtd|��d�|d�}|dd�}|g}x�|r�|d|kr�Pqv|d|kr�|�|�|dd�}qvt�|�}|s�td|��|�|��d�||��d�}qvWd�|�}td|��|�|�d�|�}|dd��	�}||fS)	Nrzunexpected end of inputz'"zinvalid expression: %s�rzerror in string literal: %szunterminated string: %s)
�
IDENTIFIER�match�groups�end�SyntaxError�replace�append�STRING_CHUNK�join�lstrip)�	remaining�m�result�qZoq�parts�s�r,�=/opt/alt/python37/lib/python3.7/site-packages/distlib/util.py�
marker_varAs:






z parse_marker.<locals>.marker_varcs�|rR|ddkrR�|dd����\}}|ddkr@td|��|dd���}n^�|�\}}xL|r�t�|�}|stP|��d}||��d�}�|�\}}|||d�}q`W|}||fS)Nr�(r�)zunterminated parenthesis: %s)�op�lhs�rhs)r%r �	MARKER_OPrrr)r&r(r2r'r1r3)�markerr.r,r-�marker_expres 
z!parse_marker.<locals>.marker_exprcsV�|�\}}x@|rLt�|�}|s"P||��d�}�|�\}}d||d�}qW||fS)N�and)r1r2r3)�ANDrr)r&r2r'r3)r6r,r-�
marker_andxs
z parse_marker.<locals>.marker_andcsV�|�\}}x@|rLt�|�}|s"P||��d�}�|�\}}d||d�}qW||fS)N�or)r1r2r3)�ORrr)r&r2r'r3)r9r,r-r5�s
zparse_marker.<locals>.markerr,)Z
marker_stringr,)r5r9r6r.r-�parse_marker8s
	$r<cCs2|��}|r|�d�rdSt�|�}|s4td|��|��d}||��d�}d}}}}|�r<|ddk�r<|�dd�}|dkr�td|��|d|�}	||dd���}g}xx|	�r0t�|	�}|s�td	|	��|�	|��d�|	|��d�}	|	�sP|	dd
k�rtd|	��|	dd���}	q�W|�s<d}|�r�|ddk�r�|dd���}t
�|�}|�s|td
|��|��d}t|�}
|
j�r�|
j
�s�td|��||��d���}n�dd�}|ddk�r�||�\}}n�|�dd�}|dk�rtd|��|d|�}	||dd���}t�|	��rB||	�\}}nXt�|	�}|�s^td|	��|��d}
|	|��d���}	|	�r�td|	��d|
fg}|�r�|ddk�r�td|��|dd���}t|�\}}|�r�|ddk�r�td|��|�s|}nd|d�dd�|D��f}t||||||d�S)z�
    Parse a requirement passed in as a string. Return a Container
    whose attributes contain the various parts of the requirement.
    �#Nzname expected: %sr�[�]rzunterminated extra: %szmalformed extra: %s�,zcomma expected in extras: %s�@zinvalid URI: %szInvalid URL: %scSs�t�|�}d}|r�g}x�|��d}||��d�}t�|�}|sNtd|��|��d}|�||f�||��d�}|r�|ddkr�P|dd���}|s�Pt�|�}|std|��qW|s�d}||fS)z|
                Return a list of operator, version tuples if any are
                specified, else None.
                Nrzinvalid version: %sr@rzinvalid constraint: %s)�
COMPARE_OPrrr�VERSION_IDENTIFIERr r"r%)Z
ver_remainingr'�versionsr1�vr,r,r-�get_versions�s0


z'parse_requirement.<locals>.get_versionsr/r0zunterminated parenthesis: %szinvalid constraint: %sz~=�;zinvalid requirement: %szunexpected trailing data: %sz%s %sz, cSsg|]}d|�qS)z%s %sr,)�.0Zconr,r,r-�
<listcomp>	sz%parse_requirement.<locals>.<listcomp>)�name�extrasZconstraintsr5�urlZrequirement)�strip�
startswithrrr rr�findr%r"�	NON_SPACEr�scheme�netlocrBrCr<r$r)�reqr&r'ZdistnamerKZ	mark_exprrD�uri�ir+�trF�_rEZrsr,r,r-�parse_requirement�s�


 


rXcCs�dd�}i}x�|D]�\}}}tj�||�}x�t|�D]t}tj�||�}	x`t|	�D]T}
|||
�}|dkrt|�|d�qP|||
�}|�tjjd��d�}
|
d|||<qPWq4WqW|S)z%Find destinations for resources filescSsD|�tjjd�}|�tjjd�}|�|�s.t�|t|�d��d�S)N�/)r!�os�path�seprN�AssertionError�lenr%)�rootr[r,r,r-�get_rel_pathsz)get_resources_dests.<locals>.get_rel_pathNrY)rZr[r$r�popr!r\�rstrip)Zresources_rootZrulesr`Zdestinations�base�suffix�dest�prefixZabs_baseZabs_globZabs_pathZ
resource_fileZrel_pathZrel_destr,r,r-�get_resources_destss

rgcCs(ttd�rd}ntjttdtj�k}|S)NZreal_prefixT�base_prefix)�hasattr�sysrf�getattr)r(r,r,r-�in_venv(s
rlcCstj}t|t�st|�}|S)N)rj�
executable�
isinstancerr)r(r,r,r-�get_executable2s
rocCsR|}xHt|�}|}|s|r|}|r|d��}||kr8P|rd|||f}qW|S)Nrz	%c: %s
%s)r	�lower)�promptZ
allowed_charsZerror_prompt�default�pr+�cr,r,r-�proceedDsrucCs<t|t�r|��}i}x |D]}||kr||||<qW|S)N)rnr�split)�d�keysr(�keyr,r,r-�extract_by_keyTs

rzcCs�tjddkrt�d�|�}|��}t|�}yrt�|�}|ddd}xR|��D]F\}}x<|��D]0\}}d||f}t	|�}	|	dk	s�t
�|	||<qdWqRW|Stk
r�|�dd�YnXdd	�}
t
��}y|
||�Wn<t
jk
�r|��t�|�}t|�}|
||�YnXi}xb|��D]V}i||<}xB|�|�D]4\}
}d|
|f}t	|�}	|	dk	�spt
�|	||
<�qFW�q*W|S)
Nr�zutf-8�
extensionszpython.exports�exportsz%s = %scSs$t|d�r|�|�n
|�|�dS)N�	read_file)rir~�readfp)�cp�streamr,r,r-�read_streamqs
z!read_exports.<locals>.read_stream)rj�version_info�codecs�	getreader�readr
�json�load�items�get_export_entryr]�	Exception�seekr�ConfigParser�MissingSectionHeaderError�close�textwrap�dedent�sections)r��dataZjdatar(�group�entries�krEr+�entryr�r�ryrJ�valuer,r,r-�read_exports]sD

r�cCs�tjddkrt�d�|�}t��}x||��D]p\}}|�|�x\|��D]P}|j	dkr`|j
}nd|j
|j	f}|jr�d|d�|j�f}|�
||j|�qJWq.W|�|�dS)Nrr{zutf-8z%s:%sz%s [%s]z, )rjr�r��	getwriterrr�r��add_section�valuesrdrf�flagsr$�setrJ�write)r}r�r�r�rEr�r+r,r,r-�
write_exports�s

r�c	cs$t��}z
|VWdt�|�XdS)N)�tempfile�mkdtempr�rmtree)Ztdr,r,r-�tempdir�s
r�c	cs.t��}zt�|�dVWdt�|�XdS)N)rZ�getcwd�chdir)rw�cwdr,r,r-r��s


r��c	cs.t��}zt�|�dVWdt�|�XdS)N)�socketZgetdefaulttimeoutZsetdefaulttimeout)ZsecondsZctor,r,r-�socket_timeout�s


r�c@seZdZdd�Zddd�ZdS)�cached_propertycCs
||_dS)N)�func)�selfr�r,r,r-�__init__�szcached_property.__init__NcCs,|dkr|S|�|�}t�||jj|�|S)N)r��object�__setattr__�__name__)r��obj�clsr�r,r,r-�__get__�s

zcached_property.__get__)N)r��
__module__�__qualname__r�r�r,r,r,r-r��sr�cCs�tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}xtj|krj|�tj�qRW|svtjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rYrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/')rZr\�
ValueErrorrv�curdir�remover[r$)�pathname�pathsr,r,r-�convert_path�s


r�c@s�eZdZd$dd�Zdd�Zdd�Zdd	�Zd%dd�Zd&dd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
d'dd�Zdd�Zdd�Zd d!�Zd"d#�Zd
S)(�FileOperatorFcCs||_t�|_|��dS)N)�dry_runr��ensured�_init_record)r�r�r,r,r-r��szFileOperator.__init__cCsd|_t�|_t�|_dS)NF)�recordr��
files_written�dirs_created)r�r,r,r-r��szFileOperator._init_recordcCs|jr|j�|�dS)N)r�r��add)r�r[r,r,r-�record_as_written�szFileOperator.record_as_writtencCsHtj�|�s tdtj�|���tj�|�s0dSt�|�jt�|�jkS)a�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        zfile '%r' does not existT)rZr[�existsr�abspath�stat�st_mtime)r��source�targetr,r,r-�newer�szFileOperator.newerTcCs�|�tj�|��t�d||�|js�d}|rdtj�|�rDd|}n tj�|�rdtj�	|�sdd|}|rtt
|d��t�||�|�
|�dS)z8Copy a file respecting dry-run and force flags.
        zCopying %s to %sNz%s is a symlinkz%s is a non-regular filez which would be overwritten)�
ensure_dirrZr[�dirname�logger�infor��islinkr��isfiler�r�copyfiler�)r��infile�outfile�check�msgr,r,r-�	copy_files
zFileOperator.copy_fileNcCs�tj�|�rt�|�tj�|��t�d||�|jsv|dkrJt	|d�}nt
j	|d|d�}zt�||�Wd|�
�X|�|�dS)NzCopying stream %s to %s�wb�w)�encoding)rZr[�isdirr]r�r�r�r�r��openr�r�copyfileobjr�r�)r�Zinstreamr�r�Z	outstreamr,r,r-�copy_streams
zFileOperator.copy_streamc	Cs\|�tj�|��|jsNtj�|�r.t�|�t|d��}|�|�WdQRX|�	|�dS)Nr�)
r�rZr[r�r�r�r�r�r�r�)r�r[r��fr,r,r-�write_binary_file's
zFileOperator.write_binary_filecCs|�||�|��dS)N)r��encode)r�r[r�r�r,r,r-�write_text_file0szFileOperator.write_text_filecCsrtjdkstjdkrntjdkrnxN|D]F}|jr<t�d|�q$t�|�j|B|@}t�d||�t�||�q$WdS)N�posix�javazchanging mode of %szchanging mode of %s to %o)	rZrJ�_namer�r�r�r��st_mode�chmod)r��bits�mask�filesr��moder,r,r-�set_mode3s
zFileOperator.set_modecCs|�dd|�S)Nimi�)r�)r+r�r,r,r-�<lambda>?�zFileOperator.<lambda>cCs|tj�|�}||jkrxtj�|�sx|j�|�tj�|�\}}|�|�t�	d|�|j
sft�|�|jrx|j
�|�dS)NzCreating %s)rZr[r�r�r�r�rvr�r�r�r��mkdirr�r�)r�r[rwr�r,r,r-r�As

zFileOperator.ensure_dirc	Cs�t||�}t�d||�|js�|s0|�||�rX|s:d}n|�|�sHt�|t|�d�}i}|rvtt	d�rvt	j
j|d<t	j|||df|�|�
|�|S)NzByte-compiling %s to %s�PycInvalidationMode�invalidation_modeT)rr�r�r�r�rNr]r^ri�
py_compiler��CHECKED_HASH�compiler�)	r�r[�optimize�forcerfZhashed_invalidationZdpathZdiagpathZcompile_kwargsr,r,r-�byte_compileMs
zFileOperator.byte_compilecCs�tj�|�r�tj�|�r^tj�|�s^t�d|�|js@t�	|�|j
r�||jkr�|j�|�nPtj�|�rpd}nd}t�d||�|js�t�|�|j
r�||j
kr�|j
�|�dS)NzRemoving directory tree at %s�link�filezRemoving %s %s)rZr[r�r�r�r��debugr�rr�r�r�r�r�)r�r[r+r,r,r-�ensure_removed^s"



zFileOperator.ensure_removedcCsHd}x>|sBtj�|�r&t�|tj�}Ptj�|�}||kr<P|}qW|S)NF)rZr[r��access�W_OKr�)r�r[r(�parentr,r,r-�is_writablesszFileOperator.is_writablecCs"|js
t�|j|jf}|��|S)zV
        Commit recorded changes, turn off recording, return
        changes.
        )r�r]r�r�r�)r�r(r,r,r-�commits
zFileOperator.commitcCs�|js�x(t|j�D]}tj�|�rt�|�qWt|jdd�}xN|D]F}t�	|�}|r�|dgksdt
�tj�||d�}t�|�t�|�qDW|�
�dS)NT)�reverse�__pycache__r)r��listr�rZr[r�r��sortedr��listdirr]r$�rmdirr�)r�r��dirsrwZflist�sdr,r,r-�rollback�s


zFileOperator.rollback)F)T)N)FFNF)r�r�r�r�r�r�r�r�r�r�r�r�Zset_executable_moder�r�r�rrrr,r,r,r-r��s 


	

r�cCsb|tjkrtj|}nt|�}|dkr,|}n2|�d�}t||�d��}x|D]}t||�}qLW|S)N�.r)rj�modules�
__import__rvrkra)�module_nameZdotted_path�modr(r*rsr,r,r-�resolve�s


rc@s6eZdZdd�Zedd��Zdd�Zdd�Zej	Z	d	S)
�ExportEntrycCs||_||_||_||_dS)N)rJrfrdr�)r�rJrfrdr�r,r,r-r��szExportEntry.__init__cCst|j|j�S)N)rrfrd)r�r,r,r-r��szExportEntry.valuecCsd|j|j|j|jfS)Nz<ExportEntry %s = %s:%s %s>)rJrfrdr�)r�r,r,r-�__repr__�s
zExportEntry.__repr__cCsDt|t�sd}n0|j|jko>|j|jko>|j|jko>|j|jk}|S)NF)rnrrJrfrdr�)r��otherr(r,r,r-�__eq__�s
zExportEntry.__eq__N)
r�r�r�r�r�r�rrr��__hash__r,r,r,r-r�s

rz�(?P<name>(\w|[-.+])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c
Cs�t�|�}|s0d}d|ks"d|kr�td|��n�|��}|d}|d}|�d�}|dkrf|d}}n"|dkrztd|��|�d�\}}|d	}	|	dkr�d|ks�d|kr�td|��g}	nd
d�|	�d�D�}	t||||	�}|S)
Nr>r?zInvalid specification '%s'rJ�callable�:rrr�cSsg|]}|���qSr,)rM)rHr�r,r,r-rI�sz$get_export_entry.<locals>.<listcomp>r@)�ENTRY_RE�searchr�	groupdict�countrvr)
Z
specificationr'r(rwrJr[Zcolonsrfrdr�r,r,r-r��s2


r�cCs�|dkrd}tjdkr.dtjkr.tj�d�}ntj�d�}tj�|�rft�|tj�}|s�t	�
d|�n<yt�|�d}Wn(tk
r�t	j
d	|dd
�d}YnX|s�t
��}t	�
d|�tj�||�S)
a�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    Nz.distlib�ntZLOCALAPPDATAz
$localappdata�~z(Directory exists but is not writable: %sTzUnable to create %s)�exc_infoFz#Default location unusable, using %s)rZrJ�environr[�
expandvars�
expanduserr�r�r�r��warning�makedirs�OSErrorr�r�r$)rdr(Zusabler,r,r-�get_cache_base�s&

r&cCsBtj�tj�|��\}}|r(|�dd�}|�tjd�}||dS)a
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    rz---z--z.cache)rZr[�
splitdriver�r!r\)r[rwrsr,r,r-�path_to_cache_dirs

r(cCs|�d�s|dS|S)NrY)�endswith)r+r,r,r-�ensure_slash$s
r*cCs`d}}d|kr>|�dd�\}}d|kr.|}n|�dd�\}}|rJt|�}|rVt|�}|||fS)NrArr)�rsplitrvr)rR�username�passwordrfr,r,r-�parse_credentials*sr.cCst�d�}t�|�|S)N�)rZ�umask)r(r,r,r-�get_process_umask9s

r1cCs>d}d}x$t|�D]\}}t|t�sd}PqW|dk	s:t�|S)NTF)�	enumeraternrr])�seqr(rUr+r,r,r-�is_string_sequence>s
r4z3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)z
-py(\d\.?\d?)cCs�d}d}t|��dd�}t�|�}|r@|�d�}|d|���}|r�t|�t|�dkr�t�t�	|�d|�}|r�|�
�}|d|�||dd�|f}|dkr�t�|�}|r�|�d�|�d�|f}|S)zw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    N� �-rz\br{)rr!�PYTHON_VERSIONrr��startr^�rer�escaper�PROJECT_NAME_AND_VERSION)�filenameZproject_namer(Zpyverr'�nr,r,r-�split_filenameMs"


r>z-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$cCs:t�|�}|std|��|��}|d����|dfS)z�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    z$Ill-formed name/version string: '%s'rJZver)�NAME_VERSION_RErrrrMrp)rsr'rwr,r,r-�parse_name_and_versionis
	
r@cCs�t�}t|pg�}t|pg�}d|kr8|�d�||O}x�|D]x}|dkrV|�|�q>|�d�r�|dd�}||kr�t�d|�||kr�|�|�q>||kr�t�d|�|�|�q>W|S)N�*r6rzundeclared extra: %s)r�r�r�rNr�r#)Z	requestedZ	availabler(�rZunwantedr,r,r-�
get_extrasxs&


rCc
Cs�i}yNt|�}|��}|�d�}|�d�s8t�d|�nt�d�|�}t�	|�}Wn0t
k
r�}zt�d||�Wdd}~XYnX|S)NzContent-Typezapplication/jsonz(Unexpected response for JSON request: %szutf-8z&Failed to get external data for %s: %s)rr��getrNr�r�r�r�r�r�r��	exception)rLr(Zresp�headers�ct�reader�er,r,r-�_get_external_data�s

 rJz'https://www.red-dove.com/pypi/projects/cCs*d|d��|f}tt|�}t|�}|S)Nz%s/%s/project.jsonr)�upperr
�_external_data_base_urlrJ)rJrLr(r,r,r-�get_project_data�s
rMcCs(d|d��||f}tt|�}t|�S)Nz%s/%s/package-%s.jsonr)rKr
rLrJ)rJ�versionrLr,r,r-�get_package_data�s
rOc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�Cachez�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    cCsPtj�|�st�|�t�|�jd@dkr6t�d|�tj�tj�	|��|_
dS)zu
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        �?rzDirectory '%s' is not privateN)rZr[r�r$r�r�r�r#r��normpathrc)r�rcr,r,r-r��s

zCache.__init__cCst|�S)zN
        Converts a resource prefix to a directory name in the cache.
        )r()r�rfr,r,r-�
prefix_to_dir�szCache.prefix_to_dirc	Cs�g}x�t�|j�D]r}tj�|j|�}y>tj�|�s@tj�|�rLt�|�ntj�|�rbt	�
|�Wqtk
r�|�|�YqXqW|S)z"
        Clear the cache.
        )
rZrrcr[r$r�r�r�r�rr�r�r")r�Znot_removed�fnr,r,r-�clear�szCache.clearN)r�r�r��__doc__r�rSrUr,r,r,r-rP�srPc@s:eZdZdZdd�Zddd�Zdd�Zd	d
�Zdd�Zd
S)�
EventMixinz1
    A very simple publish/subscribe system.
    cCs
i|_dS)N)�_subscribers)r�r,r,r-r��szEventMixin.__init__TcCsD|j}||krt|g�||<n"||}|r6|�|�n
|�|�dS)a`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N)rXrr"�
appendleft)r��event�
subscriberr"�subs�sqr,r,r-r��s
zEventMixin.addcCs,|j}||krtd|��||�|�dS)z�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        zNo subscribers: %rN)rXr�r�)r�rZr[r\r,r,r-r��szEventMixin.removecCst|j�|d��S)z�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        r,)�iterrXrD)r�rZr,r,r-�get_subscribersszEventMixin.get_subscribersc	Ospg}xT|�|�D]F}y||f|�|�}Wn"tk
rJt�d�d}YnX|�|�qWt�d||||�|S)a^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        z"Exception during event publicationNz/publish %s: args = %s, kwargs = %s, result = %s)r_r�r�rEr"r�)r�rZ�args�kwargsr(r[r�r,r,r-�publish
s

zEventMixin.publishN)T)	r�r�r�rVr�r�r�r_rbr,r,r,r-rW�s
rWc@s^eZdZdd�Zdd�Zddd�Zdd	�Zd
d�Zdd
�Zdd�Z	e
dd��Ze
dd��ZdS)�	SequencercCsi|_i|_t�|_dS)N)�_preds�_succsr��_nodes)r�r,r,r-r�(szSequencer.__init__cCs|j�|�dS)N)rfr�)r��noder,r,r-�add_node-szSequencer.add_nodeFcCs�||jkr|j�|�|r�x&t|j�|d��D]}|�||�q.Wx&t|j�|d��D]}|�||�qVWx&t|j���D]\}}|sz|j|=qzWx&t|j���D]\}}|s�|j|=q�WdS)Nr,)rfr�r�rdrDrerr�)r�rgZedgesrsr+r�rEr,r,r-�remove_node0s
zSequencer.remove_nodecCs<||kst�|j�|t���|�|j�|t���|�dS)N)r]rd�
setdefaultr�r�re)r��pred�succr,r,r-r�@sz
Sequencer.addcCs�||kst�y|j|}|j|}Wn tk
rDtd|��YnXy|�|�|�|�Wn$tk
r�td||f��YnXdS)Nz%r not a successor of anythingz%r not a successor of %r)r]rdre�KeyErrorr�r�)r�rkrl�predsZsuccsr,r,r-r�Es

zSequencer.removecCs||jkp||jkp||jkS)N)rdrerf)r��stepr,r,r-�is_stepRszSequencer.is_stepcCs�|�|�std|��g}g}t�}|�|�xd|r�|�d�}||krd||kr�|�|�|�|�q0|�|�|�|�|j�|d�}|�	|�q0Wt
|�S)NzUnknown: %rrr,)rpr�r�r"rar�r�rdrD�extend�reversed)r��finalr(Ztodo�seenrornr,r,r-�	get_stepsVs"





zSequencer.get_stepscsVdg�g�i�i�g�|j��������fdd��x�D]}|�kr:�|�q:W�S)Nrcs��d�|<�d�|<�dd7<��|�y�|}Wntk
rVg}YnXxR|D]J}|�kr��|�t�|�|��|<q^|�kr^t�|�|��|<q^W�|�|kr�g}x ���}|�|�||kr�Pq�Wt|�}��|�dS)Nrr)r"r��minra�tuple)rgZ
successorsZ	successorZconnected_componentZ	component)�graph�index�
index_counter�lowlinksr(�stack�
strongconnectr,r-r}zs.



z3Sequencer.strong_connections.<locals>.strongconnect)re)r�rgr,)rxryrzr{r(r|r}r-�strong_connectionsos"
zSequencer.strong_connectionscCsrdg}x8|jD].}|j|}x|D]}|�d||f�q"WqWx|jD]}|�d|�qHW|�d�d�|�S)Nzdigraph G {z  %s -> %s;z  %s;�}�
)rdr"rfr$)r�r(rlrnrkrgr,r,r-�dot�s


z
Sequencer.dotN)F)
r�r�r�r�rhrir�r�rpru�propertyr~r�r,r,r,r-rc's

3rc)z.tar.gzz.tar.bz2z.tarz.zipz.tgzz.tbzz.whlTc
sX��fdd�}tj����t���d}|dkr�|�d�r>d}nH|�d�rRd}d}n4|�d�rfd	}d
}n |�d�rzd}d
}ntd|��z�|dkr�t|d
�}|r�|��}xD|D]}||�q�Wn.t�	||�}|r�|�
�}x|D]}||�q�W|dk�r6tjddk�r6x.|�
�D]"}	t|	jt��s|	j�d�|	_�qW|���Wd|�rR|��XdS)NcsRt|t�s|�d�}tj�tj��|��}|���rB|�tjkrNt	d|��dS)Nzutf-8zpath outside destination: %r)
rnr�decoderZr[r�r$rNr\r�)r[rs)�dest_dir�plenr,r-�
check_path�s


zunarchive.<locals>.check_path)z.zipz.whl�zip)z.tar.gzz.tgzZtgzzr:gz)z.tar.bz2z.tbzZtbzzr:bz2z.tar�tarrBzUnknown format for %rrr{zutf-8)rZr[r�r^r)r�r�namelist�tarfiler�Zgetnamesrjr�Z
getmembersrnrJrr��
extractallr�)
Zarchive_filenamer��formatr�r��archiver��namesrJ�tarinfor,)r�r�r-�	unarchive�sH






r�c	Cs�t��}t|�}t|d��b}xZt�|�D]L\}}}x@|D]8}tj�||�}||d�}	tj�|	|�}
|�||
�q8Wq(WWdQRX|S)z*zip a directory tree into a BytesIO objectr�N)	�io�BytesIOr^rrZ�walkr[r$r�)�	directoryr(Zdlen�zfr_r	r�rJZfullZrelrer,r,r-�zip_dir�s
r�)r�K�M�G�T�Pc@sreZdZdZddd�Zdd�Zdd	�Zd
d�Zdd
�Ze	dd��Z
e	dd��Zdd�Ze	dd��Z
e	dd��ZdS)�Progress�UNKNOWNr�dcCs<|dks||kst�||_|_||_d|_d|_d|_dS)NrF)r]rv�cur�max�started�elapsed�done)r�ZminvalZmaxvalr,r,r-r�szProgress.__init__cCsV|j|kst�|jdks&||jks&t�||_t��}|jdkrF||_n||j|_dS)N)rvr]r�r��timer�r�)r�ZcurvalZnowr,r,r-�update
s
zProgress.updatecCs |dkst�|�|j|�dS)Nr)r]r�r�)r�Zincrr,r,r-�	incrementszProgress.incrementcCs|�|j�|S)N)r�rv)r�r,r,r-r8szProgress.startcCs |jdk	r|�|j�d|_dS)NT)r�r�r�)r�r,r,r-�stops
z
Progress.stopcCs|jdkr|jS|jS)N)r��unknown)r�r,r,r-�maximum!szProgress.maximumcCsD|jrd}n4|jdkrd}n$d|j|j|j|j}d|}|S)Nz100 %z ?? %gY@z%3d %%)r�r�r�rv)r�r(rEr,r,r-�
percentage%s
zProgress.percentagecCs:|dkr|jdks|j|jkr$d}nt�dt�|��}|S)Nrz??:??:??z%H:%M:%S)r�r�rvr��strftime�gmtime)r�Zdurationr(r,r,r-�format_duration0szProgress.format_durationcCs�|jrd}|j}n^d}|jdkr&d}nJ|jdks<|j|jkrBd}n.t|j|j�}||j|j}|d|j}d||�|�fS)NZDonezETA r�rrz%s: %s)r�r�r�r�rv�floatr�)r�rfrVr,r,r-�ETA9s
zProgress.ETAcCsN|jdkrd}n|j|j|j}xtD]}|dkr6P|d}q(Wd||fS)Nrgi�g@�@z%d %sB/s)r�r�rv�UNITS)r�r(Zunitr,r,r-�speedLs

zProgress.speedN)rr�)r�r�r�r�r�r�r�r8r�r�r�r�r�r�r�r,r,r,r-r��s

	r�z\{([^}]*)\}z[^/\\,{]\*\*|\*\*[^/\\,}]z^[^{]*\}|\{[^}]*$cCs<t�|�rd}t||��t�|�r4d}t||��t|�S)zAExtended globbing function that supports ** and {opt1,opt2,opt3}.z7invalid glob %r: recursive glob "**" must be used alonez2invalid glob %r: mismatching set marker '{' or '}')�_CHECK_RECURSIVE_GLOBrr��_CHECK_MISMATCH_SET�_iglob)�	path_globr�r,r,r-ras

rccst�|d�}t|�dkrpt|�dks,t|��|\}}}x�|�d�D](}x"td�|||f��D]
}|Vq\WqBWn�d|kr�x�t|�D]
}|Vq�Wn�|�dd�\}}|dkr�d}|dkr�d}n|�d�}|�d	�}xHt�	|�D]:\}}}	tj
�|�}x"ttj
�||��D]}
|
V�qWq�WdS)
Nrr{r@rz**rrArY�\)�	RICH_GLOBrvr^r]r�r$�	std_iglobr%rZr�r[rR)r�Zrich_path_globrfr�rd�itemr[Zradical�dirr�rTr,r,r-r�ls*


r�)�HTTPSHandler�match_hostname�CertificateErrorc@seZdZdZdZdd�ZdS)�HTTPSConnectionNTcCst�|j|jf|j�}t|dd�r0||_|��t�	tj
�}ttd�rV|jtj
O_|jrl|�|j|j�i}|jr�tj|_|j|jd�ttdd�r�|j|d<|j|f|�|_|j�r|j�ry$t|j��|j�t�d|j�Wn0tk
�r|j�tj�|j���YnXdS)NZ_tunnel_hostF�OP_NO_SSLv2)ZcafileZHAS_SNIZserver_hostnamezHost verified: %s)r�Zcreate_connection�hostZport�timeoutrk�sockZ_tunnel�sslZ
SSLContextZPROTOCOL_SSLv23ri�optionsr�Z	cert_fileZload_cert_chainZkey_file�ca_certsZ
CERT_REQUIREDZverify_modeZload_verify_locationsZwrap_socket�check_domainr�Zgetpeercertr�r�r��shutdownZ	SHUT_RDWRr�)r�r��contextrar,r,r-�connect�s0


zHTTPSConnection.connect)r�r�r�r�r�r�r,r,r,r-r��sr�c@s&eZdZd	dd�Zdd�Zdd�ZdS)
r�TcCst�|�||_||_dS)N)�BaseHTTPSHandlerr�r�r�)r�r�r�r,r,r-r��s
zHTTPSHandler.__init__cOs$t||�}|jr |j|_|j|_|S)a
            This is called to create a connection instance. Normally you'd
            pass a connection class to do_open, but it doesn't actually check for
            a class, and just expects a callable. As long as we behave just as a
            constructor would have, we should be OK. If it ever changes so that
            we *must* pass a class, we'll create an UnsafeHTTPSConnection class
            which just sets check_domain to False in the class definition, and
            choose which one to pass to do_open.
            )r�r�r�)r�r`rar(r,r,r-�_conn_maker�s


zHTTPSHandler._conn_makerc
CsVy|�|j|�Stk
rP}z$dt|j�kr>td|j��n�Wdd}~XYnXdS)Nzcertificate verify failedz*Unable to verify server certificate for %s)Zdo_openr�r�str�reasonr�r�)r�rSrIr,r,r-�
https_open�szHTTPSHandler.https_openN)T)r�r�r�r�r�r�r,r,r,r-r��s
r�c@seZdZdd�ZdS)�HTTPSOnlyHandlercCstd|��dS)NzAUnexpected HTTP request on what should be a secure connection: %s)r)r�rSr,r,r-�	http_open�szHTTPSOnlyHandler.http_openN)r�r�r�r�r,r,r,r-r��sr�c@seZdZddd�Zdd�ZdS)�	TransportrcCs||_tj�||�dS)N)r�rr�r�)r�r��use_datetimer,r,r-r��szTransport.__init__cCsD|�|�\}}}|jr$||jdkr:||_|t�|�f|_|jdS)Nrr)�
get_host_info�_connection�_extra_headersrZHTTPConnection)r�r��h�ehZx509r,r,r-�make_connection�s
zTransport.make_connectionN)r)r�r�r�r�r�r,r,r,r-r��s
r�c@seZdZddd�Zdd�ZdS)�
SafeTransportrcCs||_tj�||�dS)N)r�rr�r�)r�r�r�r,r,r-r��szSafeTransport.__init__cCs\|�|�\}}}|si}|j|d<|jr6||jdkrR||_|tj|df|�f|_|jdS)Nr�rr)r�r�r�r�rr�)r�r�r�r�rar,r,r-r��s

zSafeTransport.make_connectionN)r)r�r�r�r�r�r,r,r,r-r��s
r�c@seZdZdd�ZdS)�ServerProxycKst|�dd�|_}|dk	r^t|�d}|�dd�}|dkr@t}nt}|||d�|d<}||_tjj	||f|�dS)Nr�rr�Zhttps)r��	transport)
rar�rrDr�r�r�rr�r�)r�rTrar�rQr�ZtclsrVr,r,r-r�szServerProxy.__init__N)r�r�r�r�r,r,r,r-r�sr�cKs6tjddkr|d7}nd|d<d|d<t||f|�S)Nrr{�br�newlinezutf-8r�)rjr�r�)rTr�rar,r,r-�	_csv_opens

r�c@s4eZdZed�ed�ed�d�Zdd�Zdd�Zd	S)
�CSVBaser@�"r�)�	delimiterZ	quotecharZlineterminatorcCs|S)Nr,)r�r,r,r-�	__enter__(szCSVBase.__enter__cGs|j��dS)N)r�r�)r�rr,r,r-�__exit__+szCSVBase.__exit__N)r�r�r�r��defaultsr�r�r,r,r,r-r�!s
r�c@s(eZdZdd�Zdd�Zdd�ZeZdS)�	CSVReadercKs\d|kr4|d}tjddkr,t�d�|�}||_nt|dd�|_tj|jf|j�|_dS)Nr�rr{zutf-8r[rB)	rjr�r�r�r�r��csvrHr�)r�rar�r,r,r-r�0szCSVReader.__init__cCs|S)Nr,)r�r,r,r-�__iter__;szCSVReader.__iter__cCsJt|j�}tjddkrFx,t|�D] \}}t|t�s"|�d�||<q"W|S)Nrr{zutf-8)�nextrHrjr�r2rnrr�)r�r(rUr�r,r,r-r�>s

zCSVReader.nextN)r�r�r�r�r�r��__next__r,r,r,r-r�/sr�c@seZdZdd�Zdd�ZdS)�	CSVWritercKs$t|d�|_tj|jf|j�|_dS)Nr�)r�r�r��writerr�)r�rTrar,r,r-r�IszCSVWriter.__init__cCsRtjddkrBg}x*|D]"}t|t�r0|�d�}|�|�qW|}|j�|�dS)Nrr{zutf-8)rjr�rnrr�r"r��writerow)r��rowrBr�r,r,r-r�Ms


zCSVWriter.writerowN)r�r�r�r�r�r,r,r,r-r�Hsr�csHeZdZeej�Zded<d�fdd�	Zdd�Zdd	�Zd
d�Z	�Z
S)
�Configurator�inc_convertZincNcs"tt|��|�|pt��|_dS)N)�superr�r�rZr�rc)r��configrc)�	__class__r,r-r�`szConfigurator.__init__c
s���fdd����d�}t|�s*��|�}��dd�}��dd�}|r\t�fdd�|D��}��fd	d��D�}t|�}|||�}|r�x$|��D]\}}	t||�|	��q�W|S)
Ncszt|ttf�r*t|��fdd�|D��}nLt|t�rld|krH��|�}qvi}x(|D]}�||�||<qRWn
��|�}|S)Ncsg|]}�|��qSr,r,)rHrU)�convertr,r-rIgszBConfigurator.configure_custom.<locals>.convert.<locals>.<listcomp>z())rnrrw�type�dict�configure_customr�)�or(r�)r�r�r,r-r�es


z.Configurator.configure_custom.<locals>.convertz()rz[]r,csg|]}�|��qSr,r,)rHr�)r�r,r-rIzsz1Configurator.configure_custom.<locals>.<listcomp>cs$g|]}t|�r|��|�f�qSr,)r)rHr�)r�r�r,r-rI{s)rarrrwr�r��setattr)
r�r�rt�propsr`r�rar(r=rEr,)r�r�r�r-r�ds


zConfigurator.configure_customcCs4|j|}t|t�r0d|kr0|�|�|j|<}|S)Nz())r�rnr�r�)r�ryr(r,r,r-�__getitem__�s
zConfigurator.__getitem__c	CsFtj�|�stj�|j|�}tj|ddd��}t�|�}WdQRX|S)z*Default converter for the inc:// protocol.rBzutf-8)r�N)	rZr[�isabsr$rcr�r�r�r�)r�r�r�r(r,r,r-r��s
zConfigurator.inc_convert)N)r�r�r�r�rZvalue_convertersr�r�r�r��
__classcell__r,r,)r�r-r�[s
r�c@s*eZdZdZd
dd�Zdd�Zdd	�ZdS)�SubprocessMixinzC
    Mixin for running subprocesses and capturing their output
    FNcCs||_||_dS)N)�verbose�progress)r�r�r�r,r,r-r��szSubprocessMixin.__init__cCsn|j}|j}xT|��}|sP|dk	r0|||�q|sBtj�d�ntj�|�d��tj��qW|��dS)z�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        Nrzutf-8)	r�r��readlinerj�stderrr�r��flushr�)r�r�r�r�r�r+r,r,r-rH�szSubprocessMixin.readercKs�tj|ftjtjd�|��}tj|j|jdfd�}|��tj|j|jdfd�}|��|�	�|�
�|�
�|jdk	r�|�dd�n|jr�t
j�d�|S)N)�stdoutrr)r�r`rzdone.�mainzdone.
)�
subprocess�Popen�PIPE�	threading�ThreadrHrr8r�waitr$r�r�rjr�)r��cmdrarsZt1Zt2r,r,r-�run_command�s
zSubprocessMixin.run_command)FN)r�r�r�rVr�rHrr,r,r,r-r��s
r�cCst�dd|���S)z,Normalize a python package name a la PEP 503z[-_.]+r6)r9�subrp)rJr,r,r-�normalize_name�src@s.eZdZdZdZd
dd�Zdd�Zdd	�ZdS)�
PyPIRCFilezhttps://upload.pypi.org/legacy/�pypiNcCs.|dkrtj�tj�d�d�}||_||_dS)Nrz.pypirc)rZr[r$r"r<rL)r�rTrLr,r,r-r��szPyPIRCFile.__init__c
Cs�i}tj�|j��r�|jp|j}t��}|�|j�|�	�}d|k�r2|�
dd�}dd�|�d�D�}|gkr~d|kr|dg}n�x�|D]�}d|i}|�
|d�|d<xHd	|jfd
|jfdfD].\}}	|�
||�r�|�
||�||<q�|	||<q�W|dk�r||jdfk�r|j|d	<q�|d|kr�|d	|kr�i}q�WnRd|k�r�d}|�
|d	��r\|�
|d	�}n|j}|�
|d�|�
|d
�|||jd�}|S)N�	distutilsz
index-serverscSs g|]}|��dkr|���qS)r)rM)rH�serverr,r,r-rI�sz#PyPIRCFile.read.<locals>.<listcomp>r�rrr,�
repository�realm)r-Nzserver-loginr-)r,r-rrr)rZr[r�r<rL�DEFAULT_REPOSITORYr�RawConfigParserr�r�rDrv�
DEFAULT_REALM�
has_option)
r�r(rr�r��
index_servers�_serversrryrrr,r,r-r��sN








zPyPIRCFile.readc	Cslt��}|j}|�|�|�d�s,|�d�|�dd|�|�dd|�t|d��}|�|�WdQRXdS)Nrr,r-r�)	rrr<r��has_sectionr�r�r�r�)r�r,r-r�rTr�r,r,r-r�s


zPyPIRCFile.update)NN)r�r�r�rrr�r�r�r,r,r,r-r�s

:rcCst|jd���S)zG
    Read the PyPI access configuration as supported by distutils.
    )rL)rrLr�)ryr,r,r-�_load_pypirc srcCst��|j|j�dS)N)rr�r,r-)ryr,r,r-�
_store_pypirc&srcCs�tjdkrFdtj��krdSdtj��kr.dSdtj��kr@dStjSdtjkrZtjdStjd	ksnttd
�sttjSt��\}}}}}|���	dd�}|�	d
d��	dd�}|dd�dkr�d||fS|dd�dk�r(|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rLdd lm
}|�S|dd!�d"k�r�d"}t�d#tj�}|�|�}|�r�|��}n>|dd!�d$k�r�ddl}	ddl}
|	�|
j��|||�\}}}d%|||fS)&a�Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    r�amd64z	win-amd64z(arm)z	win-arm32z(arm64)z	win-arm64�_PYTHON_HOST_PLATFORMr��unamerYrr5rWr6N��linuxz%s-%s�sunosr�5�solarisz%d.%sr{��32bit�64bit)i���l����z.%s�aix)�aix_platform��cygwinz[\d.]+�darwinz%s-%s-%s)rZrJrjrNrp�platformr rir r!�int�maxsizeZ_aix_supportr*r9r��ASCIIrr��_osx_support�distutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�osnamer��releaserN�machine�bitnessr*�rel_rer'r2rr,r,r-�get_host_platform.sL


 


r<�win32z	win-amd64z	win-arm32)Zx86Zx64ZarmcCs2tjdkrt�Stj�d�}|tkr*t�St|S)NrZVSCMD_ARG_TGT_ARCH)rZrJr<r rD�_TARGET_TO_PLAT)Zcross_compilation_targetr,r,r-�get_platform�s
r?)NN)r�)N)N)NT)�r��collectionsr�
contextlibr�Zglobrr�r�r��loggingrZr�r9r�r��ImportErrorrrjr�r�r�rZdummy_threadingr�rr�compatrrrr	r
rrr
rrrrrrrrrrrrr�	getLoggerr�r�r�rrCrBr4r;r8rPr#r<rXrgrlrorurzr�r��contextmanagerr�r�r�r�r�r�r�rr�VERBOSErr�r&r(r*r.r1r4�Ir;r7r>r?r@rCrJrLrMrOrPrWrcZARCHIVE_EXTENSIONSr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr<r>r?r,r,r,r-�<module>s�
\








Y}

	/
	8

)



,H
6]


!)7.QR

?>