Hacked By AnonymousFox

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

�
�fc@s�dZddlmZddlmZmZddlmZddlm	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZddlmZmZmZdd	lmZdd
lmZddlmZy#ddlmZmZd
�ZWn0ek
r9ddlm Z mZd�ZnXd�Z!d�Z"d�Z#defd��YZ$e%j&dj'��Z(d�Z)d�Z*d�Z+ide,6de-6Z.d�Z/d�Z0d�Z1ddd d!gZ2d"d"e,d#d$�Z3dS(%s6setuptools.command.bdist_egg

Build .egg distributionsi����(tDistutilsSetupError(tremove_treetmkpath(tlog(tCodeTypeN(tsix(tget_build_platformtDistributiontensure_directory(t
EntryPoint(tLibrary(tCommand(tget_pathtget_python_versioncCs
td�S(Ntpurelib(R(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt_get_purelibs(tget_python_libR
cCs
tt�S(N(RtFalse(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRscCsEd|kr%tjj|�d}n|jd�rA|d }n|S(Nt.itmodulei����(tostpathtsplitexttendswith(tfilename((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytstrip_module#s

ccsIxBtj|�D]1\}}}|j�|j�|||fVqWdS(sbDo os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    N(Rtwalktsort(tdirtbasetdirstfiles((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytsorted_walk+s

cCsBtjd�j�}t|d��}|j||�WdQXdS(NsR
        def __bootstrap__():
            global __bootstrap__, __loader__, __file__
            import sys, pkg_resources, imp
            __file__ = pkg_resources.resource_filename(__name__, %r)
            __loader__ = None; del __bootstrap__, __loader__
            imp.load_dynamic(__name__,__file__)
        __bootstrap__()
        tw(ttextwraptdedenttlstriptopentwrite(tresourcetpyfilet_stub_templatetf((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt
write_stub5st	bdist_eggcBs�eZdZdddde�fdd	d
ddfd d!gZd	ddgZd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�ZRS("screate an "egg" distributions
bdist-dir=tbs1temporary directory for creating the distributions
plat-name=tps;platform name to embed in generated filenames (default: %s)sexclude-source-filess+remove all .py files from the generated eggs	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)cCsCd|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet	bdist_dirt	plat_namet	keep_temptdist_dirt
skip_buildt
egg_outputtexclude_source_files(tself((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytinitialize_optionsZs						cCs�|jd�}|_|j|_|jdkr^|jd�j}tjj|d�|_n|j	dkr|t
�|_	n|jdd�|jdkr�t
dd|j|jt�|jj�o�|j	�j�}tjj|j|d�|_ndS(Ntegg_infotbdistteggR5s.egg(R5R5(tget_finalized_commandtei_cmdR;R2R1t
bdist_baseRRtjoinR3Rtset_undefined_optionsR7Rtegg_nametegg_versionR
tdistributionthas_ext_modulesR5(R9R?R@tbasename((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytfinalize_optionscs!cCs_|j|jd�_tjjtjjt���}|jj	g}|j_	x�|D]�}t
|t�rt|�dkrtjj
|d�rtjj|d�}tjj|�}||ks�|j|tj�r|t|�d|df}qqn|jj	j|�qVWz0tjd|j�|jddddd�Wd||j_	XdS(	Ntinstalliiisinstalling package data to %stinstall_datatforcetroot(R2R>tinstall_libRRtnormcasetrealpathRREt
data_filest
isinstancettupletlentisabst
startswithtseptappendRtinfotcall_commandR1(R9t
site_packagestoldtitemROt
normalized((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytdo_install_data{s !
!'cCs
|jgS(N(R7(R9((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytget_outputs�scKsmx!tD]}|j||j�qW|jd|j�|jd|j�|j||�}|j|�|S(s8Invoke reinitialized command `cmdname` with keyword argsR6tdry_run(tINSTALL_DIRECTORY_ATTRSt
setdefaultR2R6R`treinitialize_commandtrun_command(R9tcmdnametkwtdirnametcmd((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRY�s

c	Cs�|jd�tjd|j�|jd�}|j}d|_|jj�rj|j	rj|jd�n|j
ddd�}||_|j�\}}g|_g}x�t
|�D]�\}}tjj|�\}	}
tjj|jt|	�d�}|jj|�tjd	|�|jsAttjj|�|�n|j|�|jtjd
�||<q�W|r�|j|�n|jjr�|j�n|j}tjj|d�}
|j|
�|jjrtjj|
d�}tjd
|�|j
dd|dd�n|j|
�tjj|
d�}|r�tjd|�|js�t|�t |d�}|j!dj|��|j!d�|j"�q�n>tjj#|�r�tjd|�|js�tj$|�q�nt%tjj|d�|j&��tjj'tjj|j(d��r3tj)d�n|j*rI|j+�nt,|j-|d|j.d|jd|j/��|j0s�t1|jd|j�nt2|jdg�jdt3�|j-f�dS(NR;sinstalling library code to %sRIt
build_clibRMtwarn_diris.pyscreating stub loader for %st/sEGG-INFOtscriptssinstalling scripts to %stinstall_scriptstinstall_dirtno_episnative_libs.txts
writing %stwts
sremoving %ssdepends.txtsxWARNING: 'depends.txt' will not be used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.tverboseR`tmodet
dist_filesR,(4RdRRXR2R>RLR1REthas_c_librariesR6RYtget_ext_outputststubst	enumerateRRRRARRWR`R+RGtreplaceRVtbyte_compileRPR^RRltcopy_metadata_toRR%R&tclosetisfiletunlinktwrite_safety_flagtzip_safetexistsR;twarnR8tzap_pyfilestmake_zipfileR7Rqt
gen_headerR4RtgetattrR
(R9tinstcmdtold_rootRhtall_outputstext_outputst
to_compileR.text_nameRtextR(tarchive_rootR;t
script_dirtnative_libst	libs_file((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytrun�sz
				
	

	


	

	$
	
	c
Cs-tjd�xt|j�D]\}}}x�|D]�}tjj||�}|jd�r}tjd|�tj	|�n|jd�r3|}d}t
j||�}tjj|tj|j
d�d�}	tjd||	f�ytj|	�Wntk
r
nXtj||	�q3q3WqWdS(	Ns+Removing .py files from temporary directorys.pysDeleting %st__pycache__s#(?P<name>.+)\.(?P<magic>[^.]+)\.pyctnames.pycsRenaming file from [%s] to [%s](RRXtwalk_eggR2RRRARtdebugR}tretmatchtpardirtgrouptremovetOSErrortrename(
R9RRRR�Rtpath_oldtpatterntmtpath_new((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s*

	
cCsEt|jdd�}|dk	r%|Stjd�t|j|j�S(NRs4zip_safe flag not set; analyzing archive contents...(R�RER1RR�tanalyze_eggR2Rv(R9tsafe((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRs

c
Cs!tj|jjpd�}|jdi�jd�}|dkrFdS|jsY|jrotd|f��nt	j
d }|j}dj|j�}|jd}t
jj|j�}d	t�}|jstt
jj|j�d
|j�t|jd�}	|	j|�|	j�ndS(Ntssetuptools.installationteggsecutableR!sGeggsecutable entry point (%r) cannot have 'extras' or refer to a moduleiRisH#!/bin/sh
if [ `basename $0` = "%(basename)s" ]
then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@"
else
  echo $0 is not the correct name for this egg file.
  echo Please rename it back to %(basename)s and try again.
  exec false
fi
R`ta(R	t	parse_mapREtentry_pointstgetR1tattrstextrasRtsystversiontmodule_nameRARRRGR7tlocalsR`RRgR%R&R{(
R9tepmteptpyvertpkgtfullRRGtheaderR*((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR�s*
	

	"

cCs�tjj|j�}tjj|d�}xb|jjjD]Q}|j|�r:tjj||t	|��}t
|�|j||�q:q:WdS(s*Copy metadata (egg info) to the target_dirR�N(RRtnormpathR;RAR?tfilelistRRURSRt	copy_file(R9t
target_dirt
norm_egg_infotprefixRttarget((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRz:s
cCs�g}g}id|j6}x�t|j�D]�\}}}xH|D]@}tjj|�dj�tkrB|j|||�qBqBWx3|D]+}|||d|tjj||�<q�Wq,W|j	j
�r}|jd�}x�|jD]�}	t
|	t�rq�n|j|	j�}
|j|
�}tjj|�jd�s�tjjtjj|j|��rv|j|�qvq�q�Wn||fS(sAGet a list of relative paths to C extensions in the output distroR�iRkt	build_extsdl-(R2R RRRtlowertNATIVE_EXTENSIONSRWRARERFR>t
extensionsRQR
tget_ext_fullnameR�tget_ext_filenameRGRUR�(R9R�R�tpathsRRRRt	build_cmdR�tfullname((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRuFs(
"
-$(s
bdist-dir=R-s1temporary directory for creating the distributionN(sexclude-source-filesNs+remove all .py files from the generated egg(s	dist-dir=R0s-directory to put final built distributions in(s
skip-buildNs2skip rebuilding everything (for testing/debugging)(t__name__t
__module__tdescriptionRR1tuser_optionstboolean_optionsR:RHR^R_RYR�R�RR�RzRu(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR,Cs4	
							
	Q			'	s.dll .so .dylib .pydccset|�}t|�\}}}d|kr=|jd�n|||fVx|D]}|VqRWdS(s@Walk an unpacked egg's contents, skipping the metadata directorysEGG-INFON(R tnextR�(tegg_dirtwalkerRRRtbdf((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR�fs
c	Cs�xBtj�D]4\}}tjjtjj|d|��r
|Sq
Wt�sRtSt}x�t	|�D]�\}}}xn|D]f}|j
d�s{|j
d�r�q{q{|j
d�s�|j
d�r{t||||�o�|}q{q{WqeW|S(NsEGG-INFOs.pys.pyws.pycs.pyo(tsafety_flagstitemsRRR�RAtcan_scanRtTrueR�Rtscan_module(	R�RvtflagtfnR�RRRR�((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR�qs$	
&cCs�x�tj�D]�\}}tjj||�}tjj|�rq|dks^t|�|kr�tj|�q�q
|dk	r
t|�|kr
t	|d�}|j
d�|j�q
q
WdS(NRps
(R�R�RRRAR�R1tboolR}R%R&R{(R�R�R�R�R*((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR~�s
szip-safesnot-zip-safec
Cs�tjj||�}|d |kr)tS|t|�djtjd�}||r[dp^dtjj|�d}tj	dkr�d}ntj	dkr�d	}nd
}t
|d�}|j|�tj
|�}	|j�t}
tjt|	��}x<dd
gD].}||kr	tjd||�t}
q	q	Wd|kr�xZdddddddddddgD].}||krotjd||�t}
qoqoWn|
S(s;Check whether module possibly uses unsafe-for-zipfile stuffi����iRR�iiiiiitrbt__file__t__path__s%s: module references %stinspectt	getsourcet
getabsfilet
getsourcefiletgetfilegetsourcelinest
findsourcetgetcommentstgetframeinfotgetinnerframestgetouterframeststackttraces"%s: module MAY be using inspect.%s(ii(ii(RRRAR�RSRxRVRR�tversion_infoR%treadtmarshaltloadR{tdicttfromkeystiter_symbolsRR�R(
R�RR�RvRR�RtskipR*tcodeR�tsymbolstbad((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s:#*		


	ccsyx|jD]}|Vq
WxY|jD]N}t|tj�rC|Vq#t|t�r#xt|�D]}|Vq_Wq#q#WdS(sBYield names and strings used by `code` and its nested code objectsN(tco_namest	co_constsRQRtstring_typesRR�(R�R�tconst((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s	cCsDtjjd�r&tjdkr&tStjd�tjd�dS(Ntjavatclis1Unable to analyze compiled code on this platform.sfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py(R�tplatformRUR�RR�(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s"
RMRnRJtinstall_baseiR!c
s�ddl}ttjj|�d��tjd|����fd�}|r\|jn|j}�s�|j	||d|�}	x-t
��D]\}
}}||	|
|�q�W|	j�n0x-t
��D]\}
}}|d|
|�q�W|S(sqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    i����NR`s#creating '%s' and adding '%s' to itcs�x�|D]y}tjjtjj||��}tjj|�r|t��d}�sm|j||�ntjd|�qqWdS(Nisadding '%s'(	RRR�RAR|RSR&RR�(tzRgtnamesR�RR.(tbase_dirR`(s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytvisit�s
!tcompression(
tzipfileRRRRgRRXtZIP_DEFLATEDt
ZIP_STOREDtZipFileR R{R1(
tzip_filenameR�RqR`tcompressRrR�R�R�R�RgRR((R�R`s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s	
(4t__doc__tdistutils.errorsRtdistutils.dir_utilRRt	distutilsRttypesRR�RR�R"R�tsetuptools.externRt
pkg_resourcesRRRR	tsetuptools.extensionR
t
setuptoolsRt	sysconfigRR
RtImportErrortdistutils.sysconfigRRR R+R,R�R�tsplitR�R�R�R~R�RR�R�R�R�RaR�(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt<module>sL


		
	�!			

	$		
	

Hacked By AnonymousFox1.0, Coded By AnonymousFox