관리-도구
편집 파일: install_egg_info.cpython-35.opt-2.pyc
���]" � @ s� d d l m Z d d l m Z m Z d d l Z d d l Z d d l Z Gd d � d e � Z d d � Z d d � Z d d � Z d S)� )�Command)�log�dir_utilNc @ sO e Z d Z d Z d g Z d d � Z d d � Z d d � Z d d � Z d S)�install_egg_infoz8Install package's PKG-INFO metadata as an .egg-info file�install-dir=�d�directory to install toc C s d | _ d S)N)�install_dir)�self� r �5/opt/alt/python35/lib64/python3.5/install_egg_info.py�initialize_options s z#install_egg_info.initialize_optionsc C s� | j d d � d t t | j j � � � t t | j j � � � t j d d � f } t j j | j | � | _ | j g | _ d S)NZinstall_libr z%s-%s-py%s.egg-info� )r r )Zset_undefined_options�to_filename� safe_name�distribution�get_name�safe_versionZget_version�sys�version�os�path�joinr �target�outputs)r �basenamer r r �finalize_options s z!install_egg_info.finalize_optionsc C s | j } t j j | � rG t j j | � rG t j | d | j �nm t j j | � r| | j t j | j f d | � n8 t j j | j � s� | j t j | j f d | j � t j d | � | j s� t | d d d �� } | j j j | � Wd QRXd S)N�dry_runz Removing z Creating z Writing %s�w�encodingzUTF-8)r r r �isdir�islinkr Zremove_treer �existsZexecute�unlinkr �makedirsr �info�openr ZmetadataZwrite_pkg_file)r r �fr r r �run s %# zinstall_egg_info.runc C s | j S)N)r )r r r r �get_outputs. s zinstall_egg_info.get_outputsN)r r r ) �__name__� __module__�__qualname__�descriptionZuser_optionsr r r( r) r r r r r s r c C s t j d d | � S)Nz[^A-Za-z0-9.]+�-)�re�sub)�namer r r r 6 s r c C s% | j d d � } t j d d | � S)N� �.z[^A-Za-z0-9.]+r. )�replacer/ r0 )r r r r r >