o
    5‘ði;  ã                   @  sh   d Z ddlmZ ddlZddlZddlmZ ddlm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.é    )ÚannotationsN)ÚIterable)ÚClassVaré   )ÚCommand)Úchange_rootÚconvert_pathc                   @  s„   e Zd ZU dZg d¢ZdgZded< dd„ Zdd
d„Zddd„Z	e
jddd„ƒZe e¡e ej¡d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   zClassVar[list[str]]Úboolean_optionsc                 C  s,   d | _ g | _d | _d| _| jj| _d| _d S )NFT)Úinstall_dirÚoutfilesÚrootr   ÚdistributionÚ
data_filesÚwarn_dir©Úself© r   úi/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/_distutils/command/install_data.pyÚinitialize_options"   s   

zinstall_data.initialize_optionsÚreturnÚNonec                 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	d S ©N)Úmkpathr   r   Ú_copy)r   r   r   r   r   Úrun2   s   
ÿzinstall_data.runr   ú5tuple[str | os.PathLike, Iterable[str | os.PathLike]]c                 C  s˜   t |d ƒ}tj |¡stj | j|¡}n	| jrt| j|ƒ}|  |¡ |d g kr1| j	 
|¡ d S |d D ]}t |ƒ}|  ||¡\}}| j	 
|¡ q5d S )Nr   é   )r   ÚosÚpathÚisabsÚjoinr   r   r   r   r   ÚappendÚ	copy_file)r   r   ÚdirÚdataÚoutÚ_r   r   r   r    7   s   
ýzinstall_data._copyústr | os.PathLikec                 C  sJ   t |ƒ}| jr|  d|› d| j› d�¡ |  || j¡\}}| j |¡ d S )Nz.setup script did not provide a directory for 'z' -- installing right in 'ú')r   r   Úwarnr   r)   r   r(   )r   r   r,   r-   r   r   r   r-   M   s   ÿÿÿzinstall_data._c                 C  s
   | j pg S r   )r   r   r   r   r   Ú
get_inputsZ   s   
zinstall_data.get_inputsc                 C  s   | j S r   )r   r   r   r   r   Úget_outputs]   s   zinstall_data.get_outputsN)r   r   )r   r"   )r   r.   )Ú__name__Ú
__module__Ú__qualname__ÚdescriptionÚuser_optionsr   Ú__annotations__r   r   r!   Ú	functoolsÚsingledispatchmethodr    ÚregisterÚstrr$   ÚPathLiker-   r1   r2   r   r   r   r   r	      s   
 



r	   )Ú__doc__Ú
__future__r   r9   r$   Úcollections.abcr   Útypingr   Úcorer   Úutilr   r   r	   r   r   r   r   Ú<module>   s    