o
    	j6h  ã                   @   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 )z€distutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.é    N)ÚCommand)Úchange_rootÚconvert_pathc                   @   sF   e Zd ZdZg d¢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   úy/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/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 ]q}t|tƒr1t|ƒ}| jr!|  d|| jf ¡ |  || j¡\}}| j	 
|¡ q	t|d ƒ}tj |¡sFtj | j|¡}n	| jrOt| j|ƒ}|   |¡ |d g kra| j	 
|¡ q	|d D ]}t|ƒ}|  ||¡\}}| j	 
|¡ qeq	d S )NzMsetup script did not provide a directory for '%s' -- installing right in '%s'r   r	   )Úmkpathr
   r   Ú
isinstanceÚstrr   r   ÚwarnÚ	copy_filer   ÚappendÚosÚpathÚisabsÚjoinr   r   )r   r   ÚoutÚ_ÚdirÚdatar   r   r   Úrun*   s0   

þ
ýæzinstall_data.runc                 C   s
   | j pg S ©N)r   r   r   r   r   Ú
get_inputsK   s   
zinstall_data.get_inputsc                 C   s   | j S r'   )r   r   r   r   r   Úget_outputsN   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   Údistutils.corer   Údistutils.utilr   r   r   r   r   r   r   Ú<module>   s
    