Your IP : 216.73.217.152


Current Path : /opt/alt/python33/lib/python3.3/site-packages/wheel/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/wheel/__pycache__/wininst2wheel.cpython-33.pyc

�
��]c@sddlZddlZddlZddlZddlZddlZddlZ	ddl
mZddlm
Z
ddlmZddlmZddlmZejdej�Zdd	�Zejjd
d�Zdd
�Zedkr�e�ndS(iN(umake_archive(urmtree(uarchive_wheelfile(uArgumentParser(uiglobuX(^|/)(?P<name>[^/]+?)-(?P<ver>.+?)
    (-(?P<pyver>.+?))?(-(?P<arch>.+?))?.egg-info(/|$)c

CsFd}|r:tj|�}|s:td|f��q:n|jd�\}}}|sntd|f��n|dd�}|jd�\}}}|r�|jd�r�|}|jdd�}nd	}|jd�\}}}	|std|f��n|r'|jd
�}|jd�}nt	d
|d|d|	d
|�S(uxExtract metadata from filenames.
    
    Extracts the 4 metadataitems needed (name, version, pyversion, arch) from
    the installer filename and the name of the egg-info directory embedded in
    the zipfile (if any).

    The egginfo filename has the format::

        name-ver(-pyver)(-arch).egg-info

    The installer filename has the format::

        name-ver.arch(-pyver).exe

    Some things to note:

    1. The installer filename is not definitive. An installer can be renamed
       and work perfectly well as an installer. So more reliable data should
       be used whenever possible.
    2. The egg-info data should be preferred for the name and version, because
       these come straight from the distutils metadata, and are mandatory.
    3. The pyver from the egg-info data should be ignored, as it is
       constructed from the version of Python used to build the installer,
       which is irrelevant - the installer filename is correct here (even to
       the point that when it's not there, any version is implied).
    4. The architecture must be taken from the installer filename, as it is
       not included in the egg-info data.
    5. Architecture-neutral installers still have an architecture because the
       installer format itself (being executable) is architecture-specific. We
       should therefore ignore the architecture if the content is pure-python.
    u!Egg info filename %s is not validu-u"Installer filename %s is not validNiupyu.uupy2.py3unameuveruarchupyveri����(
uNoneuegg_info_reusearchu
ValueErroru	partitionu
rpartitionu
startswithureplaceugroupudict(
uwininfo_nameuegginfo_nameuegginfouw_nameusepuresturest2uw_pyveruw_veruw_arch((uD/opt/alt/python33/lib/python3.3/site-packages/wheel/wininst2wheel.pyu
parse_infos0!u
parse_infocCs+tj|�}d}x*|j�D]}d|kr"|}Pq"q"Wttjj|�|�}d}x0|j	�D]"}|j
jd�rpd}PqpqpW|r�idd6}n
idd6}d|}	d|	}
g}d}x|j	�D]�}|j
j
dd	�\}}
|j�}|j|d�}|dkrH|
|j�d}n|j
}||
}||_
|j|=||j|<|r�|j|�n|s�|jd�r�|}q�d
|kr�|jd�\}}}q�q�q�Wtjdd�}|j||�d
}|d}|dpdjdd�jdd�}|rFd}n|dkrg|jdd�}ndj|	|||f�}tjjtjj��}||_tjj|d|	�}|jtjj||�|�|j |dd�|j!||�t"tjj||�|�t#|�dS(Nu	.egg-infouPLATLIBuupurelibuplatlibu%(name)s-%(ver)su%s.data/u/iu
.egg-info/usuffixu_b2wunoneupyveruarchuanyu.u_u-upyucpu%s.dist-infou	generatoru
wininst2wheelTF($uzipfileuZipFileuNoneunamelistu
parse_infouosupathubasenameuTrueuinfolistufilenameu
startswithuFalseusplitulowerugetu
NameToInfouappenduendswithu
rpartitionutempfileumkdtempu
extractallureplaceujoinuwheelubdist_wheelu	distutilsudistuDistributionuroot_is_purelibuegg2distuwrite_wheelfileuwrite_recorduarchive_wheelfileurmtree(upathudest_dirubdwuegginfo_nameufilenameuinfouroot_is_purelibuzipinfoupathsu	dist_infoudatadirumembersukeyubasenameubasepathuoldnameunewnameusepu_udiruabiupyveruarchu
wheel_nameubwu
dist_info_dir((uD/opt/alt/python33/lib/python3.3/site-packages/wheel/wininst2wheel.pyubdist_wininst2wheelYsv


	
	

	"
(		ubdist_wininst2wheelcCs�t�}|jddddd�|jdddtjjdd	�|jd
ddd
�|j�}xy|jD]n}xet|�D]W}|jr�t	j
jdj|��nt
||j�|jr�t	j
jd�q�q�WqpWdS(Nu
installersunargsu*uhelpuInstallers to convertu
--dest-diru-dudefaultu/Directory to store wheels (default %(default)s)u	--verboseu-vuactionu
store_trueu{0}... uOK
(uArgumentParseruadd_argumentuosupathucurdiru
parse_argsu
installersuiglobuverboseusysustdoutuwriteuformatubdist_wininst2wheeludest_dir(uparseruargsupatu	installer((uD/opt/alt/python33/lib/python3.3/site-packages/wheel/wininst2wheel.pyumain�s			umainu__main__(uos.pathuosureusysutempfileuzipfileuwheel.bdist_wheeluwheeludistutils.distu	distutilsudistutils.archive_utilumake_archiveushutilurmtreeu
wheel.archiveuarchive_wheelfileuargparseuArgumentParseruglobuiglobucompileuVERBOSEuegg_info_reu
parse_infoupathucurdirubdist_wininst2wheelumainu__name__(((uD/opt/alt/python33/lib/python3.3/site-packages/wheel/wininst2wheel.pyu<module>s$HQ