Ñò
6»‚Uc           @   sX   d  d k  l Z d  d k l Z l Z l Z d „  Z d e f d „  ƒ  YZ d „  Z d S(   iÿÿÿÿ(   t   DistutilsOptionError(   t   edit_configt   option_baset   config_filec         C   sN   x& d D] } | |  j o t  |  ƒ Sq W|  i ƒ  |  g j o t  |  ƒ S|  S(   s4   Quote an argument for later parsing by shlex.split()t   "t   's   \t   #(   R   R   s   \R   (   t   reprt   split(   t   argt   c(    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyt   shquote   s     t   aliasc           B   sU   e  Z d  Z d Z e Z d g e i Z e i d g Z d „  Z	 d „  Z
 d „  Z RS(	   s3   Define a shortcut that invokes one or more commandss0   define a shortcut to invoke one or more commandst   removet   rs   remove (unset) the aliasc         C   s#   t  i |  ƒ d  |  _ d  |  _ d  S(   N(   R   t   initialize_optionst   Nonet   argsR   (   t   self(    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyR      s    	c         C   sA   t  i |  ƒ |  i o& t |  i ƒ d j o t d ƒ ‚ n d  S(   Ni   sF   Must specify exactly one argument (the alias name) when using --remove(   R   t   finalize_optionsR   t   lenR   R    (   R   (    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyR   !   s     c         C   s  |  i  i d ƒ } |  i p4 d GHd GHx" | D] } d t | | ƒ f GHq- Wd  St |  i ƒ d j oW |  i \ } |  i o
 d  } qé | | j o d t | | ƒ f GHd  Sd | GHd  Sn- |  i d } d i t t	 |  i d ƒ ƒ } t
 |  i h h | | 6d 6|  i ƒ d  S(	   Nt   aliasess   Command Aliasess   ---------------s   setup.py aliasi   s    No alias definition found for %ri    t    (   t   distributiont   get_option_dictR   t   format_aliasR   R   R   t   joint   mapR   R   t   filenamet   dry_run(   R   R   R   t   command(    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyt   run)   s(    
 

	(   s   removeR   s   remove (unset) the alias(   t   __name__t
   __module__t   __doc__t   descriptiont   Truet   command_consumes_argumentsR   t   user_optionst   boolean_optionsR   R   R   (    (    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyR      s   
		c         C   s   | |  \ } } | t  d ƒ j o
 d } nE | t  d ƒ j o
 d } n( | t  d ƒ j o
 d } n d | } | |  d | S(	   Nt   globals   --global-config t   users   --user-config t   localt    s   --filename=%rR   (   R   (   t   nameR   t   sourceR   (    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyR   D   s    



N(	   t   distutils.errorsR    t   setuptools.command.setoptR   R   R   R   R   R   (    (    (    s<   /usr/lib/python2.6/site-packages/setuptools/command/alias.pyt   <module>   s   	
4