ó
1,^c           @   sÀ   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l j j Z	 d  d l
 Z
 e	 j Z d e	 j f d     YZ g  e	 j j D] Z e d e j k r e ^ q e j e _ d S(   i˙˙˙˙(   t   DistutilsArgErrorNt   installc           B   s    e  Z d  Z e j j d d g Z e j j d d g Z d d   f d d   f g Z e	 e  Z
 d	   Z d
   Z d   Z d   Z e d    Z d   Z RS(   s7   Use easy_install to install the package, w/dependenciess   old-and-unmanageables   Try not to use this!s!   single-version-externally-manageds5   used by system package builders to create 'flat' eggst   install_egg_infoc         C   s   t  S(   N(   t   True(   t   self(    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyt   <lambda>   s    t   install_scriptsc         C   s   t  S(   N(   R   (   R   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR      s    c         C   s&   t  j j |   d  |  _ d  |  _ d  S(   N(   t   origR   t   initialize_optionst   Nonet   old_and_unmanageablet!   single_version_externally_managed(   R   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR       s    	c         C   sX   t  j j |   |  j r% t |  _ n/ |  j rT |  j rT |  j rT t d   qT n  d  S(   NsA   You must specify --record or --root when building system packages(   R   R   t   finalize_optionst   rootR   R   t   recordR    (   R   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR   %   s    		c         C   s8   |  j  s |  j r" t j j |   Sd  |  _ d |  _ d  S(   Nt    (   R   R   R   R   t   handle_extra_pathR	   t	   path_filet
   extra_dirs(   R   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR   0   s    	c         C   sX   |  j  s |  j r" t j j |   S|  j t j    sJ t j j |   n
 |  j   d  S(   N(	   R
   R   R   R   t   runt   _called_from_setupt   inspectt   currentframet   do_egg_install(   R   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR   :   s
    c         C   s¨   |  d
 k rK d } t j |  t j   d k rG d } t j |  n  t St j |   d } | d  \ } t j |  } | j	 j
 d d  } | d k o§ | j d	 k S(   sñ  
        Attempt to detect whether run() was called from setup() or by another
        command.  If called by setup(), the parent caller will be the
        'run_command' method in 'distutils.dist', and *its* caller will be
        the 'run_commands' method.  If called any other way, the
        immediate caller *might* be 'run_command', but it won't have been
        called by 'run_commands'. Return True in that case or if a call stack
        is unavailable. Return False otherwise.
        s4   Call stack not available. bdist_* commands may fail.t
   IronPythons6   For best results, pass -X:Frames to enable call stack.i   i   t   __name__R   s   distutils.distt   run_commandsN(   R	   t   warningst   warnt   platformt   python_implementationR   R   t   getouterframest   getframeinfot	   f_globalst   gett   function(   t	   run_framet   msgt   rest   callert   infot   caller_module(    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR   E   s    c         C   sÏ   |  j  j d  } | |  j  d d d |  j d |  j } | j   d | _ | j j t j d   |  j	 d  |  j  j
 d  j g } t j rİ | j d	 t j  n  | | _ | j d
 t  d  t _ d  S(   Nt   easy_installt   argst   xR   R   t   .s   *.eggt	   bdist_eggi    t   show_deprecation(   t   distributiont   get_command_classR   R   t   ensure_finalizedt   always_copy_fromt   package_indext   scant   globt   run_commandt   get_command_objt
   egg_outputt
   setuptoolst   bootstrap_install_fromt   insertR+   R   t   FalseR	   (   R   R*   t   cmdR+   (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR   `   s    $
			N(   s   old-and-unmanageableNs   Try not to use this!(   s!   single-version-externally-managedNs5   used by system package builders to create 'flat' eggs(   R   t
   __module__t   __doc__R   R   t   user_optionsR	   t   boolean_optionst   new_commandst   dictt   _ncR   R   R   R   t   staticmethodR   R   (    (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyR      s    	 
				
	i    (   t   distutils.errorsR    R   R6   R   R   t   distutils.command.installt   commandR   R   R:   t   _installt   sub_commandsR>   RE   RC   (    (    (    s9   lib/python2.7/site-packages/setuptools/command/install.pyt   <module>   s   	l/