ó
¸ïìXc           @   sŠ   d  d l  m Z m Z d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l
 Z
 d e j e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   logt   dir_utilN(   t   Command(   t
   namespaces(   t   unpack_archivet   install_egg_infoc           B   sJ   e  Z d  Z d  Z d	 g 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  |  _ d  |  _ d  S(   N(   t   Nonet   install_dirt   install_layoutt   prefix_option(   t   self(    (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyt   initialize_options   s    		c         C   s<  |  j  d d ƒ |  j  d d ƒ t j d k rB |  j  d d ƒ n  |  j d ƒ } t j d  d  | j | j ƒ j ƒ  d } |  j	 rÔ |  j	 j
 ƒ  d k r¦ t d
 ƒ ‚ n  |  j	 j
 ƒ  |  _	 | j d t j d ƒ } n4 |  j sd t j k rï n | j d t j d ƒ } | j |  _ t j j |  j | ƒ |  _ g  |  _ d  S(   Nt   install_libR   t   installR	   i  R
   t   egg_infos	   .egg-infot   debs"   unknown value for --install-layouts   -py%st    t   real_prefix(   s   install_dirs   install_dir(   s   install_layouts   install_layout(   s   prefix_options   prefix_option(   R   (   t   set_undefined_optionst   syst
   hexversiont   get_finalized_commandt   pkg_resourcest   DistributionR   t   egg_namet   egg_versionR	   t   lowert   DistutilsOptionErrort   replacet   PY_MAJORR
   t   __dict__R   t   sourcet   ost   patht   joinR   t   targett   outputs(   R   t   ei_cmdt   basename(    (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyt   finalize_options   s(    		c         C   sß   |  j  d ƒ t j j |  j ƒ rT t j j |  j ƒ rT 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"   t   isdirR$   t   islinkR   t   remove_treeR)   t   existst   executet   unlinkR   t   ensure_directoryt   copytreeR    t   install_namespaces(   R   (    (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyt   run2   s    +&	 c         C   s   |  j  S(   N(   R%   (   R   (    (    sG   /usr/lib/python2.7/dist-packages/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 rl ˆ  j d	 k rl |  j  d ƒ rl t j d ƒ d  Sˆ  j j | ƒ t j d |  | ƒ | S(
   Ns   .svn/s   CVS/t   /R   s   SOURCES.txts   Skipping SOURCES.txts   Copying %s to %s(   s   .svn/s   CVS/(   s   deb(   t
   startswithR   R	   R    t   infoR%   t   appendt   debug(   t   srct   dstt   skip(   R   (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyt   skimmerD   s    '(   R   R    R$   (   R   R>   (    (   R   sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyR2   B   s    (   s   install-dir=R   s   directory to install to(
   t   __name__t
   __module__t   __doc__t   descriptiont   user_optionsR   R(   R4   R5   R2   (    (    (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyR   
   s   					(   t	   distutilsR    R   R!   R   t
   setuptoolsR   R   t   setuptools.archive_utilR   R   t	   InstallerR   (    (    (    sG   /usr/lib/python2.7/dist-packages/setuptools/command/install_egg_info.pyt   <module>   s   