ó
Ð²Ebc           @   sŠ   d  d l  Z  d  d l m Z e rA d  d l m Z m Z m Z n  d Z d e	 e	 d „ Z
 d „  Z d „  Z d „  Z d	 „  Z d
 „  Z d S(   iÿÿÿÿN(   t   MYPY_CHECK_RUNNING(   t   Listt   Optionalt   SequencesÅ   import sys, setuptools, tokenize; sys.argv[0] = {0!r}; __file__={0!r};f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))c         C   sh   t  j g } | r" | d g 7} n  | d t j |  ƒ g 7} | rN | | 7} n  | rd | d g 7} n  | S(   so  
    Get setuptools command arguments with shim wrapped setup file invocation.

    :param setup_py_path: The path to setup.py to be wrapped.
    :param global_options: Additional global options.
    :param no_user_config: If True, disables personal user configuration.
    :param unbuffered_output: If True, adds the unbuffered switch to the
     argument list.
    s   -us   -cs   --no-user-cfg(   t   syst
   executablet   _SETUPTOOLS_SHIMt   format(   t   setup_py_patht   global_optionst   no_user_configt   unbuffered_outputt   args(    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   make_setuptools_shim_args   s    c         C   s9   t  |  d | d t ƒ} | d d | g 7} | | 7} | S(   NR	   R   t   bdist_wheels   -d(   R   t   True(   R   R	   t   build_optionst   destination_dirR   (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt    make_setuptools_bdist_wheel_args2   s    	
c         C   s,   t  |  d | d t ƒ} | d d g 7} | S(   NR	   R   t   cleans   --all(   R   R   (   R   R	   R   (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   make_setuptools_clean_argsG   s    	c         C   sš   | o	 | s t  ‚ t |  d | d | ƒ} | d d g 7} | | 7} | r^ | d | g 7} n  | d  k	 r} | d | g 7} n  | r– | d d g 7} n  | S(	   NR	   R
   t   develops	   --no-depss   --prefixs   --homes   --users	   --prefix=(   t   AssertionErrorR   t   None(   R   R	   t   install_optionsR
   t   prefixt   homet   use_user_siteR   (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   make_setuptools_develop_argsU   s    
	
c         C   s<   t  |  d | ƒ} | d g 7} | r8 | d | g 7} n  | S(   NR
   t   egg_infos
   --egg-base(   R   (   R   t   egg_info_dirR
   R   (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   make_setuptools_egg_info_argsv   s    c         C   s$  | o	 | s t  ‚ | o | s& t  ‚ t |  d | d |	 d t ƒ} | d d | g 7} | d g 7} | d  k	 rƒ | d | g 7} n  | d  k	 r¢ | d | g 7} n  | d  k	 rÁ | d	 | g 7} n  | rÚ | d
 d g 7} n  |
 rð | d g 7} n | d g 7} | r| d | g 7} n  | | 7} | S(   NR	   R
   R   t   installs   --records#   --single-version-externally-manageds   --roots   --prefixs   --homes   --users	   --prefix=s	   --compiles   --no-compiles   --install-headers(   R   R   R   R   (   R   R	   R   t   record_filenamet   rootR   t
   header_dirR   R   R
   t	   pycompileR   (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   make_setuptools_install_argsˆ   s0    	
(   R   t   pip._internal.utils.typingR    t   typingR   R   R   R   R   t   FalseR   R   R   R   R   R%   (    (    (    sA   /tmp/pip-build-UPPWic/pip/pip/_internal/utils/setuptools_build.pyt   <module>   s   	
			!	