Your IP : 216.73.217.17


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

�
���]c@shdZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZ
ddlmZddlmZdd	lmZddlZd
dlmZmZmZmZd
dlmZd
d
lmZd
dlmZd
dlmZd
dlm Z!ej"Z"ej#Z#dZ$d�Z%d�Z&defd��YZ'dS(sI
Create a wheel (.whl) distribution.

A wheel is a built archive format.
i����N(t	Generator(tCommand(tget_python_version(tlog(tiglob(trmtree(twarni(t
get_abbr_impltget_impl_vertget_abi_tagtget_platform(twrite_pkg_info(tpkginfo_to_metadata(t	WheelFile(t
pep425tags(t__version__scp3\dcCst|�jdd�S(Nt-t_(t	safe_nametreplace(tname((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyt
safer_name#scCst|�jdd�S(NRR(tsafe_versionR(tversion((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyt
safer_version'stbdist_wheelcBs�eZdZd,ddde�fddd	d
fd-d/d0d1d2d3dd.de�dfd4d5gZddddgZd!�Zd"�Z	e
d#��Zd$�Zd%�Z
d&ed'd(�Zd)�Ze
d*��Zd+�ZRS(6screate a wheel distributions
bdist-dir=tbs1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)s	keep-temptks/keep the pseudo-installation tree around after s!creating the distribution archives	dist-dir=tds-directory to put final built distributions ins
skip-builds2skip rebuilding everything (for testing/debugging)trelatives7build the archive using relative paths (default: false)sowner=tus@Owner name used when creating a tar file [default: current user]sgroup=tgsAGroup name used when creating a tar file [default: current group]t	universals'make a universal wheel (default: false)spython-tag=s7Python implementation compatibility tag (default: py%s)is
build-number=sqBuild number for this particular version. As specified in PEP-0427, this must start with a digit. [default: None]spy-limited-api=s?Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)cCs�d|_d|_d|_d|_d|_t|_d|_d|_	d|_
d|_t|_d|_
d|_t|_dt�d|_d|_t|_t|_dS(Ntziptpyi(tNonet	bdist_dirtdata_dirt	plat_nametplat_tagtformattFalset	keep_temptdist_dirtegginfo_dirtroot_is_puret
skip_buildRtownertgroupR!Rt
python_tagtbuild_numbertpy_limited_apitplat_name_supplied(tself((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pytinitialize_optionsUs$																cCsg|jdkr<|jd�j}tjj|d�|_n|jd|_|j	dk	|_
d}|jdt||��|j
j�p�|j
j�|_|jr�tjt|j�r�tdt��n|j
jd�}d|kr1tjd	�|dd
j�}|j�dkr1t|_q1n|jdk	rc|jd
 j�rctd��ndS(Ntbdisttwheels.dataR,R'R/spy-limited-api must match '%s'R!s=The [wheel] section is deprecated. Use [bdist_wheel] instead.it1ttruetyess1Build tag (build-number) must start with a digit.(sdist_dirs	plat_names
skip_build(R:struesyes(R%R$tget_finalized_commandt
bdist_basetostpathtjointwheel_dist_nameR&R'R5tset_undefined_optionsR"tdistributionthas_ext_modulesthas_c_librariesR.R4tretmatchtPY_LIMITED_API_PATTERNt
ValueErrortget_option_dicttloggerRtstriptlowertTrueR!R3tisdigit(R6R>tneed_optionsR9tval((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pytfinalize_optionsis(	
#cCsSt|jj��t|jj��f}|jrF||jf7}ndj|�S(s4Return distribution full name with - replaced with _R(RRDtget_nameRtget_versionR3RA(R6t
components((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyRB�s
	cCs�|jr|j}nH|jr'd}n6|jp6t�}|dkr]tjdkr]d}n|jdd�jdd�}|jr�|jr�d	}n	|j}|d
|f}n�t	�}t
�}||}|jr�||jd�r�|j}d}nt
t��j�}|||f}tjd
|jr7|nd�}|jsv||dksvtd||df��n||ks�tdj|���|S(Ntanyslinux-x86_64tlinux_x86_64i���t
linux_i686RRt.spy2.py3tnonetcp3tabi3tsupplied_platformis%s != %ss)would build wheel with unsupported tag {}(slinux-x86_64slinux_x86_64(R5R'R.R
tsystmaxsizeRR!R2RRR4t
startswithtstrR	RNRt
get_supportedR$tAssertionErrorR)(R6R'timplttagt	impl_nametimpl_vertabi_tagtsupported_tags((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pytget_tag�s6										
				-!cCs|jd�}d|_t|_|jd�}t|_|jsR|jd�n|jddt�}|j|_	t|_
|j|_t|_|jd�}t|_x4dD],}t
|d
|tjj|j|��q�Wd}tjdkr,tjjtjj|jd��}||_|_nt
||jrAdnd|�tjd|j�|jd�|j�\}}}	dj|j|||	�}
|js�|j}n$tjj|j|j|j��}|jdd�djt |j!j"��t#|j!j$���}tjj|j|�}
|j%|j&|
�|j'|
�tjj(|j)�sttj*|j)�ntjj|j)|
d�}t+|d��}|j,|�WdQXt-|j!dg�j.dt/�|f�|j0stjd|j�|j1st2|j�qndS( Nt
build_scriptstpythont	build_exttbuildtinstalltreinit_subcommandstinstall_scriptstheaderstscriptstdatatpurelibtplatlibtinstall_ttnts..tinstall_purelibtinstall_platlibsinstalling to %ss{}-{}-{}-{}tinstall_egg_infottargetR-s{}-{}.dist-infos.whltwt
dist_filesRsremoving %s(sheaderssscriptssdataspurelibsplatlib(stargetsegginfo_dir(3treinitialize_commandt
executableROtforceR*tinplaceR/trun_commandR%troottcompiletwarn_dirtno_eptsetattrR?R@RAR&Rtnormpathtinstall_libbasetinstall_libR.RLtinfoRkR)RBRt_ensure_relativetinstall_baseRCRRDRTRRUtegg2distR-twrite_wheelfiletexistsR,tmakedirsR
twrite_filestgetattrtappendRR+tdry_runR(R6RlRnRpRrtkeytbasedir_observedtimpl_tagRiR(tarchive_basenametarchive_roottdistinfo_dirnametdistinfo_dirt
wheel_pathtwf((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pytrun�sj								
$
		
		s
bdist_wheel (t)c
Cs>ddlm}|�}d|d<||d<t|j�j�|d<|jdk	re|j|d<n|j�\}}}xg|jd�D]V}xM|jd�D]<}	x3|jd�D]"}
d	j	||	|
f�|d
<q�Wq�Wq�Wt
jj	|d�}tj
d|�t|d
�� }t|dd�j|�WdQXdS(Ni����(tMessages1.0s
Wheel-VersionRsRoot-Is-PurelibtBuildRZRtTagtWHEELscreating %sRtmaxheaderleni(t
email.messageR�RbR.RNR3R$RktsplitRAR?R@RLR�topenRtflatten(
R6twheelfile_baset	generatorR�tmsgR�RiR(Retabitplattwheelfile_pathtf((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyR�	s 	

(cCsCtjj|�\}}|dd!tjkr?||d}n|S(Nii(R?R@t
splitdrivetsep(R6R@tdrive((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyR�scCs|jjd�}t�}td�|jdd
�dj�D��}d|krxtdt�|j|dd�nd|kr�d|kr�d}nxf|D]^}xUt	|�D]G}||kr�t
jj|�r�t
jd||�|j|�q�q�Wq�W|S(NtmetadatacSsh|]}|�qS(((t.0toption((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pys	<setcomp>*s	t
license_filesRyitlicense_filesEThe "license_file" option is deprecated. Use "license_files" instead.sLICEN[CS]E*sCOPYING*sNOTICE*sAUTHORS*s/adding license file "%s" (matched pattern "%s")(RyRy(sLICEN[CS]E*sCOPYING*sNOTICE*sAUTHORS*(RDRKtsettsortedtgetR�RtDeprecationWarningtaddRR?R@tisfileRLR�(R6R�tfilestpatternstpatternR@((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyt
license_paths%s 	)	
cCs�d�}||�tjj|�s�ddl}tjjtjj|�d�}|j|�}d|f}|r�tjj|d�}|d|f7}nt|��ntjj|�r�|}	t	||�}
tj
|�n�tjj|d�}	t	||	�}
tj||d	d
��tjj|d�}t
|d��}|j�j�}
WdQX|
ss||�nttjj|d
�|
�xB|jD]7}tjj|�}tj|tjj||��q�W||�dS(s:Convert an .egg-info directory into a .dist-info directorycSsmtjj|�rGtjj|�rGtjj|�rGtj|�n"tjj|�ritj|�ndS(s-Appropriately delete directory, file or link.N(R?R@R�tislinktisdirtshutilRtunlink(R((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pytadios?s7i����Ns
*.egg-infos)Egg metadata expected at %s but not foundis- (%s found - possible misnamed archive file?)sPKG-INFOtignorecSsddddhS(NsPKG-INFOsrequires.txtsSOURCES.txtsnot-zip-safe((txty((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyt<lambda>cs	sdependency_links.txttrtMETADATA(R?R@R�tglobRAtdirnametbasenameRJR�RtmkdirR�tcopytreeR�treadRMRR�tcopy(R6tegginfo_patht
distinfo_pathR�R�tpattpossibleterrtalttpkginfo_pathtpkg_infotdependency_links_pathtdependency_links_filetdependency_linkstlicense_pathtfilename((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyR�=s:	
!


#(s
bdist-dir=Rs1temporary directory for creating the distribution(s	dist-dir=Rs-directory to put final built distributions inN(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(srelativeNs7build the archive using relative paths (default: false)(sowner=Rs@Owner name used when creating a tar file [default: current user](sgroup=R sAGroup name used when creating a tar file [default: current group](s	universalNs'make a universal wheel (default: false)(s
build-number=NsqBuild number for this particular version. As specified in PEP-0427, this must start with a digit. [default: None](spy-limited-api=Ns?Python tag (cp32|cp33|cpNN) for abi3 wheel tag (default: false)(t__name__t
__module__tdescriptionR
R$Rtuser_optionstboolean_optionsR7RStpropertyRBRkR�t
wheel_versionR�R�R�R�(((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyR+sL
					&	R	((t__doc__R?R�R_RGtemail.generatorRtdistutils.coreRtdistutils.sysconfigRt	distutilsRRLR�RRtwarningsRt
pkg_resourcesRRRR	R
tpkginfoRR�Rt	wheelfileR
RyRR�RRRIRRR(((s2/tmp/pip-install-NwWfNs/wheel/wheel/bdist_wheel.pyt<module>s0"