eaiovnaovbqoebvqoeavibavo  fc@sddlmZddlmZddlmZmZddlZddlZddl Z ddl m Z ddl m Z mZmZddlmZddlmZddlZd ejefd YZd efd YZdS( i(t convert_path(tlog(tDistutilsErrortDistutilsOptionErrorN(tsix(t Distributiont PathMetadatatnormalize_path(t easy_install(t namespacestdevelopcBseZdZdZejddgZejdgZeZ dZ dZ d Z e d Zd Zd Zd ZdZRS(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|jn |j|jdS(N(R tTruet 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.(tNoneR tegg_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 j t j d|jd}t jj|j||_|j|_|jdkrt jj|j|_nt|j}tt jj|j|j}||kr9td|nt|t|t jj|jd|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_basedirst expand_dirst package_indextscantglobtostpathtjoint install_dirtegg_linktegg_baseRRtabspathRRRRtdistt_resolve_setup_pathR(RteittemplateR t egg_link_fnttargetR((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR!.s<        cCs|jtjdjd}|tjkrGd|jdd}nttjj|||}|ttjkrt d|ttjn|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/XscCstjrt|jdtr|jddd|jd|jd}t|j }|jdd||jd|jddd|jd|jd}||_ ||j _ t ||j|j _n-|jd|jddd|jd|jtjr7|jtjdt_n|jtjd |j|j|jst|jd "}|j|j d |jWdQXn|jd|j |j dS( Ntuse_2to3tbuild_pytinplaceiRR,t build_extisCreating %s (link to %s)tws ( RtPY3tgetattrt distributiontFalsetreinitialize_commandt run_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            $cCstjj|jrtjd|j|jt|j}g|D]}|j^qD}|j ||j g|j |j gfkrtj d|dS|j stj|jqn|j s|j|jn|jjrtj dndS(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.pyRs     cCs||jk rtj||S|j|x~|jjp>gD]j}tjjt |}tjj |}t j |}|j }WdQX|j||||q?WdS(N(R.Rtinstall_egg_scriptstinstall_wrapper_scriptsRCR]R'R(R-RtbasenametioRPtreadtinstall_script(RR.t script_namet script_pathtstrmt script_text((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRas cCst|}tj||S(N(tVersionlessRequirementRRb(RR.((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRbs (R R 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__t descriptionRt user_optionsRtboolean_optionsRDtcommand_consumes_argumentsRRR!t staticmethodR/RRRaRb(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyR s   * /  RkcBs)eZdZdZdZdZRS(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_requirements(RlRmRnRuRwRx(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyRks   (tdistutils.utilRt distutilsRtdistutils.errorsRRR'R&Rdtsetuptools.externRt pkg_resourcesRRRtsetuptools.command.easy_installRRKR tDevelopInstallerR tobjectRk(((s>/usr/lib/python2.7/site-packages/setuptools/command/develop.pyts