ó
Ð²Ebc           @  s“   d  Z  d d l m Z d d l Z d d l Z d d l Z d „  Z d e f d „  ƒ  YZ d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d S(   s   
Wheel command-line utility.
iÿÿÿÿ(   t   print_functionNc         C  s=   y d d  l  } Wn& t k
 r8 t d j |  ƒ ƒ ‚ n Xd  S(   Niÿÿÿÿs/   '{0}' needs pkg_resources (part of setuptools).(   t   pkg_resourcest   ImportErrort   RuntimeErrort   format(   t   nameR   (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   require_pkgresources   s    t
   WheelErrorc           B  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyR      s   c         C  s'   d d l  m  } | |  j |  j ƒ d  S(   Ni   (   t   unpack(   R
   t	   wheelfilet   dest(   t   argsR
   (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   unpack_f   s    c         C  s-   d d l  m  } | |  j |  j |  j ƒ d  S(   Ni   (   t   pack(   R   t	   directoryt   dest_dirt   build_number(   R   R   (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   pack_f   s    c         C  s-   d d l  m  } | |  j |  j |  j ƒ d  S(   Ni   (   t   convert(   R   t   filesR   t   verbose(   R   R   (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt	   convert_f!   s    c         C  s"   d d l  m } t d | ƒ d  S(   Ni   (   t   __version__s   wheel %s(   t    R   t   print(   R   R   (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt	   version_f&   s    c            s¬  t  j ƒ  ‰  ˆ  j d d ƒ }  |  j d d d ƒ} | j d d d d d d	 ƒ| j d
 d d ƒ| j d t ƒ |  j d d d ƒ} | j d d d ƒ| j d d d t j j	 d d ƒ| j d d d ƒ| j d t
 ƒ |  j d d d ƒ} | j d d d d d ƒ| j d d d t j j	 d d ƒ| j d d d d ƒ| j d t ƒ |  j d  d d! ƒ} | j d t ƒ |  j d d d" ƒ} | j d ‡  f d# †  ƒ ˆ  S($   Nt   helpt   commandsR
   s   Unpack wheels   --dests   -ds   Destination directoryt   defaultt   .R   s
   Wheel filet   funcR   s   Repack wheelR   s$   Root directory of the unpacked wheels
   --dest-dirs2   Directory to store the wheel (default %(default)s)s   --build-numbers"   Build tag to use in the wheel nameR   s   Convert egg or wininst to wheelR   t   nargst   *s   Files to converts/   Directory to store wheels (default %(default)s)s	   --verboses   -vt   actiont
   store_truet   versions   Print version and exits   Show this helpc           s
   ˆ  j  ƒ  S(   N(   t
   print_help(   R   (   t   p(    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   <lambda>G   R   (   t   argparset   ArgumentParsert   add_subparserst
   add_parsert   add_argumentt   set_defaultsR   t   ost   patht   curdirR   R   R   (   t   st   unpack_parsert   repack_parsert   convert_parsert   version_parsert   help_parser(    (   R'   s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   parser+   s0    c          C  ss   t  ƒ  }  |  j ƒ  } t | d ƒ s1 |  j ƒ  n> y | j | ƒ d SWn& t k
 rn } t | d t j ƒn Xd S(   NR    i    t   filei   (	   R8   t
   parse_argst   hasattrR&   R    R   R   t   syst   stderr(   R'   R   t   e(    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   mainL   s    	(   t   __doc__t
   __future__R    R)   R/   R<   R   t	   ExceptionR   R   R   R   R   R8   R?   (    (    (    s1   /tmp/pip-build-UPPWic/wheel/wheel/cli/__init__.pyt   <module>   s   						!