
^Wc           @@  s  d  Z  d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l	 Z	 d d l
 Z	 d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l Z d d l m Z d d l m Z m Z d d	 l m Z m Z m  Z  d d
 l! m" Z" m# Z# d d l m$ Z$ d d l% m& Z& m' Z' m( Z( m) Z) m* Z* d d l+ m, Z, d d l- m. Z. d d l/ m0 Z0 d d l1 m2 Z2 d d l3 m4 Z4 d d l5 m6 Z6 d d l7 m8 Z8 d Z9 d d f Z: e j; e<  Z= d e> f d     YZ? d   Z@ d   ZA d d d >d  ZB d   ZC d   ZD e jE d e jF  ZG d    ZH d!   ZI eJ eK eK eL eK eJ eK d"  ZM d#   ZN eN d$    ZO d%   ZP d&   ZQ d' e> f d(     YZR d) e> f d*     YZS d S(+   sH   
Support for installing and building the "wheel" binary package format.
i    (   t   absolute_importN(   t   urlsafe_b64encode(   t   Parser(   t   StringIO(   t
   expanduser(   t   path_to_urlt
   unpack_url(   t   InstallationErrort   InvalidWheelFilenamet   UnsupportedWheel(   t   distutils_schemet   PIP_DELETE_MARKER_FILENAME(   t
   pep425tags(   t   call_subprocesst
   ensure_dirt   captured_stdoutt   rmtreet   read_chunks(   t   open_spinner(   t
   indent_log(   t   SETUPTOOLS_SHIM(   t   ScriptMaker(   t   pkg_resources(   t   canonicalize_name(   t   configparsers   .whli   t
   WheelCachec           B@  s    e  Z d  Z d   Z d   Z RS(   s&   A cache of wheels for future installs.c         C@  s(   | r t  |  n d |  _ | |  _ d S(   s   Create a wheel cache.

        :param cache_dir: The root of the cache.
        :param format_control: A pip.index.FormatControl object to limit
            binaries being read from the cache.
        N(   R   t   Nonet
   _cache_dirt   _format_control(   t   selft	   cache_dirt   format_control(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   __init__8   s    c         C@  s   t  |  j | |  j |  S(   N(   t   cached_wheelR   R   (   R   t   linkt   package_name(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyR!   B   s    (   t   __name__t
   __module__t   __doc__R    R!   (    (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyR   5   s   	
c         C@  s   | j  g } | j d k	 rO | j d k	 rO | j d j | j | j g   n  d j |  } t j | j    j	   } | d  | d d !| d d !| d g } t
 j j |  d |  S(   s  
    Return a directory to store cached wheels in for link.

    Because there are M wheels for any one sdist, we provide a directory
    to cache them in, and then consult that directory when looking up
    cache hits.

    We only insert things into the cache if they have plausible version
    numbers, so that we don't contaminate the cache with things that were not
    unique. E.g. ./package might have dozens of installs done for it and build
    a version of 0.0...and if we built and cached a wheel, we'd end up using
    the same wheel even if the source has been edited.

    :param cache_dir: The cache_dir being used by pip.
    :param link: The link of the sdist for which this will cache wheels.
    t   =t   #i   i   i   t   wheelsN(   t   url_without_fragmentt	   hash_nameR   t   hasht   appendt   joint   hashlibt   sha224t   encodet	   hexdigestt   ost   path(   R   R"   t	   key_partst   key_urlt   hashedt   parts(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   _cache_for_linkG   s    %(c         C@  ss  |  s
 | S| s | S| j  r! | S| j s. | S| s8 | St |  } t j j | |  } d | k ri | St |  |  } y t j |  } Wn5 t	 k
 r } | j
 t
 j t
 j f k r | S  n Xg  }	 x` | D]X }
 y t |
  } Wn t k
 r q n X| j   sq n  |	 j | j   |
 f  q W|	 s6| S|	 j   t j j | |	 d d  } t j j t |   S(   Nt   binaryi    i   (   t   is_wheelt   is_artifactR   t   pipt   indext   fmt_ctl_formatsR9   R3   t   listdirt   OSErrort   errnot   ENOENTt   ENOTDIRt   WheelR   t	   supportedR-   t   support_index_mint   sortR4   R.   t   LinkR   (   R   R"   R   R#   t   canonical_namet   formatst   roott   wheel_namest   et
   candidatest
   wheel_namet   wheelR4   (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyR!   p   sF    		
t   sha256i   c         C@  s   t  j |  } d } t |  d  A } x7 t | d | D]# } | t |  7} | j |  q: WWd QXd t | j    j d  j	 d  } | | f S(   s6   Return (hash, length) for path using hashlib.new(algo)i    t   rbt   sizeNs   sha256=t   latin1R'   (
   R/   t   newt   openR   t   lent   updateR   t   digestt   decodet   rstrip(   R4   t   algot	   blocksizet   ht   lengtht   ft   blockRZ   (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   rehash   s    c         C@  sI   t  j d d k  r" i  } d } n i d d 6} d } t |  | | |  S(   Ni    i   t   bt    t   newline(   t   syst   version_infoRW   (   t   namet   modet   nlt   bin(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   open_for_csv   s    	c         C@  s   t  j j |   r t |  d  d } | j   } | j d  sC t St j j	 t j
    } d | t  j j	 d  } | j   } Wd QXt |  d  ! } | j |  | j |  Wd QXt Sd S(   sL   Replace #!python with #!/path/to/python
    Return True if file was changed.RS   s   #!pythons   #!t   asciiNt   wb(   R3   R4   t   isfileRW   t   readlinet
   startswitht   FalseRg   t
   executableR1   t   getfilesystemencodingt   linesept   readt   writet   True(   R4   t   scriptt	   firstlinet   exenamet   rest(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt
   fix_script   s    sZ   ^(?P<namever>(?P<name>.+?)(-(?P<ver>\d.+?))?)
                                \.dist-info$c         C@  s   |  j  d d  } x t j |  D] } t j |  } | r" | j d  | k r" t t j j | | d   : } x0 | D]( } | j	   j
   } | d k rz t Sqz WWd QXq" q" Wt S(   sP   
    Return True if the extracted wheel in wheeldir should go into purelib.
    t   -t   _Ri   t   WHEELs   root-is-purelib: trueN(   t   replaceR3   R@   t   dist_info_ret   matcht   groupRW   R4   R.   t   lowerR\   Ry   Rs   (   Ri   t   wheeldirt   name_foldedt   itemR   RQ   t   line(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   root_is_purelib   s    !c         C@  s  t  j j |   s i  i  f St |   N } t   } x. | D]& } | j | j    | j d  q; W| j d  Wd  QXt j	   } d   | _
 | j |  i  } i  } | j d  r t | j d   } n  | j d  r t | j d   } n  | | f S(   Ns   
i    c         S@  s   |  S(   N(    (   t   option(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   <lambda>   s    t   console_scriptst   gui_scripts(   R3   R4   t   existsRW   R   Rx   t   stript   seekR   t   RawConfigParsert   optionxformt   readfpt   has_sectiont   dictt   items(   t   filenamet   fpt   dataR   t   cpt   consolet   gui(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   get_entrypoints   s$    
	c
   *      @  s  | s3 t  |  d | d | d | d | d |	 } n  t |    rO | d  n
 | d  g   g    j t j j  t j j }
 i   t     g  } | r t   @ } t j	   + t j
 d  t j |
 d	 t d
 t Wd QXWd QXt j | j    n  d    t       f d  	 d d   	 
 f d  } | |
  t   skt d 
   t j j  d d  } t |  \     f d   } x  D] } d } d } x t j t j j  |   D]e } d } | d k rt } | } n  t j j  | |  }
 | | } | |
 | t d | d | qWqWt d | d   t  _ t d0   _ t  _  
 f d   } |  _ d  _  j d d  } | rd t j k rd | } | j   j! |   n  t j j" d d  d k r:d t# j$ d  | f } | j   j! |   n  d t# j$ d  | f } | j   j! |   g   D] } t% j& d  |  rn| ^ qn} x | D] }  | =qWn   j d! d  } | rjd t j k rd" | } | j   j! |   n  d# t# j$ d  | f } | j   j! |   g   D] } t% j& d$ |  r+| ^ q+} x | D] }  | =qVWn  t'   d k r| j   j( g   j)   D] } d% | ^ q  n  t'   d k r| j   j( g   j)   D] } d% | ^ qi t d& 6  n  t j j  d d'  } t j j  d d(  } t* | d)   } | j+ d*  Wd QXt, j- | |  | j. |  t j j  d d+  }  t j j  d d,  }! t/ |  d-  }" t/ |! d.   }# t0 j1 |"  }$ t0 j2 |#  }% xj |$ D]b }&  j |& d |& d  |& d <|& d   k rHt3 |& d  \ |& d <|& d/ <n  |% j4 |&  qWx? | D]7 }' t3 |'  \ }( }) |% j4  |'   |( |) f  q`Wx(  D]  }' |% j4  |' d d f  qWWd QXWd QXt, j- |! |   d S(1   s   Install a wheelt   usert   homeRL   t   isolatedt   prefixt   purelibt   platlibt   ignoret   forcet   quietNc         S@  s%   t  j j |  |  j t  j j d  S(   Nt   /(   R3   R4   t   relpathR   t   sep(   t   srct   p(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   normpath  s    c         @  sB    |    }  |   } |  | <| r>   j  |  n  d S(   s6   Map archive RECORD paths to installation RECORD paths.N(   t   add(   t   srcfilet   destfilet   modifiedt   oldpatht   newpath(   t   changedt	   installedt   lib_dirR   R   (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   record_installed  s
    
c         @  s  t  |  xt j |   D]u\ } } } | t |   j t j j  } t j j | |  }	 | r | j t j j d  d j	 d  r q n  x | D] }
 t j j | | |
  } | r | d k r | j	 d  r   j
 |
  q q | r |
 j	 d  r |
 j   j  j j d d  j    r  sNt d | d	 d	 j      j
 |  q q Wx*| D]"} | r| |  rqin  t j j | |  } t j j | | |  } t  |	  t j | |  t j |  } t t d
  rt j | | j | j f  n  t j | t j  r`t j |  } | j t j Bt j Bt j B} t j | |  n  t } | r{| |  } n   | | |  qiWq Wd  S(   Ni   i    s   .dataRe   s
   .dist-infoR   R   s!   Multiple .dist-info directories: s   , t   utime(   R   R3   t   walkRX   t   lstripR4   R   R.   t   splitt   endswithR-   R   Rr   Ri   R   t   AssertionErrort   shutilt   copyfilet   statt   hasattrR   t   st_atimet   st_mtimet   accesst   X_OKt   st_modet   S_IXUSRt   S_IXGRPt   S_IXOTHt   chmodRs   (   t   sourcet   destt   is_baset   fixert   filtert   dirt   subdirst   filest   basedirt   destdirt   st
   destsubdirRa   R   R   t   stt   permissionsR   (   t	   data_dirst   info_dirR   t   req(    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   clobber  sJ    
+!

s!   %s .dist-info directory not foundi    s   entry_points.txtc         @  s   |  j    j d  r" |  d  } nJ |  j    j d  rD |  d  } n( |  j    j d  rf |  d  } n |  } |   k p |  k S(   Ns   .exeis
   -script.pyis   .pya(   R   R   (   Ri   t	   matchname(   R   R   (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   is_entrypoint_wrapperb  s    t   scriptsR   R   Re   c         @  s^   |  j  d  k r( t d |   f   n    j i |  j d 6|  j  j d  d d 6|  j  d 6S(   Ns   Invalid script entry point: %s for req: %s - A callable suffix is required. Cf https://packaging.python.org/en/latest/distributing.html#console-scripts for more information.t   modulet   .i    t   import_namet   func(   t   suffixR   R   t   script_templateR   R   (   t   entry(   t   makerR   (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   _get_script_text  s    	
s   # -*- coding: utf-8 -*-
import re
import sys

from %(module)s import %(import_name)s

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
R=   t   ENSUREPIP_OPTIONSs   pip = t
   altinstalls
   pip%s = %si   i   s   pip(\d(\.\d)?)?$t   easy_installs   easy_install = s   easy_install-%s = %ss   easy_install(-\d\.\d)?$s   %s = %sR   t	   INSTALLERs   INSTALLER.pipRo   s   pip
t   RECORDs
   RECORD.pipt   rs   w+i   (   Re   (5   R
   R   R\   R3   R4   R   t   setR   t   warningst   catch_warningst   filterwarningst
   compileallt   compile_dirRy   t   loggert   debugt   getvalueRs   R   R   R.   R   R@   R~   R   R   t   variantst   set_modeR   R   t   popt   environt   extendt   maket   getRg   t   versiont   reR   RX   t   make_multipleR   RW   Rx   R   t   moveR-   Rm   t   csvt   readert   writerRc   t   writerow(*   Ri   R   R   R   R   RL   t	   pycompilet   schemeR   R   R   t	   generatedt   stdoutR   t   ep_fileR   t   datadirR   R   t   subdirR   R   t
   pip_scriptt   spect   kt   pip_ept   easy_install_scriptt   easy_install_ept   kvt	   installert   temp_installert   installer_filet   recordt   temp_recordt	   record_int
   record_outR  R  t   rowRa   R_   t   l(    (   R   R   R   R   R   R   R   R   R   R   R   R   sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   move_wheel_files   s    
	%	<%	
$			
	#
+
+0 !#*c         @  s"   t  j      f d    } | S(   Nc          ?@  sH   t    } x8   |  |   D]' } | | k r | j |  | Vq q Wd  S(   N(   R   R   (   t   argst   kwt   seenR   (   t   fn(    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   unique  s
    	(   t	   functoolst   wraps(   R#  R$  (    (   R#  sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   _unique  s    c         c@  s   d d l  m } t j | |  j d    } x | D]y } t j j |  j | d  } | V| j	 d  r5 t j j
 |  \ } } | d  } t j j | | d  } | Vq5 q5 Wd S(   s  
    Yield all the uninstallation paths for dist based on RECORD-without-.pyc

    Yield paths to all the files in RECORD. For each .py file in RECORD, add
    the .pyc in the same directory.

    UninstallPathSet.add() takes care of the __pycache__ .pyc.
    i    (   t   FakeFileR   s   .pyis   .pycN(   t	   pip.utilsR(  R  R  t   get_metadata_linesR3   R4   R.   t   locationR   R   (   t   distR(  R   R  R4   t   dnR#  t   base(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   uninstallation_paths  s    

c         C@  s   y g  t  j d |   D] } | ^ q d } | j d  } t   j |  } | d j   } t t t	 | j
 d    } | SWn t SXd S(   s   
    Return the Wheel-Version of an extracted wheel, if possible.

    Otherwise, return False if we couldn't parse / extract it.
    i    R   s   Wheel-VersionR   N(   R   t   find_on_pathR   t   get_metadataR   t   parsestrR   t   tuplet   mapt   intR   Rs   (   t
   source_dirt   dR,  t
   wheel_dataR   (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   wheel_version5  s    )c         C@  s   |  s t  d |   n  |  d t d k rX t  d | d j t t |    f   n1 |  t k r t j d d j t t |     n  d S(   s  
    Raises errors or warns if called with an incompatible Wheel-Version.

    Pip should refuse to install a Wheel-Version that's a major series
    ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when
    installing a version only minor version ahead (e.g 1.2 > 1.1).

    version: a 2-tuple representing a Wheel-Version (Major, Minor)
    name: name of wheel or package to raise exception about

    :raises UnsupportedWheel: when an incompatible Wheel-Version is given
    s(   %s is in an unsupported or invalid wheeli    sB   %s's Wheel-Version (%s) is not compatible with this version of pipR   s*   Installing from a newer Wheel-Version (%s)N(   R	   t   VERSION_COMPATIBLER.   R4  t   strR   t   warning(   R   Ri   (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   check_compatibilityH  s    %RE   c           B@  sD   e  Z d  Z e j d e j  Z d   Z d d  Z	 d d  Z
 RS(   s   A wheel files   ^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))
        ((-(?P<build>\d.*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
        \.whl|\.dist-info)$c         @  s     j  j |  } | s+ t d |   n  |   _ | j d  j d d    _ | j d  j d d    _ | j d  j d    _	 | j d  j d    _
 | j d	  j d    _ t   f d
     j	 D    _ d S(   sX   
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        s!   %s is not a valid wheel filename.Ri   R   R   t   vert   pyverR   t   abit   platc         3@  s>   |  ]4 }   j  D]$ }   j D] } | | | f Vq q q d  S(   N(   t   abist   plats(   t   .0t   xt   yt   z(   R   (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pys	   <genexpr>  s    N(   t   wheel_file_reR   R   R   R   R   Ri   R   R   t
   pyversionsRB  RC  R   t	   file_tags(   R   R   t
   wheel_info(    (   R   sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyR    q  s    	c         C@  s]   | d k r t j } n  g  |  j D]! } | | k r" | j |  ^ q" } | rY t |  Sd S(   s"  
        Return the lowest index that one of the wheel's file_tag combinations
        achieves in the supported_tags list e.g. if there are 8 supported tags,
        and one of the file tags is first in the list, then return 0.  Returns
        None is the wheel is not supported.
        N(   R   R   t   supported_tagsRJ  R>   t   min(   R   t   tagst   ct   indexes(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyRG     s    1c         C@  s4   | d k r t j } n  t t |  j |  j   S(   s'   Is this wheel supported on this system?N(   R   R   RL  t   boolR   t   intersectionRJ  (   R   RN  (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyRF     s    N(   R$   R%   R&   R  t   compilet   VERBOSERH  R    R   RG   RF   (    (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyRE   e  s   	t   WheelBuilderc           B@  sS   e  Z d  Z d d d  Z d d  Z d   Z d d  Z d   Z e	 d  Z
 RS(   s#   Build wheels from a RequirementSet.c         C@  sO   | |  _  | |  _ | j j |  _ | j |  _ | p6 g  |  _ | pE g  |  _ d  S(   N(	   t   requirement_sett   findert   _wheel_cacheR   t   _cache_roott   wheel_download_dirt
   _wheel_dirt   build_optionst   global_options(   R   RV  RW  R\  R]  (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyR      s    		c         C@  s   t  j d  } z |  j | | d | r y_ t j |  d } t j j | |  } t j t j j | |  |  t	 j
 d |  | SWq q Xn  |  j |  d SWd t |  Xd S(   si   Build one wheel.

        :return: The filename of the built wheel, or None if the build failed.
        s
   pip-wheel-t
   python_tagi    s   Stored in directory: %sN(   t   tempfilet   mkdtempt   _WheelBuilder__build_oneR3   R@   R4   R.   R   R  R   t   infot
   _clean_oneR   R   (   R   R   t
   output_dirR^  t   tempdRP   t
   wheel_path(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt
   _build_one  s    c         C@  s'   t  j d d t | j g t |  j  S(   Ns   -us   -c(   Rg   Rt   R   t   setup_pyt   listR]  (   R   R   (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   _base_setup_args  s    c         C@  s   |  j  |  } d | j f } t |   } t j d |  | d d | g |  j } | d  k	 rw | d | g 7} n  y' t | d | j d t	 d | t
 SWn( | j d	  t j d
 | j  t	 SXWd  QXd  S(   Ns#   Running setup.py bdist_wheel for %ss   Destination directory: %st   bdist_wheels   -ds   --python-tagt   cwdt   show_stdoutt   spinnert   errors   Failed building wheel for %s(   Rj  Ri   R   R   R   R\  R   R   t   setup_py_dirRs   Ry   t   finishRo  (   R   R   Re  R^  t	   base_argst   spin_messageRn  t
   wheel_args(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   __build_one  s    c         C@  su   |  j  |  } t j d | j  | d d g } y! t | d | j d t t SWn t j d | j  t SXd  S(   Ns   Running setup.py clean for %st   cleans   --allRl  Rm  s    Failed cleaning build dir for %s(	   Rj  R   Rb  Ri   R   R6  Rs   Ry   Ro  (   R   R   Rr  t
   clean_args(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyRc    s    c         C@  s  |  j  s | r |  j s t  |  j j |  j  |  j j j   } g  } x7| D]/} | j re qP n  | j	 r | st
 j d | j  qqP | j r | st
 j d | j  qqP | r | j r | j j r qP | r | j r qP | rr| j } | j   \ } } t j j | d |  d k r,qP n  d t j j |  j j t | j   k rrt
 j d | j  qP qrn  | j |  qP W| st St
 j d d j g  | D] } | j ^ q  t   g  g  } }	 x| D]{} d }
 | rWt j }
 t |  j | j  } y t  |  Wq`t! k
 rS} t
 j" d | j |  |	 j |  qq`Xn	 |  j  } |  j# | | d |
 } | rH| j |  | rU| j rt$ j% j& t$ j% j | j t'   rt d	   n  | j(   | j) |  j j*  | _ t j j+ t, |   | _ | j j	 st  t- | j | j d t. d
 |  j j/ qUq|	 j |  qWWd QX| rt
 j d d j g  | D] } | j ^ q{  n  |	 rt
 j d d j g  |	 D] } | j ^ q  n  t0 |	  d k S(   s   Build wheels.

        :param unpack: If True, replace the sdist we built from with the
            newly built wheel, in preparation for installation.
        :return: True if all the wheels built correctly.
        s(   Skipping %s, due to already being wheel.s2   Skipping bdist_wheel for %s, due to being editableR:   sC   Skipping bdist_wheel for %s, due to binaries being disabled for it.s*   Building wheels for collected packages: %ss   , s    Building wheel for %s failed: %sR^  s   bad source dir - missing markert   sessionNs   Successfully built %st    s   Failed to build %si    (1   R[  RY  R   RV  t   prepare_filesRW  t   requirementst   valuest
   constraintR;   R   Rb  Ri   t   editableR"   R<   R6  t   splitextR=   R>   t   egg_info_matchesR   R?   R   R   R-   Ry   R.   R   R   t   implementation_tagR9   R   RA   R<  Rg  R3   R4   R   R   t   remove_temporary_sourcet   build_locationt	   build_dirRI   R   R   Rs   Rx  RX   (   R   t   autobuildingt   reqsett   buildsetR   R"   R.  t   extt   build_successt   build_failureR^  Rd  RN   t
   wheel_file(    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   build  s    					
	&
		
			
	))N(   R$   R%   R&   R   R    Rg  Rj  Ra  Rc  Rs   R  (    (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyRU    s   		(T   R&   t
   __future__R    R   R  RB   R%  R/   t   loggingR3   t   os.pathR  R   R   Rg   R_  R   t   base64R   t   email.parserR   t   pip._vendor.sixR   R=   t
   pip.compatR   t   pip.downloadR   R   t   pip.exceptionsR   R   R	   t   pip.locationsR
   R   R   R)  R   R   R   R   R   t   pip.utils.uiR   t   pip.utils.loggingR   t   pip.utils.setuptools_buildR   t   pip._vendor.distlib.scriptsR   t   pip._vendorR   t   pip._vendor.packaging.utilsR   t   pip._vendor.six.movesR   t	   wheel_extR:  t	   getLoggerR$   R   t   objectR   R9   R!   Rc   Rm   R~   RS  RT  R   R   R   Rs   R   Ry   R  R'  R/  R9  R=  RE   RU  (    (    (    sZ   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/wheel.pyt   <module>   sl   (	)	'	
				 #			7