File: //lib/python3/dist-packages/setuptools/command/__pycache__/install_egg_info.cpython-38.pyc
U
tD7h{ � @ sd d dl mZmZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl
Z
G dd� deje�ZdS )� )�log�dir_utilN)�Command)�
namespaces)�unpack_archivec @ sB e Zd ZdZdZdgZdd� Zdd� Zdd� Zd d
� Z dd� Z
d
S )�install_egg_infoz.Install an .egg-info directory for the package)zinstall-dir=�dzdirectory to install toc C s d | _ d | _d | _d S �N)�install_dir�install_layout�
prefix_option��self� r �E/usr/lib/python3/dist-packages/setuptools/command/install_egg_info.py�initialize_options s z#install_egg_info.initialize_optionsc C s� | � dd� | � dd� tjdkr.| � dd� | �d�}t�d d |j|j��� d }| jr�| j� � d krpt
d
��| j� � | _|�dtj d�}n$| j
s�d
tjkr�n|�dtj d�}|j| _tj�| j|�| _g | _d S )NZinstall_lib)r
r
�install)r r i )r r �egg_infoz .egg-info�Zdebz"unknown value for --install-layoutz-py%s� Zreal_prefix)Zset_undefined_options�sys�
hexversionZget_finalized_command�
pkg_resourcesZDistributionZegg_nameZegg_versionr �lowerZDistutilsOptionError�replaceZPY_MAJORr �__dict__r �source�os�path�joinr
�target�outputs)r Zei_cmd�basenamer r r �finalize_options s4 �
��z!install_egg_info.finalize_optionsc C s� | � d� tj�| j�r:tj�| j�s:tj| j| jd� n(tj� | j�rb| �
tj| jfd| j � | jstt�
| j� | �
| jdd| j| jf � | �� d S )Nr )�dry_runz Removing r �Copying %s to %s)Zrun_commandr r �isdirr �islinkr Zremove_treer$ �existsZexecute�unlinkr Zensure_directory�copytreer Zinstall_namespacesr
r r r �run2 s
�zinstall_egg_info.runc C s | j S r )r! r
r r r �get_outputs? s zinstall_egg_info.get_outputsc s � fdd�}t � j� j|� d S )Nc sl dD ] }| � |�sd| | kr d S q� jrN� jdkrN| � d�rNt�d� d S � j�|� t�d| |� |S )N)z.svn/zCVS/�/r zSOURCES.txtzSkipping SOURCES.txtr% )�
startswithr r �infor! �append�debug)�srcZdst�skipr
r r �skimmerD s
z*install_egg_info.copytree.<locals>.skimmer)r r r )r r4 r r
r r* B s zinstall_egg_info.copytreeN)�__name__�
__module__�__qualname__�__doc__ZdescriptionZuser_optionsr r# r+ r, r* r r r r r
s �
r )
Z distutilsr r r r Z
setuptoolsr r Zsetuptools.archive_utilr r Z Installerr r r r r �<module> s