�
�fc @ ss d d l m Z d d l j j Z d d l Z d d l Z d d l m Z m
Z
m Z d e j f d � � YZ d S( i����( t logN( t Distributiont PathMetadatat ensure_directoryt install_scriptsc 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 j | � t | _ d S( N( t origR t initialize_optionst Falset no_ep( t self( ( sF /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyR s c C sf d d l j j } | j d � | j j r> t j j | � n g | _ | j
rT d S| j d � } t | j
t | j
| j � | j | j � } | j d � } t | d d � } | j d � } t | d t � } | j } | r� d } | j } n | t j k r| g } n | j � } | j j � j | � } x- | j | | j � � D] }
| j |
� qKWd S( Ni����t egg_infot
build_scriptst
executablet
bdist_wininstt _is_runnings
python.exe( t setuptools.command.easy_installt commandt easy_installt run_commandt distributiont scriptsR R t runt outfilesR t get_finalized_commandR t egg_baseR R
t egg_namet egg_versiont getattrt NoneR t ScriptWritert WindowsScriptWritert sysR t bestt command_spec_classt
from_paramt get_argst as_headert write_script( R t eit ei_cmdt distt bs_cmdt
exec_paramt bw_cmdt
is_wininstt writert cmdt args( ( sF /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyR s2
t tc
G s� d d l m } m } t j d | | j � t j j | j | � } | j j
| � | � } | j s� t | � t
| d | � } | j | � | j � | | d | � n d S( s1 Write an executable file to the scripts directoryi����( t chmodt
current_umasks Installing %s script to %st wi� N( R R1 R2 R t infot install_dirt ost patht joinR t appendt dry_runR t opent writet close(
R t script_namet contentst modet ignoredR1 R2 t targett maskt f( ( sF /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyR% 3 s
( t __name__t
__module__t __doc__R R R% ( ( ( sF /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyR s #( t distutilsR t! distutils.command.install_scriptsR R R R6 R t
pkg_resourcesR R R ( ( ( sF /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyt