Your IP : 18.218.3.204
3
� f+
� @ sd d Z ddlmZ ddlmZmZ ddlZddlZddlZG dd� de�Z dd� Z
d d
� Zdd� ZdS )
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 @ s: e Zd ZdZdZdgZdd� Zdd � Zd
d� Zdd
� Z dS )�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/python36/lib64/python3.6/distutils/command/install_egg_info.py�initialize_options s z#install_egg_info.initialize_optionsc C sb | j dd� dtt| jj� ��tt| jj� ��ftjd d� � }t j
j| j|�| _
| j
g| _d S )NZinstall_libr z%s-%s-py%d.%d.egg-info� )r r )Zset_undefined_options�to_filename� safe_name�distributionZget_name�safe_versionZget_version�sys�version_info�os�path�joinr �target�outputs)r
�basenamer r r �finalize_options s z!install_egg_info.finalize_optionsc C s� | j }tjj|�r2tjj|� r2tj|| jd� nNtjj|�rX| j tj
| j fd| � n(tjj| j�s�| j tj| jfd| j � t
jd|� | js�t|ddd��}| jjj|� W d Q R X d S )N)�dry_runz Removing z Creating z
Writing %s�wzUTF-8)�encoding)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'