관리-도구
편집 파일: install_egg_info.cpython-35.pyc
��Yf" � @ 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 Gd d � d e � Z d d � Z d d � Z d d � Z d S) z�distutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.� )�Command)�log�dir_utilNc @ sU e Z d Z d Z d Z d g Z d d � Z d d � Z d d � Z d d � Z d S)�install_egg_infoz)Install an .egg-info file for the packagez8Install 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 �G/opt/alt/python35/lib64/python3.5/distutils/command/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�distributionZget_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__�__doc__ZdescriptionZuser_optionsr r r'