b-Qc@stddlmZddlmZddlmZmZddlZddlZddl Z defdYZ dS(i(tCommand(tunpack_archive(tlogtdir_utilNtinstall_egg_infocBs\eZdZdZd gZdZdZdZdZdZ d Z d Z RS( s.Install an .egg-info directory for the packages install-dir=tdsdirectory to install tocCs d|_dS(N(tNonet install_dir(tself((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytinitialize_optionsscCs|jdd|jd}tjdd|j|jjd}|j|_t j 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((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytfinalize_optionss cCs|jd|j}tjj|jr]tjj|j r]tj|jd|jn;tjj |jr|j tj |jfd|jn|jst j |jn|j |jdd|j|jf|jdS(NR tdry_runs Removing sCopying %s to %s((t run_commandRRRtisdirtislinkRt remove_treeRtexiststexecutetunlinkRtensure_directorytcopytreeRtinstall_namespaces(RR((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytruns  +& cCs|jS(N(R(R((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyt get_outputs*scs)fd}tjj|dS(Ncs[x1dD])}|j|s,d||krdSqWjj|tjd|||S(Ns.svn/sCVS/t/sCopying %s to %s(s.svn/sCVS/(t startswithRRtappendRtdebug(tsrctdsttskip(R(sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pytskimmer/s  (RRR(RR/((RsG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR$-s cCs|j}|sdStjj|j\}}|d7}|jj|tjd||j st |d}xy|D]q}t |}t |j d}d}d|krddj|d |df}n|jdtqzW|jndS( Ns -nspkg.pths Installing %stwtt.s s(; m and setattr(sys.modules[%r], %r, m) is7import sys,types,os; p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r); ie = os.path.exists(os.path.join(p,'__init__.py')); m = not ie and sys.modules.setdefault(%(pkg)r,types.ModuleType(%(pkg)r)); mp = (m or []) and m.__dict__.setdefault('__path__',[]); (p not in mp) and mp.append(p)%(trailer)s(t_get_all_ns_packagesRRtsplitextRRR*RtinfoRtopentstrttupletsplitRtwritetlocalstclose(Rtnsptfilenametexttftpkgtpthttrailer((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR%Ss(      !cCsvi}xS|jjpgD]?}|jd}x'|rWd|dj|<|jq1WqWt|}|j|S(NR1i(t distributiontnamespace_packagesR8Rtpoptlisttsort(RR<R@((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyR2rs   (s install-dir=Rsdirectory to install to( t__name__t __module__t__doc__t descriptiont user_optionsR RR&R'R$R%R2(((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyRs     & ( t setuptoolsRtsetuptools.archive_utilRt distutilsRRRtshutilRR(((sG/usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyts$