Spade

Mini Shell

Directory:~$ /proc/self/root/lib/python2.7/site-packages/setuptools/command/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyo

�
b-�Qc@s�dZddlZddlZddlZddlmZddlmZmZy#ddl	m
Z
mZd�ZWn0e
k
r�ddlmZmZd�ZnXdd	lmZdd
lmZddlmZmZmZddlmZdd
lmZddlmZmZddlmZd�Z
d�Z!dZ"defd��YZ#e$j%dj&��Z'd�Z(d�Z)d�Z*ide+6de,6Z-d�Z.d�Z/d�Z0ddd
d!gZ1d"d"e2d#d$�Z3dS(%s6setuptools.command.bdist_egg

Build .egg
distributionsi����N(tCommand(tremove_treetmkpath(tget_pathtget_python_versioncCs
td�S(Ntpurelib(R(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt_get_purelibs(tget_python_libRcCs
tt�S(N(RtFalse(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRs(tlog(tDistutilsSetupError(tget_build_platformtDistributiontensure_directory(t
EntryPoint(tCodeType(t
basestringtnext(tLibrarycCsEd|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_modules

c
CsOt|d�}|jdjdddd|ddd	d
g��|j�dS(Ntws
sdef __bootstrap__():s-   global __bootstrap__, __loader__, __file__s!  
import sys, pkg_resources, imps:   __file__ =
pkg_resources.resource_filename(__name__,%r)s3   __loader__ = None; del
__bootstrap__, __loader__s&  
imp.load_dynamic(__name__,__file__)s__bootstrap__()t(topentwritetjointclose(tresourcetpyfiletf((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt
write_stub"s
s7__import__("pkg_resources").declare_namespace(__name__)t	bdist_eggcBs�eZdZdddde�fd
d	d
ddfd!d"gZd	ddgZd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d�Zd�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_options]s						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_infotbdistteggR.s.egg(sdist_dirsdist_dir(tget_finalized_commandtei_cmdR4R+R*t
bdist_baseRRRR,Rtset_undefined_optionsR0Rtegg_nametegg_versionRtdistributionthas_ext_modulesR.(R2R8R9tbasename((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytfinalize_optionsgs!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|�qVWz1tjd|j�|jddddd�Wd||j_	XdS(	Ntinstalliiisinstalling
package data to
%stinstall_datatforcetroot(R+R7tinstall_libRRtnormcasetrealpathRR=t
data_filest
isinstancettupletlentisabst
startswithtseptappendR	tinfotcall_commandR*(R2t
site_packagestoldtitemRGt
normalized((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytdo_install_data�s
!
!'cCs
|jgS(N(R0(R2((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
argsR/tdry_run(tINSTALL_DIRECTORY_ATTRSt
setdefaultR+R/RXtreinitialize_commandtrun_command(R2tcmdnametkwtdirnametcmd((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRQ�s

c
Cs�|jd�tjd|j�|jd�}|j}d|_|jj�rk|j	rk|jd�n|j
ddd�}||_|j�\}}g|_g}x�t
|�D]�\}}tjj|�\}	}
tjj|jt|	�d�}|jj|�tjd	|�|jsCttjj|�|�n|j|�|jtjd
�||<q�W|j|j��|r�|j|�n|jjr�|j�n|j}tjj|d�}
|j|
�|jjr(tjj|
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��rKtj+d�n|j,ra|j-�nt.|j/|d|j0d|jd|j1��|j2s�t3|jd|j�nt4|jdg�jdt5�|j/f�dS(NR4sinstalling
library code to %sRAt
build_clibREtwarn_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.tverboseRXtmodet
dist_filesR%(6R\R	RPR+R7RDR*R=thas_c_librariesR/RQtget_ext_outputststubst	enumerateRRRRRRORXR$R?treplaceRNtextendtmake_init_filestbyte_compileRHRVRRdtcopy_metadata_toR
RRR
tisfiletunlinktwrite_safety_flagtzip_safetexistsR4twarnR1tzap_pyfilestmake_zipfileR0Rit
gen_headerR-RtgetattrR(R2tinstcmdtold_rootR`tall_outputstext_outputst
to_compileR'text_nameRtextR"tarchive_rootR4t
script_dirtnative_libst	libs_file((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytrun�sx
				"	

	

	

	$
	
	cCs�tjd�xut|j�D]d\}}}xR|D]J}|jd�r3tjj||�}tjd|�tj	|�q3q3WqWdS(Ns+Removing
.py files from temporary directorys.pysDeleting %s(
R	RPtwalk_eggR+RRRRtdebugRv(R2tbasetdirstfilestnameR((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR{s

cCsEt|jdd�}|dk	r%|Stjd�t|j|j�S(NRxs4zip_safe
flag not set; analyzing archive
contents...(R~R=R*R	Rztanalyze_eggR+Rn(R2tsafe((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRx
s

c	Csg}xt|j�D]�\}}}||jkr:qnx�|D]�}|jd�rAd|kr|t|j�djtjd�}|jj|�rt	j
d|�tjj|d�}|j
s�t|d�}|jt�|j�n|j|�qnPqAqAWg|(qW|S(s%Create
missing package __init__ filess.pys__init__.pyiRs#Creating missing
__init__.py for
%sR(R�R+RRKRpRRNR=thas_contents_forR	RzRRRXRRtNS_PKG_STUBR
RO(	R2t
init_filesR�R�R�R�tpkgRR#((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRrs&
&	

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(NRssetuptools.installationteggsecutableRsGeggsecutable
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
RXta(Rt	parse_mapR=tentry_pointstgetR*tattrstextrasR
tsystversiontmodule_nameRRRR?R0tlocalsRXRR_RRR (
R2tepmteptpyverR�tfullR�R?theaderR#((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_dirRN(RRtnormpathR4RR8tfilelistR�RMRKR
t	copy_file(R2t
target_dirt
norm_egg_infotprefixRttarget((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRtSs
cCs�g}g}id|j6}x�tj|j�D]�\}}}xH|D]@}tjj|�dj�tkrE|j|||�qEqEWx3|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|��ry|j|�qyq�q�Wn||fS(sAGet
a list of relative paths to C extensions in the output
distroRiRct	build_extsdl-(R+RtwalkRRtlowertNATIVE_EXTENSIONSRORR=R>R7t
extensionsRIRtget_ext_fullnameR�tget_ext_filenameR?RMRy(R2R�R�tpathsR�R�R�Rt	build_cmdR�tfullname((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRm_s("
"
-$(s
bdist-dir=R&s1temporary directory for creating the
distributionN(sexclude-source-filesNs+remove all .py files from the
generated egg(s	dist-dir=R)s-directory to put final built distributions
in(s
skip-buildNs2skip rebuilding everything (for
testing/debugging)(t__name__t
__module__tdescriptionRR*tuser_optionstboolean_optionsR3R@RVRWRQR�R{RxRrR}RtRm(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR%4s8
		
					R					)	s.dll .so .dylib
.pydccshtj|�}t|�\}}}d|kr@|jd�n|||fVx|D]}|VqUWdS(s@Walk
an unpacked egg's contents, skipping the metadata
directorysEGG-INFON(RR�Rtremove(tegg_dirtwalkerR�R�R�tbdf((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s
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_flagstitemsRRRyRtcan_scanRtTrueR�Rtscan_module(	R�RntflagtfnR�R�R�R�R�((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s$	
&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(NRhs
(R�R�RRRRyR*tboolRvRRR
(R�R�R�R�R#((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyRw�s
szip-safesnot-zip-safec

Cs�tjj||�}|d
|kr)tS|t|�djtjd�}||r[dp^dtjj|�d}tj	dkr�d}nd}t
|d	�}|j|�tj
|�}	|j�t}
tjt|	��}x<d
dgD].}||kr�tjd||�t}
q�q�Wd
|kr�xZdddddddddddgD].}||krWtjd||�t}
qWqWWnd|kr�d|kr�d|kr�tjd dkr�tjd|�t}
q�n|
S(s;Check whether module possibly uses unsafe-for-zipfile
stuffi����iRRiiiitrbt__file__t__path__s%s: module
references %stinspectt	getsourcet
getabsfilet
getsourcefiletgetfilegetsourcelinest
findsourcetgetcommentstgetframeinfotgetinnerframestgetouterframeststackttraces"%s:
module MAY be using inspect.%sR�t__main__s2.4s.%s: top-level module may
be 'python -m'
script(ii(RRRR�RKRpRNRR�tversion_infoRtreadtmarshaltloadR
tdicttfromkeystiter_symbolsR	RzRR�(
R�R�R�RnRR�RtskipR#tcodeR�tsymbolstbad((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s>#*	


	$ccsvx|jD]}|Vq
WxV|jD]K}t|t�r@|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_constsRIRRR�(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�tplatformRMR�R	Rz(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR��s"
RERfRBtinstall_baseiRc
sddl}ttjj|�d��tjd|����fd�}|dkrktj	dk}n|j
|jgt|�}�s�|j
||d|�}	x0tj��D]\}
}}||	|
|�q�W|	j�n3x0tj��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����NRXs#creating '%s' and adding '%s' to
itcs�x�|D]z}tjjtjj||��}tjj|�r|t��d}�sm|j||�ntjd|�qqWdS(Nisadding
'%s'(	RRR�RRuRKRR	R�(tzR_tnamesR�RR'(tbase_dirRX(s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pytvisits
!s2.4tcompression(tzipfileRRRR_R	RPR*R�R�t
ZIP_STOREDtZIP_DEFLATEDR�tZipFileR�R
(
tzip_filenameR�RiRXtcompressRjR�R�R�R�R_R�R�((R�RXs@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyR|s		
(4t__doc__R�RR�t
setuptoolsRtdistutils.dir_utilRRt	sysconfigRRRtImportErrortdistutils.sysconfigRt	distutilsR	tdistutils.errorsR
t
pkg_resourcesRRR
RttypesRtsetuptools.compatRRtsetuptools.extensionRRR$R�R%R�R�tsplitR�R�R�RwR�RR�R�R�R�RYR*R|(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyt<module>sD$


		�H	
		

	#	
	-