ó
ÓnùWc           @   st   d  d l  m Z d  d l m Z d  d l m Z m Z d  d l Z d  d l Z d  d l	 Z	 d e f d „  ƒ  YZ
 d S(   iÿÿÿÿ(   t   Command(   t   unpack_archive(   t   logt   dir_utilNt   install_egg_infoc           B   s\   e  Z d  Z d  Z d g Z d „  Z d „  Z d „  Z d „  Z d „  Z	 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(    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   initialize_options   s    c         C   s   |  j  d d ƒ |  j d ƒ } t j d  d  | j | j ƒ j ƒ  d } | j |  _ t	 j
 j |  j | ƒ |  _ |  j 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(    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   finalize_options   s    c         C   sè   |  j  d ƒ |  j } t j j |  j ƒ r] t j j |  j ƒ r] t j |  j d |  j ƒn; t j j	 |  j ƒ r˜ |  j
 t j |  j f d |  j ƒ n  |  j s´ t j |  j ƒ n  |  j
 |  j d d |  j |  j f ƒ |  j ƒ  d  S(   NR   t   dry_runs	   Removing s   Copying %s to %s(    (   t   run_commandR   R   R   t   isdirt   islinkR   t   remove_treeR   t   existst   executet   unlinkR   t   ensure_directoryt   copytreeR   t   install_namespaces(   R   R   (    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   run   s    	+&	c         C   s   |  j  S(   N(   R   (   R   (    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   get_outputs*   s    c            s)   ‡  f d †  } t  ˆ  j ˆ  j | ƒ d  S(   Nc            s[   x1 d D]) } |  j  | ƒ s, d | |  k r d  Sq Wˆ  j j | ƒ t j 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   (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   skimmer/   s    (   R   R   R   (   R   R/   (    (   R   sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyR$   -   s    
c         C   s   |  j  ƒ  } | s d  St j j |  j ƒ \ } } | d 7} |  j j | ƒ t j d | ƒ |  j	 sü t
 | d ƒ } xy | D]q } t | ƒ } t | j d ƒ ƒ } d } d | k r× d d j | d  ƒ | d f } n  | j d t ƒ  ƒ qz W| j ƒ  n  d  S(	   Ns
   -nspkg.pths   Installing %st   wtt   .s   
s(   ; m and setattr(sys.modules[%r], %r, m)
iÿÿÿÿs7  import 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_packagesR   R   t   splitextR   R   R*   R   t   infoR   t   opent   strt   tuplet   splitR   t   writet   localst   close(   R   t   nspt   filenamet   extt   ft   pkgt   ptht   trailer(    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyR%   S   s(     
 	!c         C   sv   i  } xS |  j  j p g  D]? } | j d ƒ } x' | rW d | d j | ƒ <| j ƒ  q1 Wq Wt | ƒ } | j ƒ  | S(   NR1   i   (   t   distributiont   namespace_packagesR8   R   t   popt   listt   sort(   R   R<   R@   (    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyR2   r   s    	
(   s   install-dir=R   s   directory to install to(   t   __name__t
   __module__t   __doc__t   descriptiont   user_optionsR	   R   R&   R'   R$   R%   R2   (    (    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyR      s   			
			&	(   t
   setuptoolsR    t   setuptools.archive_utilR   t	   distutilsR   R   R   t   shutilR   R   (    (    (    sJ   /var/www/html/venv/build/setuptools/setuptools/command/install_egg_info.pyt   <module>   s   $