File: //proc/self/root/usr/lib64/python2.7/distutils/command/install_egg_info.pyo
�
t�fc           @   s�   d  Z  d d l m Z d d l m Z m Z d d l Z d d l Z d d l 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(    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyt   initialize_options   s    c         C   s�   |  j  d d � d t t |  j j �  � � t t |  j j �  � � t j d  f } t	 j
 j |  j | � |  _
 |  j
 g |  _ d  S(   Nt   install_libR   s   %s-%s-py%s.egg-infoi   (   s   install_dirs   install_dir(   t   set_undefined_optionst   to_filenamet	   safe_namet   distributiont   get_namet   safe_versiont   get_versiont   syst   versiont   ost   patht   joinR   t   targett   outputs(   R   t   basename(    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyt   finalize_options   s    c         C   s  |  j  } t j j | � rG t j j | � rG t j | d |  j �np t j j | � r| |  j	 t j
 |  j  f d | � n; t j j |  j � s� |  j	 t j |  j f d |  j � n  t
 j d | � |  j s� t | d � } |  j j j | � | j �  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(    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyt   run    s    	%#	c         C   s   |  j  S(   N(   R   (   R   (    (    s:   /usr/lib64/python2.7/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*   (    (    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyR      s   			
	c         C   s   t  j 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(    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyR   7   s    c         C   s%   |  j  d d � }  t j 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.]+R0   (   t   replaceR1   R2   (   R   (    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyR   ?   s    c         C   s   |  j  d d � S(   s|   Convert a project or version name to its filename-escaped form
    Any '-' characters are currently replaced with '_'.
    R0   t   _(   R6   (   R3   (    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyR   I   s    (
   R-   t
   distutils.cmdR    t	   distutilsR   R   R   R   R1   R   R   R   R   (    (    (    s:   /usr/lib64/python2.7/distutils/command/install_egg_info.pyt   <module>   s   $,