ó
ÏrOc           @   s~   d  d l  m Z d  d l m Z m Z m Z d  d l m Z m	 Z	 m
 Z
 d  d l Z d  d l m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   install_scripts(   t   get_script_argst   sys_executablet   chmod(   t   Distributiont   PathMetadatat   ensure_directoryN(   t   logR    c           B   s,   e  Z d  Z d „  Z d „  Z d d „ Z RS(   s;   Do normal script install, plus any egg_info wrapper scriptsc         C   s   t  j |  ƒ t |  _ d  S(   N(   t   _install_scriptst   initialize_optionst   Falset   no_ep(   t   self(    (    sF   /var/www/python/setuptools-0.6c9/setuptools/command/install_scripts.pyR	      s    c         C   så   |  j  d ƒ |  j j r) t j |  ƒ n	 g  |  _ |  j r? d  S|  j d ƒ } t | j	 t
 | j	 | j ƒ | j | j ƒ } |  j d ƒ } t | d t ƒ } t |  j d ƒ d t ƒ } x' t | | | ƒ D] } |  j | Œ  qÊ Wd  S(   Nt   egg_infot   build_scriptst
   executablet   bdist_wininstt   _is_running(   t   run_commandt   distributiont   scriptsR   t   runt   outfilesR   t   get_finalized_commandR   t   egg_baseR   R   t   egg_namet   egg_versiont   getattrR   R
   R   t   write_script(   R   t   ei_cmdt   distt   bs_cmdR   t
   is_wininstt   args(    (    sF   /var/www/python/setuptools-0.6c9/setuptools/command/install_scripts.pyR      s     		t   tc         G   s   t  j d | |  j ƒ t j j |  j | ƒ } |  j j | ƒ |  j s‹ t	 | ƒ t
 | d | ƒ } | j | ƒ | j ƒ  t | d ƒ n  d S(   s1   Write an executable file to the scripts directorys   Installing %s script to %st   wií  N(   R   t   infot   install_dirt   ost   patht   joinR   t   appendt   dry_runR   t   opent   writet   closeR   (   R   t   script_namet   contentst   modet   ignoredt   targett   f(    (    sF   /var/www/python/setuptools-0.6c9/setuptools/command/install_scripts.pyR   *   s    	

(   t   __name__t
   __module__t   __doc__R	   R   R   (    (    (    sF   /var/www/python/setuptools-0.6c9/setuptools/command/install_scripts.pyR       s   		(   t!   distutils.command.install_scriptsR    R   t   easy_installR   R   R   t   pkg_resourcesR   R   R   R&   t	   distutilsR   (    (    (    sF   /var/www/python/setuptools-0.6c9/setuptools/command/install_scripts.pyt   <module>   s
   