ó
^†êWc           @   sá   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 m Z e j d e j ƒ Z d „  Z d „  Z e d	 k rÝ e ƒ  n  d S(
   iÿÿÿÿN(   t   make_archive(   t   ArgumentParser(   t   iglob(   t   _bdist_wheel_tagsF   (?P<name>.+?)-(?P<ver>.+?)
    (-(?P<pyver>.+?))?(-(?P<arch>.+?))?.eggc         C   s®  t  j t j j |  ƒ ƒ j ƒ  } t j d d ƒ } t j j |  ƒ rd t	 j
 |  ƒ } | j | ƒ ns xp t j |  ƒ D]_ } t j j |  | ƒ } t j j | ƒ r´ t j | | ƒ qt t j | t j j | | ƒ ƒ qt Wd | d | d f } d } | d j d d	 ƒ }	 | d
 pd j d d ƒ j d d ƒ }
 |
 d k rPd |	 d }	 n  d j | |	 | |
 f ƒ } | d
 d  k } | rŸt j j t j j ƒ  ƒ } n t t j j ƒ  ƒ } | | _ |	 | _ t | _ | d
 pÜd | _ | st | _ |	 | |
 f | _ n  t j j | d | ƒ } | j  t j j | d ƒ | ƒ | j! | d d ƒ| j" | | ƒ t# t j j | | ƒ d d | ƒ} t j$ | | d  d ƒ t j% | ƒ d  S(   Nt   suffixt   _e2ws   %s-%st   namet   vert   nonet   pyvert   .t    t   archt   anyt   _t   -t   cpi   s   %s.dist-infos   EGG-INFOt	   generatort	   egg2wheelt   zipt   root_diriýÿÿÿt   whl(&   t   egg_info_ret   matcht   ost   patht   basenamet	   groupdictt   tempfilet   mkdtempt   isfilet   zipfilet   ZipFilet
   extractallt   listdirt   joint   shutilt   copy2t   copytreet   replacet   Nonet   wheelt   bdist_wheelt	   distutilst   distt   DistributionR   t   root_is_puret
   python_tagt   Truet   plat_name_suppliedt	   plat_namet   full_tag_suppliedt   full_tagt   egg2distt   write_wheelfilet   write_recordR    t   renamet   rmtree(   t   egg_patht   dest_dirt   egg_infot   dirt   eggt   ptht   srct	   dist_infot   abiR	   R   t
   wheel_namet   root_is_purelibt   bwt   dist_info_dirt   filename(    (    sb   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/wheel/wheel/egg2wheel.pyR      sP    !#(				$c          C   sæ   t  ƒ  }  |  j d d d d d ƒ|  j d d d t j j d d	 ƒ|  j d
 d d d ƒ|  j ƒ  } xy | j D]n } xe t | ƒ D]W } | j r® t	 j
 j d j | ƒ ƒ n  t | | j ƒ | j rƒ t	 j
 j d ƒ qƒ qƒ Wqp Wd  S(   Nt   eggst   nargst   *t   helps   Eggs to converts
   --dest-dirs   -dt   defaults/   Directory to store wheels (default %(default)s)s	   --verboses   -vt   actiont
   store_trues   {0}... s   OK
(   R   t   add_argumentR   R   t   curdirt
   parse_argsRH   R   t   verboset   syst   stdoutt   writet   formatR   R;   (   t   parsert   argst   patR>   (    (    sb   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/wheel/wheel/egg2wheel.pyt   mainF   s    			t   __main__(   t   os.pathR   t   reRS   R   R   t   wheel.bdist_wheelR)   R$   t   distutils.distR+   t   distutils.archive_utilR    t   argparseR   t   globR   t   wheel.wininst2wheelR   t   compilet   VERBOSER   R   RZ   t   __name__(    (    (    sb   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/wheel/wheel/egg2wheel.pyt   <module>   s"   	4	