ģō
 \Kc           @   s   d  Z  d d k l Z d d k l Z l Z d d k Z d d k Z d d k Z d e f d     YZ	 d   Z
 d   Z d	   Z d S(
   s   distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.iĸĸĸĸ(   t   Command(   t   logt   dir_utilNt   install_egg_infoc           B   sA   e  Z d  Z d Z d	 g Z d   Z d   Z d   Z d   Z RS(
   s)   Install an .egg-info file for the packages8   Install package's PKG-INFO metadata as an .egg-info files   install-dir=t   ds   directory to install toc         C   s   d  |  _ d  S(   N(   t   Nonet   install_dir(   t   self(    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyt   initialize_options   s    c         C   sx   |  i  d d  d t t |  i i     t t |  i i     f } t i i	 |  i
 |  |  _ |  i g |  _ d  S(   Nt   install_libR   s   %s-%s.egg-info(   s   install_dirs   install_dir(   t   set_undefined_optionst   to_filenamet	   safe_namet   distributiont   get_namet   safe_versiont   get_versiont   ost   patht   joinR   t   targett   outputs(   R   t   basename(    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyt   finalize_options   s    c         C   s  |  i  } t i i |  o. t i i |  o t i | d |  i nu t i i |  o$ |  i	 t i
 |  i  f d |  n> t i i |  i  p' |  i	 t i |  i f d |  i  n t i d |  |  i p0 t | d  } |  i i i |  | i   n d  S(   Nt   dry_runs	   Removing s	   Creating s
   Writing %st   w(   R   R   R   t   isdirt   islinkR   t   remove_treeR   t   existst   executet   unlinkR   t   makedirsR   t   infot   openR   t   metadatat   write_pkg_filet   close(   R   R   t   f(    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyt   run   s    	'$
c         C   s   |  i  S(   N(   R   (   R   (    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyt   get_outputs.   s    (   s   install-dir=R   s   directory to install to(	   t   __name__t
   __module__t   __doc__t   descriptiont   user_optionsR   R   R'   R(   (    (    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyR      s   					c         C   s   t  i d d |   S(   s   Convert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    s   [^A-Za-z0-9.]+t   -(   t   ret   sub(   t   name(    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyR   6   s    c         C   s%   |  i  d d  }  t i d d |   S(   sĖ   Convert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
    t    t   .s   [^A-Za-z0-9.]+R.   (   t   replaceR/   R0   (   t   version(    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyR   >   s    c         C   s   |  i  d d  S(   s|   Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    R.   t   _(   R4   (   R1   (    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pyR   H   s    (   R+   t   distutils.cmdR    t	   distutilsR   R   R   t   sysR/   R   R   R   R   (    (    (    s8   /usr/lib/python2.5/distutils/command/install_egg_info.pys   <module>   s   $+		
