ó b-äQc@stddlmZddlmZddlmZmZddlZddlZddl Z defd„ƒYZ dS(iÿÿÿÿ(tCommand(tunpack_archive(tlogtdir_utilNtinstall_egg_infocBs\eZdZdZd gZd„Zd„Zd„Zd„Zd„Z 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|jƒjƒd}|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|jƒr]tjj|jƒ r]tj|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_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†}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(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 süt |dƒ}xy|D]q}t |ƒ}t |j dƒƒ}d}d|kr×ddj|d ƒ|df}n|jdtƒƒqzW|jƒndS( Ns -nspkg.pths Installing %stwtt.s s(; m and setattr(sys.modules[%r], %r, m) iÿÿÿÿs7import 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|ƒ<|jƒq1WqWt|ƒ}|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$