[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.223.102.148: ~ $


�t�_��@s�dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
mZdd	lmZdd
lmZddlmZer�ddlmZdd
lmZmZddl
mZe
r�ddlmZnddlmZd"Zeje�Z Gdd�de�Z!dd�Z"dd�Z#dd�Z$dd�Z%dd�Z&dd�Z'd d!�Z(dS)#z0Support functions for working with wheel files.
�)�absolute_importN)�Parser)�ZipFile)�canonicalize_name)�DistInfoDistribution)�PY2�
ensure_str)�UnsupportedWheel)�DictMetadata)�MYPY_CHECK_RUNNING)�Message)�Dict�Tuple)�Distribution)�
BadZipfile)�
BadZipFile�cs:eZdZdZ�fdd�Z�fdd�Z�S)�
WheelMetadatazaMetadata provider that maps metadata decoding exceptions to our
    internal exception type.
    cs#tt|�j|�||_dS)N)�superr�__init__�_wheel_name)�self�metadata�
wheel_name)�	__class__���/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/wheel.pyr(szWheelMetadata.__init__csaytt|�j|�SWn@tk
r\}z tdj|j|���WYdd}~XnXdS)Nz"Error decoding metadata for {}: {})rr�get_metadata�UnicodeDecodeErrorr	�formatr)r�name�e)rrrr-szWheelMetadata.get_metadata)�__name__�
__module__�__qualname__�__doc__rrrr)rrr$srcs�t||�\�}�fdd�|j�D�}i}x�|D]�}t|�}|jdd�\}}yt||�||<WqAtk
r�}	z#tdj|t|	����WYdd}	~	XqAXqAWt||�}
t	d|d|
d	|�S)
zaGet a pkg_resources distribution given a wheel.

    :raises UnsupportedWheel: on any errors
    cs.g|]$}|jdj���r|�qS)z{}/)�
startswithr)�.0�p)�info_dirrr�
<listcomp>Cs	z8pkg_resources_distribution_for_wheel.<locals>.<listcomp>�/rz{} has an invalid wheel, {}N�locationr�project_name)
�parse_wheel�namelistr�split�read_wheel_metadata_filer	r�strrr)�	wheel_zipr r,�_�metadata_files�
metadata_text�path�	full_path�
metadata_namer!rr)r)r�$pkg_resources_distribution_for_wheel:s
2r:cCs�y.t||�}t||�}t|�}WnCtk
rs}z#tdj|t|����WYdd}~XnXt||�||fS)z�Extract information from the provided wheel, ensuring it meets basic
    standards.

    Returns the name of the .dist-info directory and the parsed WHEEL metadata.
    z{} has an invalid wheel, {}N)�wheel_dist_info_dir�wheel_metadata�
wheel_versionr	rr2�check_compatibility)r3r r)r�versionr!rrrr._s.
r.cCs�tdd�|j�D��}dd�|D�}|sDtd��t|�dkrttdjdj|����|d	}t|�}t|�}|j|�s�td
j||���t|�S)z�Returns the name of the contained .dist-info directory.

    Raises AssertionError or UnsupportedWheel if not found, >1 found, or
    it doesn't match the provided name.
    css%|]}|jdd�dVqdS)r+rrN)r0)r'r(rrr�	<genexpr>|sz&wheel_dist_info_dir.<locals>.<genexpr>cSs%g|]}|jd�r|�qS)z
.dist-info)�endswith)r'�srrrr*~s	z'wheel_dist_info_dir.<locals>.<listcomp>z.dist-info directory not foundrz)multiple .dist-info directories found: {}z, rz2.dist-info directory {!r} does not start with {!r})	�setr/r	�lenr�joinrr&r)�sourcer �subdirs�	info_dirsr)�
info_dir_name�canonical_namerrrr;ts 
r;cCs^y|j|�SWnFtttfk
rY}ztdj||���WYdd}~XnXdS)Nzcould not read {!r} file: {!r})�readr�KeyError�RuntimeErrorr	r)rFr7r!rrrr1�s
r1cCs~dj|�}t||�}yt|�}Wn=tk
rm}ztdj||���WYdd}~XnXt�j|�S)ziReturn the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    z{}/WHEELzerror decoding {!r}: {!r}N)rr1rrr	r�parsestr)rF�
dist_info_dirr7�wheel_contents�
wheel_textr!rrrr<�s+r<cCs||d}|dkr"td��|j�}y ttt|jd���SWn'tk
rwtdj|���YnXdS)zbGiven WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    z
Wheel-VersionNzWHEEL is missing Wheel-Version�.zinvalid Wheel-Version: {!r})r	�strip�tuple�map�intr0�
ValueErrorr)�
wheel_data�version_textr?rrrr=�s
 
r=cCss|dtdkrAtdj|djtt|�����n.|tkrotjddjtt|���dS)a�Raises errors or warns if called with an incompatible Wheel-Version.

    pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    rzB{}'s Wheel-Version ({}) is not compatible with this version of piprRz*Installing from a newer Wheel-Version (%s)N)�VERSION_COMPATIBLEr	rrErUr2�logger�warning)r?r rrrr>�s
$r>)rr))r%�
__future__r�logging�email.parserr�zipfilerZpip._vendor.packaging.utilsrZpip._vendor.pkg_resourcesrZpip._vendor.sixrr�pip._internal.exceptionsr	�!pip._internal.utils.pkg_resourcesr
�pip._internal.utils.typingr�
email.messager�typingr
rrrrrZ�	getLoggerr"r[rr:r.r;r1r<r=r>rrrr�<module>s6%&

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.pyc File 222 B 0644
appdirs.cpython-35.pyc File 1.47 KB 0644
compat.cpython-35.pyc File 7.12 KB 0644
compatibility_tags.cpython-35.pyc File 3.78 KB 0644
datetime.cpython-35.pyc File 567 B 0644
deprecation.cpython-35.pyc File 2.93 KB 0644
direct_url_helpers.cpython-35.pyc File 2.91 KB 0644
distutils_args.cpython-35.pyc File 1.29 KB 0644
encoding.cpython-35.pyc File 1.45 KB 0644
entrypoints.cpython-35.pyc File 1.38 KB 0644
filesystem.cpython-35.pyc File 5.92 KB 0644
filetypes.cpython-35.pyc File 699 B 0644
glibc.cpython-35.pyc File 1.82 KB 0644
hashes.cpython-35.pyc File 4.8 KB 0644
inject_securetransport.cpython-35.pyc File 1.01 KB 0644
logging.cpython-35.pyc File 9.65 KB 0644
misc.cpython-35.pyc File 26.17 KB 0644
models.cpython-35.pyc File 2.06 KB 0644
packaging.cpython-35.pyc File 2.78 KB 0644
parallel.cpython-35.pyc File 3.21 KB 0644
pkg_resources.cpython-35.pyc File 1.91 KB 0644
setuptools_build.cpython-35.pyc File 3.14 KB 0644
subprocess.cpython-35.pyc File 5.95 KB 0644
temp_dir.cpython-35.pyc File 7.38 KB 0644
typing.cpython-35.pyc File 1.48 KB 0644
unpacking.cpython-35.pyc File 6.91 KB 0644
urls.cpython-35.pyc File 1.64 KB 0644
virtualenv.cpython-35.pyc File 3.43 KB 0644
wheel.cpython-35.pyc File 6.62 KB 0644