o
    Zh
                     @  s\   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
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.    )annotationsN)Iterable   )Command)change_rootconvert_pathc                   @  sv   e Zd ZdZg dZdgZdd Zdd Z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
   c                 C  s,   d | _ g | _d | _d| _| jj| _d| _d S )NFT)install_diroutfilesrootr
   distribution
data_fileswarn_dirself r   a/var/www/html/lang_env/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
   )Z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   run1   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   6   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(   L   s   zinstall_data._c                 C  s
   | j pg S r   )r   r   r   r   r   
get_inputsY   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)   )__name__
__module____qualname__descriptionZuser_optionsZboolean_optionsr   r   r   	functoolssingledispatchmethodr   registerstrr   PathLiker(   r,   r-   r   r   r   r   r      s    

r   )__doc__
__future__r   r2   r   collections.abcr   corer   utilr   r   r   r   r   r   r   <module>   s    