ok

Mini Shell

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

�
�fc@s�ddlmZddlmZddlmZmZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZddlmZddlmZddlZd	ejefd
��YZdefd��YZdS(
i����(tconvert_path(tlog(tDistutilsErrortDistutilsOptionErrorN(tsix(tDistributiontPathMetadatatnormalize_path(teasy_install(t
namespacestdevelopcBs�eZdZdZejddgZejdgZeZ	d�Z
d�Zd	�Ze
d
��Zd�Zd�Zd
�Zd�ZRS(sSet up package for developments%install package in 'development mode't	uninstalltusUninstall this source packages	egg-path=s-Set the path to be used in the .egg-link filecCsA|jr)t|_|j�|j�n
|j�|j�dS(N(RtTruet
multi_versiontuninstall_linktuninstall_namespacestinstall_for_developmenttwarn_deprecated_options(tself((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pytruns		


cCs5d|_d|_tj|�d|_d|_dS(Nt.(tNoneRtegg_pathRtinitialize_optionst
setup_pathtalways_copy_from(R((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR's
		
	cCs�|jd�}|jrCd}|j|jf}t||��n|jg|_tj|�|j�|j	�|j
jtjd��|jd}t
jj|j|�|_|j|_|jdkr�t
jj|j�|_nt|j�}tt
jj|j|j��}||kr9td|��nt|t|t
jj|j��d|j�|_|j|j|j|j�|_dS(Ntegg_infos-Please rename %r to %r before using 'develop's*.eggs	.egg-linksA--egg-path must be a relative path from the install directory to tproject_name(tget_finalized_commandtbroken_egg_infoRRtegg_nametargsRtfinalize_optionstexpand_basedirstexpand_dirst
package_indextscantglobtostpathtjointinstall_dirtegg_linktegg_baseRRtabspathRRRRtdistt_resolve_setup_pathR(RteittemplateR tegg_link_fnttargetR((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR!.s<	




cCs�|jtjd�jd�}|tjkrGd|jd�d}nttjj|||��}|ttj�kr�t	d|ttj���n|S(s�
        Generate a path from egg_base back to '.' where the
        setup script resides and ensure that path points to the
        setup path from $install_dir/$egg_path.
        t/s../isGCan't get a consistent path to setup script from installation directory(
treplaceR'tseptrstriptcurdirtcountRR(R)R(R,R*Rt
path_to_setuptresolved((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR/XscCs�tjr�t|jdt�r�|jddd�|jd�|jd�}t|j	�}|jdd|�|jd�|jddd�|jd�|jd�}||_
||j_t
||j�|j_n-|jd�|jddd�|jd�|j�tjr7|jtj�dt_n|j�tjd	|j|j�|js�t|jd
��"}|j|j
d|j�WdQXn|jd|j|j�dS(Ntuse_2to3tbuild_pytinplaceiRR,t	build_extisCreating %s (link to %s)tws
( RtPY3tgetattrtdistributiontFalsetreinitialize_commandtrun_commandRRt	build_libRR.tlocationRRt	_providertinstall_site_pyt
setuptoolstbootstrap_install_fromRRtinstall_namespacesRtinfoR+R,tdry_runtopentwriteRtprocess_distributiontno_deps(Rtbpy_cmdt
build_pathtei_cmdtf((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRks4


	


	
	$cCs�tjj|j�r�tjd|j|j�t|j�}g|D]}|j�^qD}|j	�||j
g|j
|jgfkr�tjd|�dS|j
s�tj|j�q�n|j
s�|j|j�n|jjr�tjd�ndS(NsRemoving %s (link to %s)s$Link points to %s: uninstall aborteds5Note: you must uninstall or replace scripts manually!(R'R(texistsR+RRNR,RPR7tcloseRRtwarnROtunlinkt
update_pthR.RCtscripts(Rt
egg_link_filetlinetcontents((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR�s
		cCs�||jk	rtj||�S|j|�x~|jjp>gD]j}tjjt	|��}tjj
|�}tj|��}|j
�}WdQX|j||||�q?WdS(N(R.Rtinstall_egg_scriptstinstall_wrapper_scriptsRCR]R'R(R-RtbasenametioRPtreadtinstall_script(RR.tscript_nametscript_pathtstrmtscript_text((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRa�s
cCst|�}tj||�S(N(tVersionlessRequirementRRb(RR.((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRb�s(RRsUninstall this source packageN(s	egg-path=Ns-Set the path to be used in the .egg-link file(t__name__t
__module__t__doc__tdescriptionRtuser_optionsRtboolean_optionsRDtcommand_consumes_argumentsRRR!tstaticmethodR/RRRaRb(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR
s
				*	/		RkcBs)eZdZd�Zd�Zd�ZRS(sz
    Adapt a pkg_resources.Distribution to simply return the project
    name as the 'requirement' so that scripts will work across
    multiple versions.

    >>> dist = Distribution(project_name='foo', version='1.0')
    >>> str(dist.as_requirement())
    'foo==1.0'
    >>> adapted_dist = VersionlessRequirement(dist)
    >>> str(adapted_dist.as_requirement())
    'foo'
    cCs
||_dS(N(t_VersionlessRequirement__dist(RR.((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyt__init__�scCst|j|�S(N(RBRt(Rtname((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyt__getattr__�scCs|jS(N(R(R((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pytas_requirement�s(RlRmRnRuRwRx(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRk�s		(tdistutils.utilRt	distutilsRtdistutils.errorsRRR'R&Rdtsetuptools.externRt
pkg_resourcesRRRtsetuptools.command.easy_installRRKR	tDevelopInstallerR
tobjectRk(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyt<module>s�

Zerion Mini Shell 1.0