ó
.¿”Wc           @   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(    (    s>   /tmp/pip-build-Q3rTTP/setuptools/setuptools/command/install.pyt   <lambda>   s    t   install_scriptsc         C   s   t  S(   N(   R   (   R   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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(    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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  S(
   Nt   easy_installt   argst   xR   R   t   .s   *.eggt	   bdist_eggi    (   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   R	   (   R   R*   t   cmdR+   (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/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   (    (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/setuptools/command/install.pyR      s    	 
				
	i    (   t   distutils.errorsR    R   R5   R   R   t   distutils.command.installt   commandR   R   R9   t   _installt   sub_commandsR<   RC   RA   (    (    (    s>   /tmp/pip-build-Q3rTTP/setuptools/setuptools/command/install.pyt   <module>   s   	l/