ok

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/setuptools/command/
Upload File :
Current File : //usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyo

�
b-�Qc@sxdZddlZddlZddlZddlmZddlTddlmZddl	m
Z
ddlmZddl
mZdd	lmZdd
lmZmZmZmZmZmZmZmZddl	mZdefd
��YZdefd��YZde
fd��YZd�Zd�Zd�Z d�Z!d�Z"d�Z#e$d�Z%d�Z&d�Z'dS(sUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contentsi����N(tCommand(t*(tlog(tsdist(t
basestring(tconvert_path(tFileList(tparse_requirementst	safe_namet
parse_versiontsafe_versiontyield_linest
EntryPointtiter_entry_pointstto_filename(twalk_revctrltegg_infocBs�eZdZdd d!d"d#d$gZddgZidd
6dd6Zd�Zd�Zd�Ze	d�Z
d�Zd�Zd�Z
d�Zd�Zed��Zd�Zd�ZRS(%s+create a distribution's .egg-info directorys	egg-base=tesLdirectory containing .egg-info directories (default: top of the source tree)stag-svn-revisiontrs,Add subversion revision ID to version numberstag-datetds0Add date stamp (e.g. 20050528) to version numbers
tag-build=tbs-Specify explicit tag to add to version numbersno-svn-revisiontRs*Don't add subversion revision ID [default]sno-datetDs"Don't include date stamp [default]cCsUd|_d|_d|_d|_d|_d|_d|_t|_	d|_
dS(Ni(tNonetegg_nametegg_versiontegg_baseRt	tag_buildttag_svn_revisionttag_datetFalsetbroken_egg_infotvtags(tself((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytinitialize_options+s								cCsCddlm}||iidd6dd6|j�d6d6�dS(Ni����(tedit_configiRRRR(tsetuptools.command.setoptR#ttags(R!tfilenameR#((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytsave_version_info6s
cCs�t|jj��|_|j�|_|j�|_y$tt	d|j|jf��Wn-t
k
r�td|j|jf��nX|jdkr�|jj}|p�ijdtj�|_n|jd�t|j�d|_|jtjkrtjj|j|j�|_nd|jkr8|j�n|j|jj_|jj}|dk	r�|j|jj�kr�|j|_t|j�|_d|j_ndS(Ns%s==%ss2Invalid distribution name or version syntax: %s-%stRs	.egg-infot-( Rtdistributiontget_nameRR%R ttagged_versionRtlistRt
ValueErrortDistutilsOptionErrorRRtpackage_dirtgettostcurdirtensure_dirnameRRtpathtjointcheck_broken_egg_infotmetadatatversiont
_patched_disttkeytlowert_versionR	t_parsed_version(R!tdirstpd((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytfinalize_optionsTs2!
!
!
$cCsl|r|j|||�nLtjj|�rh|dkrX|rXtjd||�dS|j|�ndS(s�Write `data` to `filename` or delete if empty

        If `data` is non-empty, this routine is the same as ``write_file()``.
        If `data` is empty but not ``None``, this is the same as calling
        ``delete_file(filename)`.  If `data` is ``None``, then this is a no-op
        unless `filename` exists, in which case a warning is issued about the
        orphaned file (if `force` is false), or deleted (if `force` is true).
        s$%s not set in setup(), but %s existsN(t
write_fileR2R5texistsRRtwarntdelete_file(R!twhatR&tdatatforce((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_or_delete_file}s	
cCsjtjd||�tjdkr4|jd�}n|jsft|d�}|j|�|j�ndS(s�Write `data` to `filename` (if not a dry run) after announcing it

        `what` is used in a log message to identify what is being written
        to the file.
        swriting %s to %sisutf-8twbN(i(	Rtinfotsystversion_infotencodetdry_runtopentwritetclose(R!RFR&RGtf((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRB�s	
cCs-tjd|�|js)tj|�ndS(s8Delete `filename` (if not a dry run) after announcing itsdeleting %sN(RRKROR2tunlink(R!R&((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRE�s	cCsE|jj�}|jr4|j|j�r4t|�St||j�S(N(R*tget_versionR tendswithR
(R!R9((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR,�s
cCs�|j|j�|jj}xNtd�D]@}|jd|�}|||jtjj	|j|j��q)Wtjj	|jd�}tjj
|�r�|j|�n|j�dS(Nsegg_info.writerst	installersnative_libs.txt(
tmkpathRR*tfetch_build_eggR
tloadtnameR2R5R6RCREtfind_sources(R!RWteptwritertnl((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytrun�s,cCs�d}|jr||j7}n|jrctjjd�sLtjjd�rc|d|j�7}n|jr�ddl}||jd�7}n|S(NR(s.svnsPKG-INFOs-r%si����s-%Y%m%d(	RRR2R5RCtget_svn_revisionRttimetstrftime(R!R9Rb((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR%�s		$	cCs?d}tjd�}tjd�}xtjtj�D]�\}}}d|kr_g|(q7n|jd�ttjj|dd��}|j	�}|j
�|jd�r|j|�j
d�}tg|j|�D]}	t|	j
d��^q�dg�}
n�yt|j�d�}Wn
d}nX|d	kr[tjd
|�g|(q7ntttj|jd���}|dd=|dd}tg|D]2}t|�d
kr�|d
r�t|d
�^q�dg�}
|tjkr�|d}
n|j|
�sg|(q7nt||
�}q7Wt|p;t��S(Nis
url="([^"]+)"scommitted-rev="(\d+)"s.svntentriess<?xmlii����is-unrecognized .svn/entries format; skipping %ss

ii	t/(tretcompileR2twalkR3tremoveRPR5R6treadRRt
startswithtsearchtgrouptmaxtfinditertintt
splitlinesRRDR-tmaptstrtsplittlentget_pkg_info_revision(trevisionturlretrevretbaseR?tfilesRSRGtdirurltmtlocalrevtsvnverRtbase_url((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRa�sB"

A
!L
cCsJtjj|jd�}t|j�}||_|j�|j|_dS(s"Generate SOURCES.txt manifest filesSOURCES.txtN(	R2R5R6Rtmanifest_makerR*tmanifestR`tfilelist(R!tmanifest_filenametmm((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR\s
	
cCs�|jd}|jtjkr:tjj|j|�}ntjj|�r�tjddddd||j	�|j	|_
||_	ndS(Ns	.egg-infoR)iNs�
Note: Your current .egg-info directory has a '-' in its name;
this will not work correctly with "setup.py develop".

Please rename %s to %s to correct this problem.
(RRR2R3R5R6RCRRDRR(R!tbei((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR7s

(s	egg-base=RsLdirectory containing .egg-info directories (default: top of the source tree)(stag-svn-revisionRs,Add subversion revision ID to version number(stag-dateRs0Add date stamp (e.g. 20050528) to version number(s
tag-build=Rs-Specify explicit tag to add to version number(sno-svn-revisionRs*Don't add subversion revision ID [default](sno-dateRs"Don't include date stamp [default](t__name__t
__module__tdescriptiontuser_optionstboolean_optionstnegative_optR"R'RARRIRBRER,R`R%tstaticmethodRaR\R7(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRs0	

			)					*	RcBseZdZd�ZRS(s@File list that accepts only existing, platform-independent pathscCs|jd�r|d }nt|�}tjdkr�yDtjj|�sgtjj|jd��rz|jj	|�nWq�t
k
r�tjj|jd��r�|jj	|�q�tjd|tj
��q�Xn%tjj|�r�|jj	|�ndS(Ns
i����isutf-8s!'%s' not %s encodable -- skipping(i(RVRRLRMR2R5RCRNR{tappendtUnicodeEncodeErrorRRDtgetfilesystemencoding(R!titemR5((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�s
-
(R�R�t__doc__R�(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRsR�cBsMeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(sMANIFEST.incCs(d|_d|_d|_d|_dS(Ni(tuse_defaultstprunet
manifest_onlytforce_manifest(R!((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR"9s			cCsdS(N((R!((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRA?scCs�t�|_tjj|j�s.|j�n|jj�|j�tjj|j	�rg|j
�n|j�|jj�|jj
�|j�dS(N(RR�R2R5RCR�twrite_manifesttfindalltadd_defaultsttemplatet
read_templatetprune_file_listtsorttremove_duplicates(R!((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR`Bs






cCs�tjdkr~g}xW|jjD]I}y|jd�Wn"tk
r]tjd|�q"X|j|�q"W||j_n|jj}t	j
dkr�g|D]}|jt	j
d�^q�}n|jt
|j|fd|j�dS(s�Write the file list in 'self.filelist' (presumably as filled in
        by 'add_defaults()' and 'read_template()') to the manifest file
        named by 'self.manifest'.
        isutf-8s$'%s' not UTF-8 encodable -- skippingReswriting manifest file '%s'N(i(RLRMR�R{RNR�RRDR�R2tseptreplacetexecuteRBR�(R!R{tfileRS((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�Os
+cCs&|jd�s"tj||�ndS(Nsstandard file not found:(RkRRD(R!tmsg((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRDfscCs�tj|�|jj|j�|jj|j�tt��}|r[|jj|�n"t	j
j|j�r}|j�n|j
d�}|jjdd|j�dS(NRRtprefix(RR�R�R�R�R�R-RtextendR2R5RCt
read_manifesttget_finalized_commandtinclude_patternR(R!trcfilestei_cmd((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�js

cCs�|jd�}|jj�}|jjdd|j�|jjdd|�tjt	j
�}|jj|d|dd�dS(NtbuildR�s(RCS|CVS|\.svn)tis_regexi(R�R*tget_fullnameR�texclude_patternRt
build_baseRftescapeR2R�(R!R�tbase_dirR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�vs(
R�R�R�R"RAR`R�RDR�R�(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�5s			
			cCsZdj|�}tjdkr0|jd�}nt|d�}|j|�|j�dS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    s
isutf-8RJN(i(R6RLRMRNRPRQRR(R&tcontentsRS((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRBs
cCs�tjd|�|js�|jj}|j|j|_}|j|j|_}z|j	|j
�Wd|||_|_Xt|jdd�}ddl
m}|j|j
|�ndS(Ns
writing %stzip_safei����(t	bdist_egg(RRKROR*R8RR9RR[twrite_pkg_infoRtgetattrRtsetuptools.commandR�twrite_safety_flag(tcmdtbasenameR&R8toldvertoldnametsafeR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s	cCs&tjj|�r"tjd�ndS(NssWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.(R2R5RCRRD(R�R�R&((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwarn_depends_obsolete�sc	Cs�|j}djt|jpd��g}xI|jp9ij�D]2\}}|jd|djt|��f�q@W|jd|dj|��dS(Ns
s	

[%s]
%strequirementsR(((R*R6Rtinstall_requirestextras_requiretitemsR�RI(R�R�R&tdistRGtextratreqs((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_requirements�s
	!"*cCs_tjg|jj�D]}|jdd�d^q�}|jd|dj|�d�dS(Nt.iistop-level namess
(tdicttfromkeysR*titer_distribution_namesRtRBR6(R�R�R&tktpkgs((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_toplevel_names�s2cCst|||t�dS(N(t	write_argtTrue(R�R�R&((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt
overwrite_arg�scCsgtjj|�d}t|j|d�}|dk	rMdj|�d}n|j||||�dS(Nis
(R2R5tsplitextR�R*RR6RI(R�R�R&RHtargnametvalue((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s
cCs�|jj}t|t�s'|dkr0|}n�|dk	r�g}xs|j�D]e\}}t|t�s�tj||�}djt	t
|j���}n|jd||f�qOWdj|�}n|j
d||t�dS(Ns
s	[%s]
%s

R(sentry points(R*tentry_pointst
isinstanceRRR�Rtparse_groupR6RrRstvaluesR�RIR�(R�R�R&R]RGtsectionR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt
write_entries�s	!cCsntjjd�rjtdd�}x9|D]1}tjd|�}|r(t|jd��Sq(W|j�ndS(NsPKG-INFOtrUsVersion:.*-r(\d+)\s*$ii(	R2R5RCRPRftmatchRpRmRR(RStlineR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRv�s

((R�R2RfRLt
setuptoolsRtdistutils.errorst	distutilsRtsetuptools.command.sdistRtsetuptools.compatRtdistutils.utilRtdistutils.filelistRt	_FileListt
pkg_resourcesRRR	R
RRR
RRRR�RBR�R�R�R�R�RR�R�Rv(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt<module>s.$
:�J					
		

Zerion Mini Shell 1.0