ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/setuptools/command/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyo

�
0��`c@sLdZddlmZddlmZddlmZmZddlmZmZm	Z	m
Z
ddlmZm
Z
ddlmZmZddlmZdd	lmZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
lZdd
l Z dd
l!Z!dd
l"Z"dd
l#Z#dd
l$Z$dd
l%Z%dd
l&Z&ddl'm(Z(ddl)m*Z*m+Z+dd
l,m-Z-ddl.m/Z/ddl0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl7m9Z9ddl3m:Z:m;Z;ddl<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKdd
l<Z<e jLdde<jM�ddddddgZNd�ZOd�ZPe(jQrd �ZRd!�ZSnd"�ZRd#�ZSde-fd$��YZTd%�ZUd&�ZVd'�ZWd(�ZXd)�ZYdeCfd*��YZZd+eZfd,��YZ[ej\j]d-d.�d.kr�e[ZZnd/�Z^d0�Z_d1�Z`d2�Zaebd3�Zcd4�Zdd5�Zed6ejfkreeZgn	d7�Zgd8d9�Zhd:�Zid;�Zjd<�Zkydd=lmlZmWnenk
rad>�ZmnXd?�Zld@eofdA��YZpepjq�ZrdBepfdC��YZsdDetfdE��YZudFeufdG��YZvdHevfdI��YZweujxZxeujyZydJ�ZzdK�Z{e|e_dL�Z}dM�Z~dN�ZebdO�Z�e#j�dP��Z�d
S(Qs
Easy Install
------------

A tool for doing automatic download/extract/build of distutils-based Python
packages.  For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.

__ https://pythonhosted.org/setuptools/easy_install.html

i����(tglob(tget_platform(tconvert_patht
subst_vars(tDistutilsArgErrortDistutilsOptionErrortDistutilsErrortDistutilsPlatformError(tINSTALL_SCHEMEStSCHEME_KEYS(tlogtdir_util(t
first_line_re(tfind_executableN(tsix(tconfigparsertmap(tCommand(t	run_setup(tget_pathtget_config_vars(tsetopt(tunpack_archive(tPackageIndex(t
URL_SCHEME(t	bdist_eggtegg_info(tyield_linestnormalize_pathtresource_stringtensure_directorytget_distributiontfind_distributionstEnvironmenttRequirementtDistributiontPathMetadatatEggMetadatat
WorkingSettDistributionNotFoundtVersionConflicttDEVELOP_DISTtdefaulttcategorytsamefileteasy_installtPthDistributionstextract_wininst_cfgtmaintget_exe_prefixescCstjd�dkS(NtPi(tstructtcalcsize(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytis_64bitGscCs�tjj|�o!tjj|�}ttjd�o9|}|rUtjj||�Stjjtjj|��}tjjtjj|��}||kS(NR,(tostpathtexiststhasattrR,tnormpathtnormcase(tp1tp2t
both_existtuse_samefiletnorm_p1tnorm_p2((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR,Ks$cCs|S(N((ts((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt	_to_asciiVscCs1ytj|d�tSWntk
r,tSXdS(Ntascii(Rt	text_typetTruetUnicodeErrortFalse(RB((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytisasciiYs

cCs
|jd�S(NRD(tencode(RB((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRC`scCs.y|jd�tSWntk
r)tSXdS(NRD(RJRFRGRH(RB((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRIcs


cBsWeZdZdZeZdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�gZdddd
dd-d0d6d9g	Ze	j
r�d=e	jZej
d>d~ef�ej
d>�nidd'6ZeZd?�Zd@�ZdA�ZedB��ZdC�ZdD�ZdE�ZdF�ZdG�ZdH�ZdI�ZdJ�ZdK�Zej dL�j!�Z"ej dM�j!�Z#ej dN�j!�Z$dO�Z%dP�Z&dQ�Z'dR�Z(dS�Z)dT�Z*e+dU�Z,e+dV�Z-dW�Z.edX�Z/dY�Z0dZ�Z1d[�Z2d~d\�Z3ed]��Z4d^d�d_�Z5d`�Z6da�Z7db�Z8dc�Z9dd�Z:ej de�j!�Z;ej df�Z<dgdh�Z=ej di�j!�Z>dj�Z?dk�Z@dl�ZAdm�ZBdn�ZCdo�ZDdp�ZEdq�ZFej dr�j!�ZGds�ZHdt�ZIdu�ZJeKdveKdwdxdydz��ZLeKdwd{dyd|�ZMd}�ZNRS(�s'Manage a download/build/install processs Find/get/install Python packagessprefix=sinstallation prefixszip-oktzsinstall package as a zipfiles
multi-versiontms%make apps have to require() a versiontupgradetUs1force upgrade (searches PyPI for latest versions)sinstall-dir=tdsinstall package to DIRsscript-dir=RBsinstall scripts to DIRsexclude-scriptstxsDon't install scriptssalways-copytas'Copy all needed packages to install dirs
index-url=tis base URL of Python Package Indexsfind-links=tfs(additional URL(s) to search for packagessbuild-directory=tbs/download/extract/build in DIR; keep the resultss	optimize=tOslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]srecord=s3filename in which to record list of installed filessalways-unziptZs*don't install as a zipfile, no matter whats
site-dirs=tSs)list of directories where .pth files workteditabletes+Install specified packages in editable formsno-depstNsdon't install dependenciessallow-hosts=tHs$pattern(s) that hostnames must matchslocal-snapshots-oktls(allow building eggs from local checkoutstversions"print version information and exits
no-find-linkss9Don't load find-links defined in packages being installeds!install in user site-package '%s'tusercCs�d|_d|_|_d|_|_|_d|_d|_d|_	d|_
d|_|_d|_
|_|_d|_|_|_d|_|_|_d|_d|_d|_d|_d|_d|_d|_d|_d|_tj rtj!|_"tj#|_$nd|_"d|_$d|_%d|_&d|_'|_(d|_)i|_*t+|_,d|_-|j.j/|_/|j.j0||j.j1d��dS(NiR-(2R^tNonetzip_oktlocal_snapshots_oktinstall_dirt
script_dirtexclude_scriptst	index_urlt
find_linkstbuild_directorytargstoptimizetrecordRMtalways_copyt
multi_versionRXtno_depstallow_hoststroottprefixt	no_reportR]tinstall_purelibtinstall_platlibtinstall_headerstinstall_libtinstall_scriptstinstall_datatinstall_basetinstall_platbasetsitetENABLE_USER_SITEt	USER_BASEtinstall_userbaset	USER_SITEtinstall_usersitet
no_find_linkst
package_indextpth_filetalways_copy_fromt	site_dirstinstalled_projectsRHtsitepy_installedt_dry_runtdistributiontverboset_set_command_optionstget_option_dict(tself((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytinitialize_options�sF																								cCs*d�|D�}tt|j|��dS(Ncss9|]/}tjj|�s-tjj|�r|VqdS(N(R6R7R8tislink(t.0tfilename((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pys	<genexpr>�s(tlistRt_delete_path(R�tblockerstextant_blockers((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytdelete_blockers�scCsetjd|�|jrdStjj|�o?tjj|�}|rNtntj}||�dS(NsDeleting %s(	R
tinfotdry_runR6R7tisdirR�trmtreetunlink(R�R7tis_treetremover((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	%cCs=tjd }td�}d}|jt��GHt��dS(sT
        Render the Setuptools version and installation details, then exit.
        it
setuptoolss=setuptools {dist.version} from {dist.location} (Python {ver})N(tsysR]Rtformattlocalst
SystemExit(tvertdistttmpl((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt_render_version�s

c
Cs�|jo|j�tjj�d}tdd�\}}i|jj�d6|jj�d6|jj�d6|d6|dd!d	6|d|d
d6|d6|d6|d
6|d6t	tdd�d6|_
tjr�|j
|j
d<|j|j
d<n|j�|j�|j�|jdddd�|jdkrI|j|_n|jdkrdt|_n|jdd%�|jdd&�|jr�|jr�|j|_|j|_n|jdd'�tttj�}t�|_ |j!dk	r�g|j!jd�D]}t"jj#|j$��^q}xq|D]f}t"jj%|�sWt&j'd|�q,t|�|kr|t(|d��q,|j j)t|��q,Wn|j*s�|j+�n|j,p�d|_,|j |_-xE|jt|j�fD]+}||j-kr�|j-j.d|�q�q�W|j/dk	rSg|j/jd�D]}|j$�^q8}	n	dg}	|j0dkr�|j1|j,d|j-d |	�|_0nt2|j-tj�|_3|j4dk	r�t5|j4t6j7�r�|j4j�|_4q�n	g|_4|j8r|j0j9|j-tj�n|js5|j0j:|j4�n|jdd(�t5|j;t<�s�y>t<|j;�|_;d|j;ko�d
kns�t=�nWq�t=k
r�t(d"��q�Xn|j*r�|j>r�t?d#��n|j@s�t?d$��ng|_AdS()NiRptexec_prefixt	dist_nametdist_versiont
dist_fullnamet
py_versionitpy_version_shortitpy_version_nodott
sys_prefixtsys_exec_prefixtabiflagsttuserbasetusersiteRbRcRgR�RuRvtinstallRjt,s"%s (in --site-dirs) does not exists$ (in --site-dirs) is not on sys.pathshttps://pypi.python.org/simplet*tsearch_paththostsRis--optimize must be 0, 1, or 2s9Must specify a build directory (-b) when using --editables:No urls, filenames, or requirements specified (see --help)(RbRb(RbRc(RjRj(RiRi(BR]R�R�tsplitRR�tget_nametget_versiontget_fullnametgetattrtconfig_varsRzR{R}Rt_fix_install_dir_for_user_sitetexpand_basedirstexpand_dirst_expandRcR_RbR�RHtset_undefined_optionsR^RrRvRRR7t
get_site_dirst
all_site_dirsR�R6t
expandusertstripR�R
twarnRtappendRXtcheck_site_dirRetshadow_pathtinsertRnR�tcreate_indexR!tlocal_indexRft
isinstanceRtstring_typesRatscan_egg_linkstadd_find_linksRitintt
ValueErrorRgRRhtoutputs(
R�R�RpR�R:RBR�ROt	path_itemR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytfinalize_options�s�	




4
	

.	!			

	cCs�|jstjrdS|j�|jdkrFd}t|��n|j|_|_t	j
jdd�d}|j|�dS(s;
        Fix the install_dir if "--user" was used.
        Ns$User base directory is not specifiedtposixtunixt_user(
R^RzR{tcreate_home_pathR}R_RRxRyR6tnametreplacet
select_scheme(R�tmsgtscheme_name((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�^s
cCs�x�|D]y}t||�}|dk	rtjdksFtjdkr[tjj|�}nt||j�}t|||�qqWdS(NR�tnt(	R�R_R6R�R7R�RR�tsetattr(R�tattrstattrtval((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
_expand_attrsms
cCs|jdddg�dS(sNCalls `os.path.expanduser` on install_base, install_platbase and
        root.RxRyRoN(R�(R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�vscCs#|jddddddg�dS(s+Calls `os.path.expanduser` on install dirs.RrRsRuRtRvRwN(R�(R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�{scCs|j|jjkr(tj|j�nz�x%|jD]}|j||j�q5W|jr�|j}|j	r�t
|j	�}x/tt
|��D]}|||||<q�Wnddlm
}|j|j|j|fd|j�n|j�Wdtj|jj�XdS(Ni����(t	file_utils'writing list of installed files to '%s'(R�R�R
t
set_verbosityRhR-RmRjR�Rotlentranget	distutilsR�texecutet
write_filetwarn_deprecated_options(R�tspecR�troot_lentcounterR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytrun�s$			cCsIytj�}Wntjdtj�}nXtjj|jd|�S(s�Return a pseudo-tempname base in the install directory.
        This code is intentionally naive; if a malicious party can write to
        the target directory you're already in deep doodoo.
        istest-easy-install-%s(	R6tgetpidtrandomtrandintR�tmaxsizeR7tjoinRb(R�tpid((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytpseudo_tempname�s
cCsdS(N((R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��scCs�t|j�}tjj|d�}||jk}|rS|jrS|j�}n�|j�d}tjj	|�}y:|r�tj
|�nt|d�j�tj
|�Wn!t
tfk
r�|j�nX|r�|jr�t|j���n|r)|jdkr2t||j�|_q2n	d|_tjjdd�jtj�}|tttd|��kr}t|_n1|jr�tjj	|�r�t|_d|_n||_dS(s;Verify that self.install_dir is .pth-capable dir, if neededseasy-install.pths.write-testtwt
PYTHONPATHR�N(RRbR6R7R�R�Rltcheck_pth_processingR�R8R�topentclosetOSErrortIOErrortcant_write_to_targetRtno_default_version_msgR�R_R.tenvirontgetR�tpathsepRtfilterRFR�(R�tinstdirR�tis_site_dirttestfilettest_existsR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s6	!	sS
        can't create or remove files in install directory

        The following error occurred while trying to add or remove files in the
        installation directory:

            %s

        The installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s
        s�
        This directory does not currently exist.  Please create it and try again, or
        choose a different installation directory (using the -d or --install-dir
        option).
        s�
        Perhaps your account does not have write access to this directory?  If the
        installation directory is a system-owned directory, you may need to sign in
        as the administrator or "root" account.  If you do not have administrative
        access to this machine, you may wish to choose a different installation
        directory, preferably one that is listed in your PYTHONPATH environment
        variable.

        For information on other options, you may wish to consult the
        documentation at:

          https://pythonhosted.org/setuptools/easy_install.html

        Please make the appropriate changes for your system and try again.
        cCsj|jtj�d|jf}tjj|j�sI|d|j7}n|d|j7}t	|��dS(Nis
(
t_easy_install__cant_write_msgR�texc_infoRbR6R7R8t_easy_install__not_exists_idt_easy_install__access_msgR(R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s
 cCs-|j}tjd|�|j�d}|d}tjj|�}y]|r^tj|�ntjj|�}tjj|�s�tj	|�nt
|d�}Wn!ttfk
r�|j
�nHXz�|jd|f�|j�d}tj}tjdkrbtjj|�\}}tjj|d�}	|j�dkrbtjj|	�rb|	}qbnd	d
lm}
|
|ddd
gd�tjj|�r�tjd|�tSWd|r�|j�ntjj|�r�tj|�ntjj|�rtj|�nX|js)tjd|�ntS(s@Empirically verify whether .pth files are supported in inst. dirs Checking .pth file support in %ss.pths.okR�s7import os; f = open(%r, 'w'); f.write('OK'); f.close()
R�spythonw.exes
python.exei����(tspawns-Es-ctpassis-TEST PASSED: %s appears to support .pth filesNs+TEST FAILED: %s does NOT support .pth files(RbR
R�R�R6R7R8R�tdirnametmakedirsR�R�R�RtwriteR�R_R�t
executableR�R�R�tlowertdistutils.spawnRRFRlR�RH(R�RR�tok_filet	ok_existsRRSRtbasenametaltR((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��sT	
	
	
	cCs�|jro|jd�roxS|jd�D]?}|jd|�rHq)n|j|||jd|��q)Wn|j|�dS(s=Write all the scripts for `dist`, unless scripts are excludedtscriptssscripts/N(Rdtmetadata_isdirtmetadata_listdirtinstall_scripttget_metadatatinstall_wrapper_scripts(R�R�tscript_name((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytinstall_egg_scripts2scCs|tjj|�rhxctj|�D]?\}}}x-|D]%}|jjtjj||��q8Wq"Wn|jj|�dS(N(R6R7R�twalkR�R�R�(R�R7tbasetdirstfilesR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
add_output@s

*cCs#|jrtd|f��ndS(NsjInvalid argument %r: you can't use filenames or URLs with --editable (except via the --find-links option).(RXR(R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytnot_editableHs	cCsW|js
dStjjtjj|j|j��rStd|j|jf��ndS(Ns2%r already exists in %s; can't do a checkout there(RXR6R7R8R�RgtkeyR(R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytcheck_editablePs	'cCs�tjdd�}d}|js.|j�nzYt|t�s�t|�r�|j|�|j	j
||�}|jd|||t�St
jj|�r�|j|�|jd|||t�St|�}n|j|�|j	j|||j|j|j|j�}|dkrDd|}|jr5|d7}nt|��nB|jtkrm|j|||d�|S|j||j||�SWdt
jj|�r�t|�nXdS(NRps
easy_install-s+Could not find suitable distribution for %rs2 (--always-copy skips system and development eggs)tUsing(ttempfiletmkdtempR_RXtinstall_site_pyR�R"RR'R�tdownloadtinstall_itemRFR6R7R8tparse_requirement_argR)tfetch_distributionRMRkR�Rt
precedenceR)tprocess_distributiontlocationR�(R�R�tdepsttmpdirR.R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR-Zs<	



	
	
cCs�|p|j}|p*tjj|�|k}|p@|jd�}|p||jdk	o|tjjt|��t|j�k}|r�|r�x4|j|j	D]}|j
|kr�Pq�q�Wt}ntj
dtjj|��|r!|j|||�}xP|D]}|j|||�qWn,|j|�g}|j||d|d�|dk	r}x!|D]}||kr`|Sq`WndS(Ns.eggs
Processing %siR*(RkR6R7RtendswithR�R_RR�tproject_nameR4RFR
R�Rtinstall_eggsR3tegg_distribution(R�R�R.R6R5tinstall_neededR�tdists((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR/�s.
	

cCsUt|}xDtD]<}d|}t||�dkrt||||�qqWdS(s=Sets the install directories by applying the install schemes.tinstall_N(RR	R�R_R�(R�R�tschemeR(tattrname((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s



cGs?|j|�|jj|�||j|jkrF|jj|�n|jj|�|j|�||j|j<tj	|j
|||��|jd�r�|jr�|jj
|jd��n|r�|jr�dS|dk	r|j|jkrtjd|�dS|dks#||krY|j�}|p8|}t|j|j|j�}ntj	d|�y(tg�j|g|j|j�}WnItk
r�}tt|���n%tk
r�}t|j���nX|js�|jr+x9|D].}|j|jkr�|j|j��q�q�Wntj	d|�dS(Nsdependency_links.txtsSkipping dependencies for %ssProcessing dependencies for %ss'Finished processing dependencies for %s( t
update_pthR�taddR�R(tremoveR!R�R
R�tinstallation_reportthas_metadataR�R�tget_metadata_linesRkR_R�tas_requirementR"R8tspecstextrasR&tresolveR-R'RtstrR(treportR�(R�trequirementR�R5R�tdistreqtdistrosRY((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR3�sF


	
cCsA|jdk	r|jS|jd�r*tS|jd�s=tStS(Nsnot-zip-safeszip-safe(R`R_RDRFRH(R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytshould_unzip�scCstjj|j|j�}tjj|�rSd}tj||j|j|�|Stjj|�rn|}n�tjj	|�|kr�tj
|�ntj|�}t|�dkr�tjj||d�}tjj|�r�|}q�nt
|�tj||�|S(Ns<%r already exists in %s; build directory %s will not be keptii(R6R7R�RgR(R8R
R�R�RR�tlistdirR�Rtshutiltmove(R�R�t
dist_filenamet
setup_basetdstR�tcontents((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
maybe_move�s"	
cCs>|jr
dSx*tj�j|�D]}|j|�q#WdS(N(RdtScriptWritertbesttget_argstwrite_script(R�R�Rh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s	cCspt|j��}t||�}|rS|j|�t�}tj|�|}n|j|t|�d�dS(s/Generate a legacy script wrapper and install itRTN(	RJRFtis_python_scriptt_load_templateR�RXt
get_headerR[RC(R�R�R tscript_texttdev_pathR�t	is_scripttbody((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRscCs=d}|r!|jdd�}ntd|�}|jd�S(s�
        There are a couple of template scripts in the package. This
        function loads one of them and prepares it for use.
        sscript.tmpls.tmpls (dev).tmplR�sutf-8(R�Rtdecode(R`R�t	raw_bytes((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR]s
ttc	Cs�|jg|D]}tjj|j|�^q
�tjd||j�tjj|j|�}|j|�t�}|j	s�t
|�tjj|�r�tj|�nt
|d|��}|j|�WdQXt|d|�ndS(s1Write an executable file to the scripts directorysInstalling %s script to %sR�Ni�(R�R6R7R�RcR
R�R&t
current_umaskR�RR8R�R�Rtchmod(	R�R RVtmodeR�RPttargettmaskRS((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR[s,
		
cCs�|j�jd�r(|j||�gS|j�jd�rP|j||�gS|}tjj|�r�|jd�r�t|||j�n'tjj	|�r�tjj
|�}n|j|�r�|jr�|dk	r�|j|||�}ntjj|d�}tjj|�s�ttjj|dd��}|s[tdtjj
|���nt|�dkr�tdtjj
|���n|d	}n|jr�tj|j||��gS|j||�SdS(
Ns.eggs.exes.pyssetup.pyR�s"Couldn't find a setup script in %sisMultiple setup scripts in %si(RR7tinstall_eggtinstall_exeR6R7tisfileRtunpack_progressR�tabspatht
startswithRgR_RWR�R8RRR�RXR
R�treport_editabletbuild_and_install(R�R�RSR6RTtsetup_scripttsetups((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR9,s8"
	cCs[tjj|�r3t|tjj|d��}nttj|��}tj	|d|�S(NsEGG-INFOtmetadata(
R6R7R�R$R�R%t	zipimporttzipimporterR#t
from_filename(R�tegg_pathRu((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR:Vs
cCstjj|jtjj|��}tjj|�}|jsLt|�n|j|�}t	||�stjj
|�r�tjj|�r�tj
|d|j�n2tjj|�r�|jtj|fd|�nyt}tjj
|�r*|j|�rtjd}}q�tjd}}ng|j|�rY|j|�|jd}}n8t}|j|�r�tjd}}ntjd}}|j|||f|dtjj|�tjj|�f�t|d|�Wqt|dt��qXn|j|�|j|�S(NR�s	Removing tMovingtCopyingt
Extractings	 %s to %stfix_zipimporter_caches(R6R7R�RbRRoR�RR:R,R�R�Rtremove_treeR8R�R�RHRpRQRRtcopytreeROtmkpathtunpack_and_compileRFtcopy2Rtupdate_dist_cachesR&(R�RyR6tdestinationR�tnew_dist_is_zippedRSRL((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRk^sH	
%
	

cCst|�}|dkr+td|��ntdd|jdd�d|jdd�dt��}tjj||j	�d�}|_
|d}tjj|d	�}tjj|d
�}t|�t||�|_
|j||�tjj|�s}t|d�}	|	jd�xU|jd�D]D\}
}|
d
kr(|	jd|
jdd�j�|f�q(q(W|	j�ntjj|d�}|jgtj|�D]}
tjj||
d�^q��tj||d|jd|j�|j||�S(Ns(%s is not a valid distutils Windows .exeR8RuR�R]tplatforms.eggs.tmpsEGG-INFOsPKG-INFOR�sMetadata-Version: 1.0
ttarget_versions%s: %s
t_t-RiR�R�(R/R_RR#RRR6R7R�tegg_nameR4RR$t	_providert
exe_to_eggR8R�RtitemsR�ttitleR�R�RXRZRtmake_zipfileR�R�Rk(R�RSR6tcfgR�Rytegg_tmpt	_egg_infotpkg_infRStktvRcRh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRl�s<


0
3cs�t|��g�g�i������fd�}t|�|�g}x��D]�}|j�jd�rV|jd�}|d}tj|d�d|d<tjj	�|�}�j
|�|j
|�tj||�qVqVW|j��tj
tjj	�d�tj�|��x�d
D]�}	t�|	r*tjj	�d|	d	�}
tjj|
�s�t|
d
�}|jdj	t�|	�d�|j�q�q*q*WdS(s;Extract a bdist_wininst to the directories an egg would usecsL|j�}x�D]\}}|j|�r||t|�}|jd�}tjj�|�}|j�}|jd�s�|jd�r�tj	|d�|d<d�tjj
|d�d<�j|�nI|jd�r|dkrd�tjj
|d�d<�j|�n|SqW|jd	�sHtj
d
|�ndS(Nt/s.pyds.dlli����iis.pysSCRIPTS/s.pthsWARNING: can't process %s(RRpR�R�R6R7R�R7Rtstrip_moduletsplitextR�R
R�R_(tsrcRURBtoldtnewtpartstdl(R�tnative_libstprefixest
to_compilet	top_level(sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytprocess�s$s.pydR�i����s.pysEGG-INFOR�R�s.txtR�s
N(R�R�(R1RRR7R�RR�R6R7R�R�t
write_stubtbyte_compiletwrite_safety_flagtanalyze_eggR�R8R�RR�(R�RSR�R�tstubstresR�tresourcetpyfileR�ttxtRS((R�R�R�R�R�sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s6






!s(
        Because this distribution was installed --multi-version, before you can
        import modules from this package in an application, you will need to
        'import pkg_resources' and then use a 'require()' call similar to one of
        these examples, in order to select the desired version:

            pkg_resources.require("%(name)s")  # latest installed version
            pkg_resources.require("%(name)s==%(version)s")  # this exact version
            pkg_resources.require("%(name)s>=%(version)s")  # this version or higher
        s�
        Note also that the installation directory must be on sys.path at runtime for
        this to work.  (e.g. by being the application's script directory, by being on
        PYTHONPATH, or by being added to sys.path by your code.)
        t	Installedc	Cs�d}|jr\|jr\|d|j7}|jtttj�kr\|d|j7}q\n|j	}|j
}|j}d}|t�S(s9Helpful installation message for display to package userss
%(what)s %(eggloc)s%(extras)ss
R�(
RlRqt_easy_install__mv_warningRbRRR�R7t_easy_install__id_warningR4R8R]R�(	R�treqR�twhatR�tegglocR�R]RH((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRC�s			sR
        Extracted editable version of %(spec)s to %(dirname)s

        If it uses setuptools in its setup script, you can activate it in
        "development" mode by going to that directory and running::

            %(python)s setup.py develop

        See the setuptools documentation for the "develop" command for more info.
        cCs-tjj|�}tj}d|jt�S(Ns
(R6R7RR�Rt_easy_install__editable_msgR�(R�R�RsRtpython((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRqs	cCstjjdt�tjjdt�t|�}|jdkrid|jd}|jdd|�n"|jdkr�|jdd�n|jr�|jdd	�nt	j
d
|t|�ddj|��yt
||�Wn-tk
r}td|jdf��nXdS(
Nsdistutils.command.bdist_eggsdistutils.command.egg_infoiR�iiR�s-qs-ns
Running %s %st sSetup script exited with %s(R�tmodulest
setdefaultRRR�R�R�R�R
R�R�R�RR�RRh(R�RsRTRhR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRs 	$c	Csddg}tjdddtjj|��}z�|jtjj|��|j|�|j|||�t|g�}g}x?|D]7}x.||D]"}|j|j	|j
|��q�Wq�W|r�|jr�tj
d|�n|SWdt|�tj|j�XdS(NRs
--dist-dirRps
egg-dist-tmp-tdirs+No eggs found in %s (setup script problem?)(R+R,R6R7Rt_set_fetcher_optionsR�RR!RkR4R�R
R�R�R�R�(	R�RsRTRhtdist_dirtall_eggsteggsR(R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRr.s$	

$	

c	Cs�|jjd�j�}d}i}xF|j�D]8\}}||krOq1n|d||jdd	�<q1Wtd|�}tjj|d
�}t	j
||�dS(
s
        When easy_install is about to run bdist_egg on a source dist, that
        source dist might have 'setup_requires' directives, requiring
        additional fetching. Ensure the fetcher options given to easy_install
        are available to that command as well.
        R-RfR�ReRiRniR�R�s	setup.cfgN(RfR�ReRiR�Rn(R�R�tcopyR�R�tdictR6R7R�Rtedit_config(	R�R#tei_optstfetch_directivest
fetch_optionsR(R�tsettingstcfg_filename((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�Fs	cCs�|jdkrdSx~|j|jD]l}|jsE|j|jkr$tjd|�|jj|�|j|jkr�|jj|j�q�q$q$W|js|j|jj	kr�tjd|�qtjd|�|jj
|�|j|jkr|jj|j�qn|js�|jj
�|jdkr�tjj|jd�}tjj|�rotj|�nt|d�}|j|jj|j�d�|j�q�ndS(Ns&Removing %s from easy-install.pth files4%s is already the active version in easy-install.pths"Adding %s to easy-install.pth fileR�ssetuptools.pthtwts
(R�R_R(RlR4R
R�RBR�tpathsRAR�R�tsaveR6R7R�RbR�R�R�Rt
make_relativeR�(R�R�ROR�RS((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR@^s4	
	
 cCstjd||�|S(NsUnpacking %s to %s(R
tdebug(R�R�RU((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRn�scs�g�g����fd�}t|||��j���js�x<�D]1}tj|�tjdBd@}t||�qNWndS(Ncs�|jd�r/|jd�r/�j|�n.|jd�sM|jd�r]�j|�n�j||��jr}|p�dS(Ns.pys	EGG-INFO/s.dlls.so(R7RpR�RnR�R_(R�RU(R�tto_chmodR�(sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytpf�simi�(RR�R�R6tstattST_MODERg(R�RyR�R�RSRh((R�R�R�sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s
	
cCs�tjr|jd�dSddlm}zetj|jd�||ddddd|j�|j	r�||d|j	ddd|j�nWdtj|j�XdS(	Ns%byte-compiling is disabled, skipping.i����(R�iRiitforceR�(
R�tdont_write_bytecodeR�tdistutils.utilR�R
R�R�R�Ri(R�R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	
	sw
        bad install directory or PYTHONPATH

        You are attempting to install a package to a directory that is not
        on PYTHONPATH and which Python does not read ".pth" files from.  The
        installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:

            %s

        and your PYTHONPATH environment variable currently contains:

            %r

        Here are some of your options for correcting the problem:

        * You can choose a different installation directory, i.e., one that is
          on PYTHONPATH or supports .pth files

        * You can add the installation directory to the PYTHONPATH environment
          variable.  (It must then also be on PYTHONPATH whenever you run
          Python and want to use the package(s) you are installing.)

        * You can set up the installation directory to support ".pth" files by
          using one of the approaches described here:

          https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

        Please make the appropriate changes for your system and try again.cCs)|j}||jtjjdd�fS(NR�R�(t_easy_install__no_default_msgRbR6RR(R�ttemplate((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s	cCs9|jr
dStjj|jd�}tdd�}d}tjj|�r�tjd|j�t	|d�}|j
�}tjr�|j
�}n|j�|jd�s�td	|��q�n||kr,tjd
|�|jst|�t	|d�}|j|�|j�n|j|g�nt|_dS(s8Make sure there's a site.py in the target dir, if neededNssite.pyR�s
site-patch.pyR�sChecking existing site.py in %strbs
def __boot():s;%s is not a setuptools-generated site.py; please remove it.sCreating %stwb(R�R6R7R�RbRR8R
R�R�treadRtPY3RcR�RpRR�R�RRR�RF(R�tsitepytsourcetcurrentRS((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR-�s2		
	


cCs�|js
dSttjjd��}xftj|j�D]R\}}|j|�r8tjj	|�r8|j
d|�tj|d�q8q8WdS(sCreate directories under ~.Nt~sos.makedirs('%s', 0o700)i�(R^RR6R7R�Rt	iteritemsR�RpR�tdebug_printR(R�thomeR�R7((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	"R�Rbs/$base/lib/python$py_version_short/site-packagesRcs	$base/bins$base/Lib/site-packagess
$base/ScriptscGs |jd�j}|jr�|j�}|j|d<|jjtj|j�}xH|j	�D]7\}}t
||d�dkr\t|||�q\q\Wnddl
m}xo|D]g}t
||�}|dk	r�|||�}tjdkrtjj|�}nt|||�q�q�WdS(NR�R#i����(RR�(tget_finalized_commandR�RpR�RRR6R�tDEFAULT_SCHEMER�R�R_R�R�RR7R�(R�R�R�R>R�R�R((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s 	

N(sprefix=Nsinstallation prefix(szip-okRKsinstall package as a zipfile(s
multi-versionRLs%make apps have to require() a version(RMRNs1force upgrade (searches PyPI for latest versions)(sinstall-dir=ROsinstall package to DIR(sscript-dir=RBsinstall scripts to DIR(sexclude-scriptsRPsDon't install scripts(salways-copyRQs'Copy all needed packages to install dir(s
index-url=RRs base URL of Python Package Index(sfind-links=RSs(additional URL(s) to search for packages(sbuild-directory=RTs/download/extract/build in DIR; keep the results(s	optimize=RUslalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](srecord=Ns3filename in which to record list of installed files(salways-unzipRVs*don't install as a zipfile, no matter what(s
site-dirs=RWs)list of directories where .pth files work(RXRYs+Install specified packages in editable form(sno-depsRZsdon't install dependencies(sallow-hosts=R[s$pattern(s) that hostnames must match(slocal-snapshots-okR\s(allow building eggs from local checkouts(R]Ns"print version information and exit(s
no-find-linksNs9Don't load find-links defined in packages being installed((Ot__name__t
__module__t__doc__tdescriptionRFtcommand_consumes_argumentsR_tuser_optionstboolean_optionsRzR{R~thelp_msgR�tnegative_optRR�R�R�R�tstaticmethodR�R�R�R�R�R�R�R�R�R�ttextwraptdedenttlstripR
RR
RR�R!R&R'R)RHR-R/R�R3RORWRRR]R[R9R:RkRlR�R�R�RCR�RqRRrR�R@RnR�R�R�RR-R�R�RR�R�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR-ks�		

	0				x									+			4				
+$		*				
	*		+	-	5								%					$	
	cCsgtjjdd�jtj�D]}|r"|^q"}tjg}tjtjkrk|jtj�nx,|D]$}|rrtj	dkr�|jtj
j|dd��n|tjdkr|j
tj
j|dd	tjd
 d�tj
j|dd�g�n%|j
|tj
j|dd�g�tj	dkr�d
|kr�tjjd�}|r�|jtj
j|ddtjd
 d��q�q�q�qrqrWtd�td�f}x*|D]"}||kr�|j|�q�q�Wtjr�|jtj�nttt|��}|S(NR�R�tos2emxtriscostLibs
site-packagesR�tlibR�issite-pythontdarwinsPython.frameworktHOMEtLibrarytPythontpurelibtplatlib(R�R�(R6RRR�RR�RpR�R�R�R7R�tseptextendR]RRzR{R~R�RR(t_ftsitedirsR�RpR�t	lib_pathstsite_lib((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�"sF+
"

	ccs^i}xQ|D]I}t|�}||kr1q
nd||<tjj|�sSq
ntj|�}||fVx�|D]�}|jd�s�qtn|dkr�qtnttjj||��}tt	|��}|j
�xw|D]o}|jd�s�t|j��}||krNd||<tjj|�s4q�n|tj|�fVqNq�q�WqtWq
WdS(sBYield sys.path directories that might contain "old-style" packagesis.pthseasy-install.pthssetuptools.pthtimportN(seasy-install.pthssetuptools.pth(
RR6R7R�RPR7R�R�R�RR�Rptrstrip(tinputstseenRR%R�RStlinestline((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytexpand_pathsQs4





c
Csyt|d�}zXtj|�}|dkr1dS|d|d|d}|dkr[dS|j|d�tjd|jd��\}}}|dkr�dS|j|d|�tj	id	d
6d	d6�}yT|j|�}|j
dd
�d}	|	jtj
��}	|jtj|	��Wntjk
r=dSX|jd�s^|jd�rbdS|SWd|j�XdS(snExtract configuration data from a bdist_wininst .exe

    Returns a configparser.RawConfigParser, or None
    R�i	iiis<iiiizV4i{V4R�R]R�siiRutSetupN(izV4i{V4(R�tzipfilet_EndRecDataR_tseekR3tunpackR�RtRawConfigParserR�RcR�tgetfilesystemencodingtreadfpRtStringIOtErrorthas_sectionR�(
RSRStendrect	prependedttagtcfglentbmlenR�tparttconfig((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR/zs4$ c
Cs�dddddg}tj|�}zqxj|j�D]\}|j}|jd�}t|�d	kr�|d
dkr�|djd
�r�|jddj|d
 �df�Pq�nt|�d
ks4|jd�r�q4n|jd�r�q4n|dj	�dkr4|j
|�}tjr+|j
�}nxbt|�D]Q}|j�jdd�}|jd�s8|jd|d|fdf�q8q8Wq4q4WWd|j�Xg|D]\}}	|j�|	f^q�}|j�|j�|S(s4Get exe->egg path translations for a given .exe filesPURELIB/R�sPLATLIB/pywin32_system32sPLATLIB/sSCRIPTS/sEGG-INFO/scripts/sDATA/lib/site-packagesR�iisPKG-INFOis	.egg-infois	EGG-INFO/s.pths
-nspkg.pthtPURELIBtPLATLIBs\R�s%s/%s/N(sPURELIB/R�(sPLATLIB/pywin32_system32R�(sPLATLIB/R�(sSCRIPTS/sEGG-INFO/scripts/(sDATA/lib/site-packagesR�(RR(RtZipFiletinfolistR�R�R�R7R�R�tupperR�RR�RcRR�R�RpR�R�Rtsorttreverse(
texe_filenameR�RKR�R�R�RVtpthRPty((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR1�s<		"#"	3+

cCs<ytj|�SWn$tk
r7td|f��nXdS(Ns1Not a URL, existing file, or requirement spec: %r(R"tparseR�R(R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR0�s

cBs\eZdZeZdd�Zd�Zd�Zed��Z	d�Z
d�Zd�ZRS(	s)A .pth file with Distribution paths in itcCs�||_ttt|��|_ttjj|j��|_|j	�t
j|gdd�x6t
|j�D]%}tt|jt|t���qoWdS(N(R�R�RRR�R6R7Rtbasedirt_loadR!t__init__R_RR�RAR RF(R�R�R�R7((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR"�s	
cCs�g|_t}tj|j�}tjj|j�r3t	|jd�}x�|D]�}|j
d�rpt}qOn|j�}|jj
|�|j�sO|j�j
d�r�qOnttjj|j|��}|jd<tjj|�s�||kr|jj�t|_qOnd||<qOW|j�n|jrO|rOt|_nx.|jr|jdj�r|jj�qRWdS(NtrtR�t#i����i(R�RHR�tfromkeysR�R6R7RmR�R�RpRFR�R�R�RR�R R8tpoptdirtyR�(R�t
saw_importR�RSRR7((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR!�s2	
"&
	
 cCs�|js
dStt|j|j��}|r�tjd|j�|j|�}dj	|�d}t
jj|j�r�t
j
|j�nt|jd��}|j|�WdQXn;t
jj|j�r�tjd|j�t
j
|j�nt|_dS(s$Write changed .pth file back to diskNs	Saving %ss
R�sDeleting empty %s(R'R�RR�R�R
R�R�t_wrap_linesR�R6R7R�R�R�RR8RH(R�t	rel_pathsRtdataRS((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	cCs|S(N((R((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR)scCsr|j|jko6|j|jkp6|jtj�k}|r^|jj|j�t|_ntj	||�dS(s"Add `dist` to the distribution mapN(
R4R�R�R6tgetcwdR�RFR'R!RA(R�R�tnew_path((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRAscCsIx2|j|jkr4|jj|j�t|_qWtj||�dS(s'Remove `dist` from the distribution mapN(R4R�RBRFR'R!(R�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRB's
cCs�tjjt|��\}}t|j�}|g}tjdkrKdpQtj}xut|�|kr�||jkr�|jtj	�|j
�|j|�Stjj|�\}}|j|�qWW|SdS(NR�(R6R7R�RR�R taltsepR�R�tcurdirRR�(R�R7tnpathtlasttbaselenR�R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�.s	

((
R�R�R�RHR'R"R!R�R�R)RARBR�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR.�s					tRewritePthDistributionscBs8eZed��Zd�Zed�Zed�ZRS(ccs*|jVx|D]}|VqW|jVdS(N(tpreludetpostlude(tclsRR((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR)@s
	cCstj|�j�jdd�S(Ns
s; (R�R�R�R�(ttext((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt<lambda>GR�s?
        import sys
        sys.__plen = len(sys.path)
        s�
        import sys
        new = sys.path[sys.__plen:]
        del sys.path[sys.__plen:]
        p = getattr(sys, '__egginsert', 0)
        sys.path[p:p] = new
        sys.__egginsert = p + len(new)
        (R�R�tclassmethodR)t_inlineR4R5(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR3>s		tSETUPTOOLS_SYS_PATH_TECHNIQUEtrewritecCs,ttjt�rtStjtjj��S(s_
    Return a regular expression based on first_line_re suitable for matching
    strings.
    (R�RtpatternRJtretcompileRc(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt_first_line_reZscCs}|tjkr8tjdkr8t|tj�||�Stj�\}}}tj	||d|dd||ff�dS(NR�iis %s %s(
R6RBR�RgR�tS_IWRITER�RRtreraise(tfunctargtexctettevR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
auto_chmodfs

cCs=t|�}t|tj�|r/t|�n
t|�dS(sa

    Fix any globally cached `dist_path` related data

    `dist_path` should be a path of a newly installed egg distribution (zipped
    or unzipped).

    sys.path_importer_cache contains finder objects that have been cached when
    importing data from the original distribution. Any such finders need to be
    cleared since the replacement distribution might be packaged differently,
    e.g. a zipped egg distribution might get replaced with an unzipped egg
    folder or vice versa. Having the old finders cached may then cause Python
    to attempt loading modules from the replacement distribution using an
    incorrect loader.

    zipimport.zipimporter objects are Python loaders charged with importing
    data packaged inside zip archives. If stale loaders referencing the
    original distribution, are left behind, they can fail to load modules from
    the replacement distribution. E.g. if an old zipimport.zipimporter instance
    is used to load data from a new zipped egg archive, it may cause the
    operation to attempt to locate the requested data in the wrong location -
    one indicated by the original distribution's zip archive directory
    information. Such an operation may then fail outright, e.g. report having
    read a 'bad local file header', or even worse, it may fail silently &
    return invalid data.

    zipimport._zip_directory_cache contains cached zip archive directory
    information for all existing zipimport.zipimporter instances and all such
    instances connected to the same archive share the same cached directory
    information.

    If asked, and the underlying Python implementation allows it, we can fix
    all existing zipimport.zipimporter instances instead of having to track
    them down and remove them one by one, by updating their shared cached zip
    archive directory information. This, of course, assumes that the
    replacement distribution is packaged as a zipped egg.

    If not asked to fix existing zipimport.zipimporter instances, we still do
    our best to clear any remaining zipimport.zipimporter related cached data
    that might somehow later get used when attempting to load data from the new
    distribution and thus cause such load operations to fail. Note that when
    tracking down such remaining stale data, we can not catch every conceivable
    usage from here, and we clear only those that we know of and have found to
    cause problems if left alive. Any remaining caches should be updated by
    whomever is in charge of maintaining them, i.e. they should be ready to
    handle us replacing their zip archives with new distributions at runtime.

    N(Rt_uncacheR�tpath_importer_cachet!_replace_zip_directory_cache_datat*_remove_and_clear_zip_directory_cache_data(t	dist_pathR}tnormalized_path((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�ns
<
cCsrg}t|�}xY|D]Q}t|�}|j|�r|||d!tjdfkr|j|�qqW|S(sp
    Return zipimporter cache entry keys related to a given normalized path.

    Alternative path spellings (e.g. those using different character case or
    those using alternative path separators) related to the same path are
    included. Any sub-path entries are included as well, i.e. those
    corresponding to zip archives embedded in other zip archives.

    iR�(R�RRpR6R�R�(RNtcachetresultt
prefix_lentptnp((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt"_collect_zipimporter_cache_entries�s

 cCs]xVt||�D]E}||}||=|o9|||�}|dk	r|||<qqWdS(s�
    Update zipimporter cache data for a given normalized path.

    Any sub-path entries are processed as well, i.e. those corresponding to zip
    archives embedded in other zip archives.

    Given updater is a callable taking a cache entry key and the original entry
    (after already removing the entry from the cache), and expected to update
    the entry and possibly return a new one to be inserted in its place.
    Returning None indicates that the entry should not be replaced with a new
    one. If no updater is given, the cache entries are simply removed without
    any additional processing, the same as if the updater simply returned None.

    N(RTR_(RNROtupdaterRRt	old_entryt	new_entry((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt_update_zipimporter_cache�s

cCst||�dS(N(RX(RNRO((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRI�scCs#d�}t|tjd|�dS(NcSs|j�dS(N(tclear(R7RV((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt2clear_and_remove_cached_zip_archive_directory_data�sRU(RXRvt_zip_directory_cache(RNRZ((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRL�s	t__pypy__cCs#d�}t|tjd|�dS(NcSs/|j�tj|�|jtj|�|S(N(RYRvRwtupdateR[(R7RV((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt)replace_cached_zip_archive_directory_data
s

RU(RXRvR[(RNR^((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRKs	
s<string>cCs7yt||d�Wnttfk
r.tSXtSdS(s%Is this string a valid Python script?texecN(R?tSyntaxErrort	TypeErrorRHRF(R7R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt	is_pythons
cCsVy1tj|dd��}|jd�}WdQXWnttfk
rK|SX|dkS(sCDetermine if the specified executable is a .sh (contains a #! line)tencodingslatin-1iNs#!(tioR�R�R�R�(Rtfptmagic((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytis_sh)scCstj|g�S(s@Quote a command line argument according to Windows parsing rules(t
subprocesstlist2cmdline(RD((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytnt_quote_arg3scCsb|jd�s|jd�r"tSt||�r5tS|jd�r^d|j�dj�kStS(sMIs this text, as a whole, a Python script? (as opposed to shell/bat/etc.
    s.pys.pyws#!R�i(R7RFRbRpt
splitlinesRRH(R_R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR\8s(RgcGsdS(N((Rh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt_chmodJscCsQtjd||�yt||�Wn&tjk
rL}tjd|�nXdS(Nschanging mode of %s to %oschmod failed: %s(R
R�RlR6terror(R7RhRY((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRgNs
tCommandSpeccBs�eZdZgZe�Zed��Zed��Zed��Z	ed��Z
ed��Zd�Ze
d��Zd�Ze
d	��ZRS(
sm
    A command spec for a #! header, specified as a list of arguments akin to
    those passed to Popen.
    cCs|S(sV
        Choose the best CommandSpec class based on environmental conditions.
        ((R6((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRY_scCs(tjjtj�}tjjd|�S(Nt__PYVENV_LAUNCHER__(R6R7R:R�RRR(R6t_default((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt_sys_executablefscCsOt||�r|St|t�r,||�S|dkrB|j�S|j|�S(sg
        Construct a CommandSpec from a parameter to build_scripts, which may
        be None.
        N(R�R�R_tfrom_environmenttfrom_string(R6tparam((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
from_paramks

cCs||j�g�S(N(Rq(R6((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRrzscCstj||j�}||�S(s}
        Construct a command spec from a simple string representing a command
        line parseable by shlex.split.
        (tshlexR�t
split_args(R6tstringR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRs~scCsMtj|j|��|_tj|�}t|�sIdg|jd*ndS(Ns-xi(RvR�t_extract_optionstoptionsRhRiRI(R�R_tcmdline((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytinstall_options�scCsQ|dj�d}t�j|�}|rA|jd�pDdnd}|j�S(sH
        Extract any options from the first line of the script.
        s
iiR�(RkR@tmatchtgroupR�(torig_scripttfirstR}Rz((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRy�s!cCs|j|t|j��S(N(t_renderR�Rz(R�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt	as_header�scCstj|�}d|dS(Ns#!s
(RhRi(R�R{((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s(R�R�R�RzR�RwR9RYRqRuRrRsR|R�RyR�R�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRnVs			
	tWindowsCommandSpeccBseZede�ZRS(R�(R�R�R�RHRw(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��sRXcBs�eZdZejd�j�ZeZe	ded��Ze	ded��Z
e	dd��Zed��Ze	d��Ze	d��Ze	d��Ze	d	dd
��ZRS(s`
    Encapsulates behavior around writing entry point scripts for console and
    gui apps.
    s6
        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
        __requires__ = %(spec)r
        import sys
        from pkg_resources import load_entry_point

        if __name__ == '__main__':
            sys.exit(
                load_entry_point(%(spec)r, %(group)r, %(name)r)()
            )
    cCsMtjdt�|rtntj�}|jd||�}|j||�S(NsUse get_argsR�(twarningsR�tDeprecationWarningtWindowsScriptWriterRXRYtget_script_headerRZ(R6R�Rtwininsttwritertheader((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytget_script_args�scCsNtjdt�|rd}n|jj�j|�}|j|�|j�S(NsUse get_headers
python.exe(R�R�R�tcommand_spec_classRYRuR|R�(R6R_RR�tcmd((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	
ccs�|dkr|j�}nt|j��}x�dD]�}|d}xn|j|�j�D]W\}}|j|�|jt�}|j	||||�}	x|	D]}
|
Vq�WqZWq4WdS(s�
        Yield write_script() argument tuples for a distribution's
        console_scripts and gui_scripts entry points.
        tconsoletguit_scriptsN(R�R�(
R_R^RJRFt
get_entry_mapR�t_ensure_safe_nameR�R�t_get_script_args(R6R�R�R�ttype_R~R�tepR_RhR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRZ�s

"

cCs+tjd|�}|r'td��ndS(s?
        Prevent paths in *_scripts entry point names.
        s[\\/]s+Path separators not allowed in script namesN(R>tsearchR�(R�thas_path_sep((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��scCs*tjdt�|r tj�S|j�S(NsUse best(R�R�R�R�RY(R6t
force_windows((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt
get_writer�scCs?tjdks-tjdkr7tjdkr7tj�S|SdS(sD
        Select the best ScriptWriter for this environment.
        twin32tjavaR�N(R�R�R6R�t_nameR�RY(R6((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRY�s-
ccs|||fVdS(N((R6R�R�R�R_((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��sR�cCs/|jj�j|�}|j|�|j�S(s;Create a #! line, getting options (if any) from script_text(R�RYRuR|R�(R6R_RR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR^�s
N(R�R�R�R�R�R�R�RnR�R9R_RHR�R�RZR�R�R�RYR�R^(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRX�s 
		
R�cBsYeZeZed��Zed��Zed��Zed��Ze	d��Z
RS(cCstjdt�|j�S(NsUse best(R�R�R�RY(R6((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�scCs2tdtd|�}tjjdd�}||S(sC
        Select the best ScriptWriter suitable for Windows
        RtnaturaltSETUPTOOLS_LAUNCHER(R�tWindowsExecutableLauncherWriterR6RR(R6t
writer_lookuptlauncher((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRYs
	c	cs�tdddd�|}|tjdj�jd�krRtjd|t�nddd	d
dddg}|j|�|j	||�}g|D]}||^q�}||||d
|fVdS(s For Windows, add a .py extensionR�s.pyaR�s.pywtPATHEXTt;sH%s not listed in PATHEXT; scripts will not be recognized as executables.s.pys
-script.pys.pycs.pyos.exeReN(
R�R6RRR�R�R�tUserWarningRBt_adjust_header(	R6R�R�R�R_textR�RPR�((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s"	
cCsud}d}|dkr(||}}ntjtj|�tj�}|jd|d|�}|j|�rq|S|S(s�
        Make sure 'pythonw' is used for gui and and 'python' is used for
        console (regardless of what sys.executable is).
        spythonw.exes
python.exeR�Rxtrepl(R>R?tescapet
IGNORECASEtsubt_use_header(R6R�torig_headerR=R�t
pattern_obt
new_header((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�(scCs/|dd!jd�}tjdkp.t|�S(s�
        Should _adjust_header use the replaced header?

        On non-windows systems, always use. On
        Windows systems, only use the replaced header if it resolves
        to an executable on the system.
        ii����t"R�(R�R�R�R
(R�tclean_header((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�6s	(R�R�R�R�R9R�RYR�R�R�R�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�s

R�cBseZed��ZRS(ccs�|dkr$d}d}dg}nd}d}dddg}|j||�}g|D]}	||	^qX}
||||d	|
fV|d
t|�dfVt�s�|d}|t|�d	fVnd
S(sG
        For Windows, add a .py extension and an .exe launcher
        R�s-script.pyws.pywtclis
-script.pys.pys.pycs.pyoRes.exeRTs
.exe.manifestN(R�tget_win_launcherR5tload_launcher_manifest(R6R�R�R�R_t
launcher_typeR�R�thdrRPR�tm_name((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�Ds	
(R�R�R9R�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�CscCstd|}tj�j�dkr7|jdd�}nt�rU|jdd�}n|jdd�}td|�S(s�
    Load the Windows launcher (executable) suitable for launching a script.

    `type` should be either 'cli' or 'gui'

    Returns the executable as a byte string.
    s%s.exetarmt.s-arm.s-64.s-32.R�(R�tmachineRR�R5R(ttypetlauncher_fn((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�gs
	cCs>tjtd�}tjr&|t�S|jd�t�SdS(Nslauncher manifest.xmlsutf-8(t
pkg_resourcesRR�RtPY2tvarsRc(R�tmanifest((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR�ys	cCst|rd�}n|dkr*d�}ng}ytj|�}Wn-tjk
rr|tj|tj��nXx�|D]�}tjj||�}ytj|�j	}Wntjk
r�d}nXt
j|�r�t|||�qzytj
|�Wqztjk
r*|tj
|tj��qzXqzWytj|�Wn-tjk
ro|tj|tj��nXdS(s�Recursively delete a directory tree.

    This code is taken from the Python 2.4 version of 'shutil', because
    the 2.3 version doesn't really work right.
    cWsdS(N((Rh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pytonerror�scWs�dS(N((Rh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��siN(R_R6RPRmR�RR7R�tlstattst_modeR�tS_ISDIRR�RBtrmdir(R7t
ignore_errorsR�tnamesR�tfullnameRh((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s2

!cCs tjd�}tj|�|S(Ni(R6tumask(ttmp((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyRf�s
cCsMddl}tjj|jd�}|tjd<tjj|�t�dS(Ni����i(	R�R6R7Rt__path__R�targvR�R0(R�targv0((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt	bootstrap�s

cs�ddlm}ddlm�d�f�fd��Y}|dkrXtjd}nt��;|ddd	d
g|dtjdp�d	d
||�WdQXdS(Ni����(tsetup(R#tDistributionWithoutHelpCommandscseZdZ�fd�ZRS(R�cs't���j|||�WdQXdS(N(t_patch_usaget
_show_help(R�Rhtkw(R#(sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s
(R�R�tcommon_usageR�((R#(sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��sitscript_argss-qR-s-vR it	distclass(R�R�tsetuptools.distR#R_R�R�R�(R�R�R�R�((R#sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR0�s
c#seddl}tjd�j���fd�}|jj}||j_z	dVWd||j_XdS(Ni����se
        usage: %(script)s [options] requirement_or_url ...
           or: %(script)s --help
        cs�tdtjj|��S(Ntscript(R�R6R7R(R (tUSAGE(sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt	gen_usage�s	(tdistutils.coreR�R�R�tcoreR�(R�R�tsaved((R�sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyR��s	(�R�RR�RRRtdistutils.errorsRRRRtdistutils.command.installRR	R�R
Rtdistutils.command.build_scriptsRRR
R�R6RvRQR+RR>R�R�R�R�R�RzR3t
contextlibRhRvRdtsetuptools.externRtsetuptools.extern.six.movesRRR�Rtsetuptools.sandboxRtsetuptools.py31compatRRtsetuptools.commandRtsetuptools.archive_utilRtsetuptools.package_indexRRRRR�RRRRRR R!R"R#R$R%R&R'R(R)tfilterwarningst
PEP440Warningt__all__R5R,R�RCRIR-R�RR/R1R0R.R3RRR@RHR�RTR_RXRIRLtbuiltin_module_namesRKRbRgRjR\RgRltImportErrorR�RnRqtsys_executableR�tobjectRXR�R�R�R�R�R�RHR�RfR�R0tcontextmanagerR�(((sP/opt/alt/python27/lib/python2.7/site-packages/setuptools/command/easy_install.pyt<module>s�"d		
				�����	/	)	)	&		l				R	 				
	
		

	J^> 				$		


Zerion Mini Shell 1.0