U
    Df
                     @   s<   d Z ddlZddlmZ ddlmZmZ G dd deZdS )zdistutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.    N   )Command)change_rootconvert_pathc                   @   sH   e Zd ZdZdddgZdgZdd Zdd	 Zd
d Zdd Z	dd Z
dS )install_datazinstall data files)zinstall-dir=dzIbase directory for installing data files (default: installation base dir))zroot=Nz<install everything relative to this alternate root directory)forcefz-force installation (overwrite existing files)r   c                 C   s,   d | _ g | _d | _d| _| jj| _d| _d S )Nr      )install_diroutfilesrootr   distribution
data_fileswarn_dirself r   N/tmp/pip-unpacked-wheel-wqy06g0s/setuptools/_distutils/command/install_data.pyinitialize_options   s    
zinstall_data.initialize_optionsc                 C   s   |  dddd d S )Ninstall)r   r   )r   r   )r   r   )set_undefined_optionsr   r   r   r   finalize_options&   s    zinstall_data.finalize_optionsc                 C   s   |  | j | jD ]}t|trht|}| jrH| d| d| j d | || j\}}| j	
| qt|d }tj|stj| j|}n| jrt| j|}|  | |d g kr| j	
| q|d D ](}t|}| ||\}}| j	
| qqd S )Nz.setup script did not provide a directory for 'z' -- installing right in ''r   r
   )mkpathr   r   
isinstancestrr   r   warn	copy_filer   appendospathisabsjoinr   r   )r   r	   out_dirdatar   r   r   run.   s,    


zinstall_data.runc                 C   s
   | j pg S N)r   r   r   r   r   
get_inputsP   s    zinstall_data.get_inputsc                 C   s   | j S r)   )r   r   r   r   r   get_outputsS   s    zinstall_data.get_outputsN)__name__
__module____qualname__descriptionuser_optionsboolean_optionsr   r   r(   r*   r+   r   r   r   r   r      s   "r   )__doc__r    corer   utilr   r   r   r   r   r   r   <module>   s   