Your IP : 13.59.35.116


Current Path : /opt/alt/python36/lib/python3.6/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/setuptools/__pycache__/wheel.cpython-36.pyc

3

K�ReA�@s�dZddlmZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZddlm
Z
ddlm	ZddlmZddlmZejd	ej�jZd
Zdd�ZGd
d�de�ZdS)zWheels support.�)�get_platformN)�Distribution�PathMetadata�
parse_version)�PY3)r)�
pep425tags)�write_requirementsz�^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$z�try:
    __import__('pkg_resources').declare_namespace(__name__)
except ImportError:
    __path__ = __import__('pkgutil').extend_path(__path__, __name__)
cCs�x�tj|�D]�\}}}tjj||�}x6|D].}tjj||�}tjj|||�}tj||�q*WxXttt|���D]D\}	}
tjj||
�}tjj|||
�}tjj	|�sntj||�||	=qnWqWx0tj|dd�D]\}}}|s�t
�tj|�q�WdS)zDMove everything under `src_dir` to `dst_dir`, and delete the former.T)�topdownN)�os�walk�path�relpath�join�renames�reversed�list�	enumerate�exists�AssertionError�rmdir)�src_dirZdst_dir�dirpath�dirnames�	filenames�subdir�f�src�dst�n�d�r ��/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/wheel.py�unpacks

r"c@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�WheelcCsTttjj|��}|dkr$td|��||_x$|j�j�D]\}}t|||�q8WdS)Nzinvalid wheel name: %r)	�
WHEEL_NAMEr
r�basename�
ValueError�filename�	groupdict�items�setattr)�selfr'�match�k�vr r r!�__init__7szWheel.__init__cCs&tj|jjd�|jjd�|jjd��S)z>List tags (py_version, abi, platform) supported by this wheel.�.)�	itertools�product�
py_version�split�abi�platform)r+r r r!�tags?s
z
Wheel.tagscs$tj��t�fdd�|j�D�d�S)z5Is the wheel is compatible with the current platform?c3s|]}|�krdVqdS)TNr )�.0�t)�supported_tagsr r!�	<genexpr>Hsz&Wheel.is_compatible.<locals>.<genexpr>F)r�
get_supported�nextr7)r+r )r:r!�
is_compatibleEszWheel.is_compatiblecCs*t|j|j|jdkrdnt�d�j�dS)N�any)�project_name�versionr6z.egg)rr@rAr6r�egg_name)r+r r r!rBJszWheel.egg_namecstj|j����d|j|jf}d|�d|���fdd�}|d�}|d�}t|jd��}td	�|kovtd
�kns�td|��tj	|��j
|�tjj|���t
j|�t|��d��d
d��ttt��j��������fdd��jD�}tjj|d�}tj�|�tjtjj|d�tjj|d��tt�|d�d�}	t|	jd�dtjj|d��tjj|���tjj�d�}
tjj|
��rtjj|dd�}tj	|�xVtj|
�D]H}|jd��r�tjtjj|
|��n tjtjj|
|�tjj||���q�Wtj|
�x0ttjj�fdd�d$D��D]}
t |
|��q"Wtjj���rNtj��tjj|d �}tjj|��r�t!|��}|j"�j#�}WdQRXxr|D]j}tjj|f|j#d!���}tjj|d"�}tjj|��r�tjj|��r�t!|d#��}|j$t%�WdQRX�q�WWdQRXdS)%z"Install wheel as an egg directory.z%s-%sz%s.dist-infoz%s.datac	sH�jd�|f��,}tr&|j�jd�n|j�}tjj�j|�SQRXdS)Nz%s/%szutf-8)�openr�read�decode�email�parser�Parser�parsestr)�name�fp�value)�	dist_info�zfr r!�get_metadataVsz*Wheel.install_as_egg.<locals>.get_metadataZWHEEL�METADATAz
Wheel-Versionz1.0z2.0dev0z$unsupported wheel format version: %s)�metadatacSsd|_t|�S)N)�marker�str)�reqr r r!�raw_reqlsz%Wheel.install_as_egg.<locals>.raw_reqc	s6i|].}tt�fdd�t��j|f��D���|�qS)c3s|]}|�kr|VqdS)Nr )r8rT)�install_requiresr r!r;rsz2Wheel.install_as_egg.<locals>.<dictcomp>.<genexpr>)r�sorted�map�requires)r8�extra)�distrVrUr r!�
<dictcomp>psz(Wheel.install_as_egg.<locals>.<dictcomp>zEGG-INFOzPKG-INFO)rV�extras_require)�attrs�egg_infoNzrequires.txt�scriptsz.pycc3s|]}tjj�|�VqdS)N)r
rr)r8r)�	dist_datar r!r;�sz'Wheel.install_as_egg.<locals>.<genexpr>�data�headers�purelib�platlibznamespace_packages.txtr0z__init__.py�w)rbrcrdre)&�zipfile�ZipFiler'r@rAr�getr&r
�mkdir�
extractallrrr�
from_locationrrrWrXrY�extras�rename�SetuptoolsDistribution�dictr�get_command_objr�listdir�endswith�unlinkr�filterr"rCrDr4�write�NAMESPACE_PACKAGE_INIT)r+Zdestination_eggdirZ
dist_basenamerO�wheel_metadataZ
dist_metadata�
wheel_versionr]r_Z
setup_distZdist_data_scriptsZegg_info_scripts�entryrZnamespace_packagesrK�modZmod_dirZmod_initr )r[rarMrVrUrNr!�install_as_eggPsr 










zWheel.install_as_eggN)�__name__�
__module__�__qualname__r/r7r>rBr|r r r r!r#5s
r#)�__doc__�distutils.utilrrFr1r
�rerg�
pkg_resourcesrrrZpkg_resources.extern.sixr�
setuptoolsrorZsetuptools.command.egg_infor�compile�VERBOSEr,r$rwr"�objectr#r r r r!�<module>s"


?>