ó G_Tc@shddlmZmZddlZddlmZddlmZddlZdefd„ƒYZ dS(i˙˙˙˙(tlogtdir_utilN(tCommand(tunpack_archivetinstall_egg_infocBsweZdZdZdgZd„Zd„Zd„Zd„Zd„Z d „Z dZ dZ e d„ƒZd„ZRS(s.Install an .egg-info directory for the packages install-dir=tdsdirectory to install tocCs d|_dS(N(tNonet install_dir(tself((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytinitialize_optionsscCs{|jddƒ|jdƒ}tjdd|j|jƒjƒd}|j|_t j j |j |ƒ|_ g|_dS(Nt install_libRtegg_infos .egg-info(s install_dirs install_dir(tset_undefined_optionstget_finalized_commandt pkg_resourcest DistributionRtegg_namet egg_versionR tsourcetostpathtjoinRttargettoutputs(Rtei_cmdtbasename((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytfinalize_optionss  cCsß|jdƒtjj|jƒrTtjj|jƒ rTtj|jd|jƒn;tjj |jƒr|j tj |jfd|jƒn|jsŤt j |jƒn|j |jdd|j|jfƒ|jƒdS(NR tdry_runs Removing sCopying %s to %s((t run_commandRRtisdirRtislinkRt remove_treeRtexiststexecutetunlinkRtensure_directorytcopytreeRtinstall_namespaces(R((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytrun s +&  cCs|jS(N(R(R((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyt get_outputs-scs)‡fd†}tˆjˆj|ƒdS(Ncs[x1dD])}|j|ƒs,d||krdSqWˆjj|ƒtjd||ƒ|S(Ns.svn/sCVS/t/sCopying %s to %s(s.svn/sCVS/(t startswithRRtappendRtdebug(tsrctdsttskip(R(sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytskimmer2s  (RRR(RR/((RsM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR$0s cCs­|jƒ}|sdStjj|jƒ\}}|d7}|jj|ƒtjd|ƒt |j |ƒ}|j r„t |ƒdSt |dƒ}|j|ƒWdQXdS(Ns -nspkg.pths Installing %stwt(t_get_all_ns_packagesRRtsplitextRRR*Rtinfotmapt_gen_nspkg_lineRtlisttopent writelines(Rtnsptfilenametexttlinestf((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR%?s    simport sys, types, oss@p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)s2ie = os.path.exists(os.path.join(p,'__init__.py'))sIm = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))s7mp = (m or []) and m.__dict__.setdefault('__path__',[])s(p not in mp) and mp.append(p)s4m and setattr(sys.modules[%(parent)r], %(child)r, m)cCspt|ƒ}t|jdƒƒ}|j}|jdƒ\}}}|rX||j7}ndj|ƒtƒdS(Nt.t;s (tstrttupletsplitt _nspkg_tmplt rpartitiont_nspkg_tmpl_multiRtlocals(tclstpkgtptht tmpl_linestparenttseptchild((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR5as  cCsltƒ}xV|jjpgD]B}|jdƒ}x*|r]|jdj|ƒƒ|jƒq4WqWt|ƒS(s,Return sorted list of all package namespacesR>(tsett distributiontnamespace_packagesRBtaddRtpoptsorted(RR9RH((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR1ls  (s install-dir=Rsdirectory to install to(simport sys, types, oss@p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)s2ie = os.path.exists(os.path.join(p,'__init__.py'))sIm = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))s7mp = (m or []) and m.__dict__.setdefault('__path__',[])s(p not in mp) and mp.append(p)(s4m and setattr(sys.modules[%(parent)r], %(child)r, m)(t__name__t __module__t__doc__t descriptiont user_optionsR RR&R'R$R%RCREt classmethodR5R1(((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR s$      ( t distutilsRRRt setuptoolsRtsetuptools.archive_utilRRR(((sM/usr/local/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyts