Your IP : 18.191.189.119


Current Path : /lib/python2.7/site-packages/setuptools/
Upload File :
Current File : //lib/python2.7/site-packages/setuptools/wheel.pyc

�
�fc@s�dZddlmZddlZddlZddlZddlZddlZddlm	Z	m
Z
mZddlm
Z
ddlm	ZddlmZddlmZejd	ej�jZd
Zd�Zdefd
��YZdS(sWheels support.i����(tget_platformN(tDistributiontPathMetadatat
parse_version(tPY3(R(t
pep425tags(twrite_requirementss�^(?P<project_name>.+?)-(?P<version>\d.*?)
    ((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
    )\.whl$s�try:
    __import__('pkg_resources').declare_namespace(__name__)
except ImportError:
    __path__ = __import__('pkgutil').extend_path(__path__, __name__)
cCsOxtj|�D]�\}}}tjj||�}xK|D]C}tjj||�}tjj|||�}tj||�q;Wxttt|���D]e\}	}
tjj||
�}tjj|||
�}tjj	|�s�tj||�||	=q�q�WqWx@tj|dt
�D])\}}}|s:t�tj|�qWdS(sDMove everything under `src_dir` to `dst_dir`, and delete the former.ttopdownN(
tostwalktpathtrelpathtjointrenamestreversedtlistt	enumeratetexiststTruetAssertionErrortrmdir(tsrc_dirtdst_dirtdirpathtdirnamest	filenamestsubdirtftsrctdsttntd((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pytunpacks
%%
tWheelcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCswttjj|��}|dkr7td|��n||_x0|j�j�D]\}}t	|||�qSWdS(Nsinvalid wheel name: %r(
t
WHEEL_NAMERR
tbasenametNonet
ValueErrortfilenamet	groupdicttitemstsetattr(tselfR&tmatchtktv((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyt__init__7s	cCs7tj|jjd�|jjd�|jjd��S(s>List tags (py_version, abi, platform) supported by this wheel.t.(t	itertoolstproductt
py_versiontsplittabitplatform(R*((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyttags?scs/tj��t�fd�|j�D�t�S(s5Is the wheel is compatible with the current platform?c3s!|]}|�krtVqdS(N(R(t.0tt(tsupported_tags(s4/usr/lib/python2.7/site-packages/setuptools/wheel.pys	<genexpr>Hs(Rt
get_supportedtnextR6tFalse(R*((R9s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyt
is_compatibleEscCsAtd|jd|jd|jdkr-dnt��j�dS(Ntproject_nametversionR5tanys.egg(RR>R?R5R$Rtegg_name(R*((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyRAJs$cstj|j���d|j|jf}d|�d|���fd�}|d�}|d�}t|jd��}td�|ko�td	�kns�td
|��ntj	|��j
|�tjj|���t
j|�dt|����d��ttt��j��������fd
��jD�}tjj|d�}tj�|�tjtjj|d�tjj|d��tdtd�d|��}	t|	jd�dtjj|d��tjj|���tjj�d�}
tjj|
�r�tjj|dd�}tj	|�xstj|
�D]b}|jd�r�tjtjj|
|��q\tjtjj|
|�tjj||��q\Wtj|
�nx:t tjj�fd�d!D��D]}
t!|
|�q�Wtjj��r1tj��ntjj|d�}tjj|�rt"|��}|j#�j$�}WdQXx�|D]�}tjj||j$d��}tjj|d�}tjj|�r�tjj|�r�t"|d ��}|j%t&�WdQXq�q�WnWdQXdS("s"Install wheel as an egg directory.s%s-%ss%s.dist-infos%s.datacsc�jd�|f��D}tr7|j�jd�n	|j�}tjj�j|�SWdQXdS(Ns%s/%ssutf-8(topenRtreadtdecodetemailtparsertParsertparsestr(tnametfptvalue(t	dist_infotzf(s4/usr/lib/python2.7/site-packages/setuptools/wheel.pytget_metadataVs'tWHEELtMETADATAs
Wheel-Versions1.0s2.0dev0s$unsupported wheel format version: %stmetadatacSsd|_t|�S(N(R$tmarkertstr(treq((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pytraw_reqls	c	sJi|]@}tt�fd�t��j|f��D���|�qS(c3s!|]}|�kr|VqdS(N((R7RT(tinstall_requires(s4/usr/lib/python2.7/site-packages/setuptools/wheel.pys	<genexpr>rs(Rtsortedtmaptrequires(R7textra(tdistRVRU(s4/usr/lib/python2.7/site-packages/setuptools/wheel.pys
<dictcomp>qs	sEGG-INFOsPKG-INFOtattrsRVtextras_requiretegg_infosrequires.txttscriptss.pycc3s$|]}tjj�|�VqdS(N(RR
R(R7R(t	dist_data(s4/usr/lib/python2.7/site-packages/setuptools/wheel.pys	<genexpr>�stdatatheaderstpurelibtplatlibsnamespace_packages.txtNR/s__init__.pytw(RaRbRcRd('tzipfiletZipFileR&R>R?RtgetR%Rtmkdirt
extractallR
RRt
from_locationRRRWRXRYtextrastrenametSetuptoolsDistributiontdictRtget_command_objR$RtlistdirtendswithtunlinkRtfilterR RBRCR3twritetNAMESPACE_PACKAGE_INIT(R*tdestination_eggdirt
dist_basenameRNtwheel_metadatat
dist_metadatat
wheel_versionR]R^t
setup_disttdist_data_scriptstegg_info_scriptstentryRtnamespace_packagesRJtmodtmod_dirtmod_init((R[R`RLRVRURMs4/usr/lib/python2.7/site-packages/setuptools/wheel.pytinstall_as_eggPsr

(

		!


%(t__name__t
__module__R.R6R=RAR�(((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyR!5s
				(t__doc__tdistutils.utilRRER0RtreRft
pkg_resourcesRRRtsetuptools.extern.sixRt
setuptoolsRnRtsetuptools.command.egg_infoRtcompiletVERBOSER+R"RvR tobjectR!(((s4/usr/lib/python2.7/site-packages/setuptools/wheel.pyt<module>s"	

?>