Hacked By AnonymousFox

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

�
�fc@s@dZddlmZddlmZddlmZddlm	Z	ddlZddlZddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&ddl'j(Z(ddl)m*Z*ddlm+Z+d�Z,defd��YZ-defd��YZdefd��YZ.d�Z/d�Z0d�Z1d�Z2d�Z3d�Z4d�Z5d�Z6e7d �Z8d!�Z9d"�Z:dS(#sUsetuptools.command.egg_info

Create a distribution's .egg-info directory and contentsi����(tFileList(tDistutilsInternalError(tconvert_path(tlogN(tsix(tmap(tCommand(tsdist(twalk_revctrl(tedit_config(t	bdist_egg(tparse_requirementst	safe_namet
parse_versiontsafe_versiontyield_linest
EntryPointtiter_entry_pointstto_filename(tglob(t	packagingcCs�d}|jtjj�}tjtj�}d|f}xt|�D]\}}|t|�dk}|dkr�|r�|d7}qG|d||f7}qGnd}t|�}	x�||	krA||}
|
dkr�||d7}nJ|
d	kr||7}n1|
d
kr!|d}||	krB||dkrB|d}n||	krk||dkrk|d}nx*||	kr�||dkr�|d}qnW||	kr�|tj|
�7}q4||d|!}d}
|ddkr�d
}
|d}n|
tj|�7}
|d|
f7}|}n|tj|
�7}|d7}q�W|sG||7}qGqGW|d7}tj|dtj	tj
B�S(s�
    Translate a file path glob like '*.txt' in to a regular expression.
    This differs from fnmatch.translate which allows wildcards to match
    directory separators. It also knows about '**/' which matches any number of
    directories.
    ts[^%s]is**s.*s
(?:%s+%s)*it*t?t[t!t]t^s[%s]s\Ztflags(tsplittostpathtseptretescapet	enumeratetlentcompilet	MULTILINEtDOTALL(RtpattchunksR t
valid_chartctchunkt
last_chunktit	chunk_lentchartinner_itinnert
char_class((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyttranslate_pattern$sV







	
tegg_infocBs�eZdZddddgZdgZidd
6Zd
�Zed��Zej	d��Zd�Z
d�Zed�Z
d�Zd�Zd�Zd�Zd�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-datetds0Add date stamp (e.g. 20050528) to version numbers
tag-build=tbs-Specify explicit tag to add to version numbersno-datetDs"Don't include date stamp [default]cCsLd|_d|_d|_d|_d|_d|_t|_d|_	dS(Ni(
tNonetegg_nametegg_versiontegg_baseR5t	tag_buildttag_datetFalsetbroken_egg_infotvtags(tself((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytinitialize_options�s							cCsdS(N((RC((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyttag_svn_revision�scCsdS(N((RCtvalue((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRE�scCs@tj�}|j�|d<d|d<t|td|��dS(s�
        Materialize the value of date into the
        build tag. Install build keys in a deterministic order
        to avoid arbitrary reordering on subsequent builds.
        R>iR?R5N(tcollectionstOrderedDictttagsR	tdict(RCtfilenameR5((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytsave_version_info�s
cCs�t|jj��|_|j�|_|j�|_t|j�}yKt	|t
jj�}|ridnd}t
t||j|jf��Wn3tk
r�tjjd|j|jf��nX|jdkr|jj}|p�ijdtj�|_n|jd�t|j�d|_|jtjkrXtjj|j|j�|_nd|jkrt|j�n|j|jj_|jj }|dk	r�|j!|jj"�kr�|j|_#t|j�|_$d|j_ ndS(Ns%s==%ss%s===%ss2Invalid distribution name or version syntax: %s-%sRR=s	.egg-infot-(%Rtdistributiontget_nameR;RIRBttagged_versionR<R
t
isinstanceRtversiontVersiontlistRt
ValueErrort	distutilsterrorstDistutilsOptionErrorR=R:tpackage_dirtgetRtcurdirtensure_dirnameRR5Rtjointcheck_broken_egg_infotmetadatat
_patched_disttkeytlowert_versiont_parsed_version(RCtparsed_versiont
is_versiontspectdirstpd((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytfinalize_options�s8!
	!
!
$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_fileRRtexistsR:Rtwarntdelete_file(RCtwhatRKtdatatforce((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_or_delete_file�s	
cCsdtjd||�tjr.|jd�}n|js`t|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 %ssutf-8twbN(	RtinfoRtPY3tencodetdry_runtopentwritetclose(RCRoRKRptf((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRk�s		
cCs-tjd|�|js)tj|�ndS(s8Delete `filename` (if not a dry run) after announcing itsdeleting %sN(RRtRwRtunlink(RCRK((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRn�s	cCsE|jj�}|jr4|j|j�r4t|�St||j�S(N(RNtget_versionRBtendswithR(RCRR((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRPs
cCs�|j|j�|jj}xXtd�D]J}|jd|�|j�}|||jtj	j
|j|j��q)Wtj	j
|jd�}tj	j|�r�|j|�n|j
�dS(Nsegg_info.writerst	installersnative_libs.txt(tmkpathR5RNtfetch_build_eggRtrequiretresolvetnameRRR]RlRntfind_sources(RCRteptwritertnl((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytrun	s,cCsBd}|jr||j7}n|jr>|tjd�7}n|S(NRs-%Y%m%d(R>R?ttimetstrftime(RCRR((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRIs		cCsJtjj|jd�}t|j�}||_|j�|j|_dS(s"Generate SOURCES.txt manifest filesSOURCES.txtN(	RRR]R5tmanifest_makerRNtmanifestR�tfilelist(RCtmanifest_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-infoRMiNs�
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.
(R;R=RR[RR]RlRRmR5RA(RCtbei((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR^(s

(s	egg-base=R6sLdirectory containing .egg-info directories (default: top of the source tree)(stag-dateR7s0Add date stamp (e.g. 20050528) to version number(s
tag-build=R8s-Specify explicit tag to add to version number(sno-dateR9s"Don't include date stamp [default](t__name__t
__module__tdescriptiontuser_optionstboolean_optionstnegative_optRDtpropertyREtsetterRLRjR@RrRkRnRPR�RIR�R^(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR5ws*		
	
	
	/						RcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZRS(cCs�|j|�\}}}}|dkrw|jddj|��x�|D](}|j|�sHtjd|�qHqHWnx|dkr�|jddj|��xO|D](}|j|�s�tjd|�q�q�Wn|dkr/|jd	dj|��x�|D](}|j|�stjd
|�qqWn�|dkr�|jddj|��x�|D](}|j|�s\tjd
|�q\q\Wnd|dkr�|jd|dj|�f�x5|D].}|j	||�s�tjd||�q�q�Wn�|dkr[|jd|dj|�f�x�|D].}|j
||�s&tjd||�q&q&Wn�|dkr�|jd|�|j|�s�tjd|�q�nR|dkr�|jd|�|j|�s�tjd|�q�nt
d|��dS(Ntincludesinclude t s%warning: no files found matching '%s'texcludesexclude s9warning: no previously-included files found matching '%s'sglobal-includesglobal-include s>warning: no files found matching '%s' anywhere in distributionsglobal-excludesglobal-exclude sRwarning: no previously-included files matching '%s' found anywhere in distributionsrecursive-includesrecursive-include %s %ss:warning: no files found matching '%s' under directory '%s'srecursive-excludesrecursive-exclude %s %ssNwarning: no previously-included files matching '%s' found under directory '%s'tgraftsgraft s+warning: no directories found matching '%s'tprunesprune s6no previously-included directories found matching '%s's'this cannot happen: invalid action '%s'(t_parse_template_linetdebug_printR]R�RRmR�tglobal_includetglobal_excludetrecursive_includetrecursive_excludeR�R�R(RCtlinetactiontpatternstdirtdir_patterntpattern((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytprocess_template_line;sd

	
	
		
		
		
	
cCsrt}xett|j�ddd�D]D}||j|�r&|jd|j|�|j|=t}q&q&W|S(s�
        Remove all files from the file list that match the predicate.
        Return True if any matching files were removed
        ii����s
 removing (R@trangeR$tfilesR�tTrue(RCt	predicatetfoundR.((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt
_remove_files�s&

cCsHgt|�D]}tjj|�s
|^q
}|j|�t|�S(s#Include files that match 'pattern'.(RRRtisdirtextendtbool(RCR�R{R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s1
cCst|�}|j|j�S(s#Exclude files that match 'pattern'.(R4R�tmatch(RCR�R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��scCsftjj|d|�}gt|dt�D]}tjj|�s+|^q+}|j|�t|�S(sN
        Include all files anywhere in 'dir/' that match the pattern.
        s**t	recursive(RRR]RR�R�R�R�(RCR�R�tfull_patternR{R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s

cCs.ttjj|d|��}|j|j�S(sM
        Exclude any file anywhere in 'dir/' that match the pattern.
        s**(R4RRR]R�R�(RCR�R�R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��scCsOgt|�D]%}tjj|�D]}|^q#q
}|j|�t|�S(sInclude all files from 'dir/'.(RRVR�tfindallR�R�(RCR�t	match_dirtitemR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s
%
cCs+ttjj|d��}|j|j�S(sFilter out files from 'dir/'.s**(R4RRR]R�R�(RCR�R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��scCsy|jdkr|j�nttjjd|��}g|jD]}|j|�rA|^qA}|j|�t	|�S(s�
        Include all files anywhere in the current directory that match the
        pattern. This is very inefficient on large file trees.
        s**N(
tallfilesR:R�R4RRR]R�R�R�(RCR�R�R{R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s
+
cCs+ttjjd|��}|j|j�S(sD
        Exclude all files anywhere that match the pattern.
        s**(R4RRR]R�R�(RCR�R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��scCsN|jd�r|d }nt|�}|j|�rJ|jj|�ndS(Ns
i����(R~Rt
_safe_pathR�tappend(RCR�R((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s

cCs |jjt|j|��dS(N(R�R�tfilterR�(RCtpaths((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��scCs"tt|j|j��|_dS(s�
        Replace self.files with only safe paths

        Because some owners of FileList manipulate the underlying
        ``files`` attribute directly, this method must be called to
        repair those paths.
        N(RTR�R�R�(RC((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt_repair�scCs�d}tj|�}|dkr6tjd|�tStj|d�}|dkrktj||d�tSy,tjj	|�s�tjj	|�r�t
SWn*tk
r�tj||tj
��nXdS(Ns!'%s' not %s encodable -- skippings''%s' in unexpected encoding -- skippingsutf-8(t
unicode_utilstfilesys_decodeR:RRmR@t
try_encodeRRRlR�tUnicodeEncodeErrortsystgetfilesystemencoding(RCRtenc_warntu_patht	utf8_path((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s$
(R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR8s	I	
			
		
						
R�cBseeZdZd�Zd�Zd�Zd�Zd�Zd�Ze	d��Z
d�Zd	�ZRS(
sMANIFEST.incCs(d|_d|_d|_d|_dS(Ni(tuse_defaultsR�t
manifest_onlytforce_manifest(RC((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRD�s			cCsdS(N((RC((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRjscCs�t�|_tjj|j�s.|j�n|j�tjj|j�rZ|j	�n|j
�|jj�|jj�|j�dS(N(
RR�RRRlR�twrite_manifesttadd_defaultsttemplatet
read_templatetprune_file_listtsorttremove_duplicates(RC((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�s





cCs"tj|�}|jtjd�S(Nt/(R�R�treplaceRR (RCR((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt_manifest_normalizescCsb|jj�g|jjD]}|j|�^q}d|j}|jt|j|f|�dS(so
        Write the file list in 'self.filelist' to the manifest file
        named by 'self.manifest'.
        swriting manifest file '%s'N(R�R�R�R�R�texecuteRk(RCR{R�tmsg((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�s
(
cCs&|j|�s"tj||�ndS(N(t_should_suppress_warningRRm(RCR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRm$scCstjd|�S(s;
        suppress missing-file warnings from sdist
        sstandard file .*not found(R!R�(R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�(scCs�tj|�|jj|j�|jj|j�tt��}|r[|jj|�n"t	j
j|j�r}|j�n|j
d�}|jj|j�dS(NR5(RR�R�R�R�R�RTRR�RRRlt
read_manifesttget_finalized_commandR�R5(RCtrcfilestei_cmd((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�/s

cCsy|jd�}|jj�}|jj|j�|jj|�tjtj	�}|jj
d|d|dd�dS(Ntbuilds(^|s)(RCS|CVS|\.svn)tis_regexi(R�RNtget_fullnameR�R�t
build_baseR!R"RR texclude_pattern(RCR�tbase_dirR ((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�;s(
R�R�R�RDRjR�R�R�RmtstaticmethodR�R�R�(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR��s							cCsGdj|�}|jd�}t|d��}|j|�WdQXdS(s{Create a file with the specified name and write 'contents' (a
    sequence of strings without line terminators) to it.
    s
sutf-8RsN(R]RvRxRy(RKtcontentsR{((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyRkEscCs�tjd|�|js�|jj}|j|j|_}|j|j|_}z|j	|j
�Wd|||_|_Xt|jdd�}t
j|j
|�ndS(Ns
writing %stzip_safe(RRtRwRNR_R<RRR;R�twrite_pkg_infoR5tgetattrR:R
twrite_safety_flag(tcmdtbasenameRKR_toldvertoldnametsafe((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�Rs	cCs&tjj|�r"tjd�ndS(NssWARNING: 'depends.txt' is not used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.(RRRlRRm(R�R�RK((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwarn_depends_obsoleteescCs;t|pd�}d�}t||�}|j|�dS(NcSs|dS(Ns
((R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt<lambda>oR((RRt
writelines(tstreamtreqstlinest	append_cr((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt_write_requirementsms	cCs�|j}tj�}t||j�|jp1i}x>t|�D]0}|jdjt	���t|||�qAW|j
d||j��dS(Ns
[{extra}]
trequirements(RNRtStringIOR�tinstall_requirestextras_requiretsortedRytformattvarsRrtgetvalue(R�R�RKtdistRpR�textra((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_requirementsts	cCs<tj�}t||jj�|jd||j��dS(Nssetup-requirements(tioR�R�RNtsetup_requiresRrR�(R�R�RKRp((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_setup_requirementsscCsetjg|jj�D]}|jdd�d^q�}|jd|djt|��d�dS(Nt.iistop-level namess
(RJtfromkeysRNtiter_distribution_namesRRkR]R�(R�R�RKtktpkgs((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytwrite_toplevel_names�s2cCst|||t�dS(N(t	write_argR�(R�R�RK((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
(RRtsplitextR�RNR:R]Rr(R�R�RKRqtargnameRF((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyR�s
cCs�|jj}t|tj�s*|dkr3|}n�|dk	r�g}x�t|j��D]n\}}t|tj�s�tj	||�}dj
ttt|j
����}n|jd||f�qXWdj
|�}n|jd||t�dS(Ns
s	[%s]
%s

Rsentry points(RNtentry_pointsRQRtstring_typesR:R�titemsRtparse_groupR]RtstrtvaluesR�RrR�(R�R�RKR�RptsectionR�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt
write_entries�s	'cCs}tjdt�tjjd�rytjd��C}x9|D]1}tj	d|�}|r;t
|jd��Sq;WWdQXndS(sd
    Get a -r### off of PKG-INFO Version in case this is an sdist of
    a subversion revision.
    s$get_pkg_info_revision is deprecated.sPKG-INFOsVersion:.*-r(\d+)\s*$iNi(twarningsRmtDeprecationWarningRRRlRRxR!R�tinttgroup(R{R�R�((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pytget_pkg_info_revision�s
 (;t__doc__tdistutils.filelistRt	_FileListtdistutils.errorsRtdistutils.utilRRVRRR!R�RRR�RGtsetuptools.externRtsetuptools.extern.six.movesRt
setuptoolsRtsetuptools.command.sdistRRtsetuptools.command.setoptR	tsetuptools.commandR
t
pkg_resourcesRRR
RRRRRtsetuptools.unicode_utilsR�tsetuptools.globRRR4R5R�RkR�R�R�RRR
RR@RRR(((s?/usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyt<module>sN:	S��I	
						
		

Hacked By AnonymousFox1.0, Coded By AnonymousFox