Ñò
6»‚Uc           @   sh   d  d k  l Z l Z d  d k Z d  d k l Z d  d k l Z d  d k Z d e f d „  ƒ  YZ	 d S(   iÿÿÿÿ(   t   logt   dir_utilN(   t   Command(   t   unpack_archivet   install_egg_infoc           B   sw   e  Z d  Z d  Z d g Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d Z d Z e d „  ƒ Z d „  Z RS(   s.   Install an .egg-info directory for the packages   install-dir=t   ds   directory to install toc         C   s   d  |  _ d  S(   N(   t   Nonet   install_dir(   t   self(    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   initialize_options   s    c         C   s   |  i  d d ƒ |  i d ƒ } t i d  d  | i | i ƒ i ƒ  d } | i |  _ t	 i
 i |  i | ƒ |  _ |  i g |  _ d  S(   Nt   install_libR   t   egg_infos	   .egg-info(   s   install_dirs   install_dir(   t   set_undefined_optionst   get_finalized_commandt   pkg_resourcest   DistributionR   t   egg_namet   egg_versionR   t   sourcet   ost   patht   joinR   t   targett   outputs(   R   t   ei_cmdt   basename(    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   finalize_options   s    	c         C   sæ   |  i  d ƒ t i i |  i ƒ o4 t i i |  i ƒ o t i |  i d |  i ƒn> t i i	 |  i ƒ o' |  i
 t i |  i f d |  i ƒ n |  i p t i |  i ƒ n |  i
 |  i d d |  i |  i f ƒ |  i ƒ  d  S(   NR   t   dry_runs	   Removing s   Copying %s to %s(    (   t   run_commandR   R   t   isdirR   t   islinkR   t   remove_treeR   t   existst   executet   unlinkR   t   ensure_directoryt   copytreeR   t   install_namespaces(   R   (    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   run    s    -'
 c         C   s   |  i  S(   N(   R   (   R   (    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   get_outputs-   s    c            s)   ‡  f d †  } t  ˆ  i ˆ  i | ƒ d  S(   Nc            s^   x4 d D], } |  i  | ƒ p d | |  j o d  Sq Wˆ  i i | ƒ t i d |  | ƒ | S(   Ns   .svn/s   CVS/t   /s   Copying %s to %s(   s   .svn/s   CVS/(   t
   startswithR   R   t   appendR    t   debug(   t   srct   dstt   skip(   R   (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   skimmer2   s     !	(   R   R   R   (   R   R/   (    (   R   sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyR$   0   s    c         C   sÅ   |  i  ƒ  } | p d  St i i |  i ƒ \ } } | d 7} |  i i | ƒ t i d | ƒ t	 |  i
 | ƒ } |  i o t | ƒ d  St | d ƒ i i ƒ  } z | ~ } | i | ƒ Wd  QXd  S(   Ns
   -nspkg.pths   Installing %st   wt(   t   _get_all_ns_packagesR   R   t   splitextR   R   R*   R    t   infot   mapt   _gen_nspkg_lineR   t   listt   opent   __exit__t	   __enter__t
   writelines(   R   t   nspt   filenamet   extt   linest   _[1]t   f(    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyR%   ?   s    


&s   import sys, types, oss@   p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)s2   ie = os.path.exists(os.path.join(p,'__init__.py'))sI   m = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))s7   mp = (m or []) and m.__dict__.setdefault('__path__',[])s   (p not in mp) and mp.append(p)s4   m and setattr(sys.modules[%(parent)r], %(child)r, m)c         C   sr   t  | ƒ } t | i d ƒ ƒ } |  i } | i d ƒ \ } } } | o | |  i 7} n d i | ƒ t ƒ  d S(   Nt   .t   ;s   
(   t   strt   tuplet   splitt   _nspkg_tmplt
   rpartitiont   _nspkg_tmpl_multiR   t   locals(   t   clst   pkgt   ptht
   tmpl_linest   parentt   sept   child(    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyR5   a   s    	c         C   so   t  ƒ  } xY |  i i p g  D]D } | i d ƒ } x, | o$ | i d i | ƒ ƒ | i ƒ  q5 Wq Wt | ƒ S(   s,   Return sorted list of all package namespacesRA   (   t   sett   distributiont   namespace_packagesRE   t   addR   t   popt   sorted(   R   R;   RK   (    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyR1   l   s    	  (   s   install-dir=R   s   directory to install to(   s   import sys, types, oss@   p = os.path.join(sys._getframe(1).f_locals['sitedir'], *%(pth)r)s2   ie = os.path.exists(os.path.join(p,'__init__.py'))sI   m = not ie and sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))s7   mp = (m or []) and m.__dict__.setdefault('__path__',[])s   (p not in mp) and mp.append(p)(   s4   m and setattr(sys.modules[%(parent)r], %(child)r, m)(   t   __name__t
   __module__t   __doc__t   descriptiont   user_optionsR	   R   R&   R'   R$   R%   RF   RH   t   classmethodR5   R1   (    (    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyR   	   s$   							     (
   t	   distutilsR    R   R   t
   setuptoolsR   t   setuptools.archive_utilR   R   R   (    (    (    sG   /usr/lib/python2.6/site-packages/setuptools/command/install_egg_info.pyt   <module>   s
   