
    ?wg
                    b    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	e      Zy)
zdistutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.    )annotationsN)Iterable   )Command)change_rootconvert_pathc                      e Zd ZdZg dZdgZd Zd Zd Ze	j                  dd       Zej                  e      ej                  ej                        dd              Zd	 Zd
 Zy)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                    d | _         g | _        d | _        d| _        | j                  j
                  | _        d| _        y )NFT)install_diroutfilesrootr   distribution
data_fileswarn_dirselfs    a/var/www/horilla/myenv/lib/python3.12/site-packages/setuptools/_distutils/command/install_data.pyinitialize_optionszinstall_data.initialize_options!   s9    	
++66    c                ,    | j                  dddd       y )Ninstall)r
   r   )r   r   )r   r   )set_undefined_optionsr   s    r   finalize_optionszinstall_data.finalize_options)   s    ""+		
r   c                ~    | j                  | j                         | j                  D ]  }| j                  |        y N)mkpathr   r   _copy)r   r   s     r   runzinstall_data.run1   s2    D$$% 	AJJqM	r   c                   t        |d         }t        j                  j                  |      s+t        j                  j	                  | j
                  |      }n"| j                  rt        | j                  |      }| j                  |       |d   g k(  r| j                  j                  |       y |d   D ]=  }t        |      }| j                  ||      \  }}| j                  j                  |       ? y )Nr      )r   ospathisabsjoinr   r   r   r    r   append	copy_file)r   r   dirdataout_s         r   r!   zinstall_data._copy6   s     1Q4 ww}}S!'',,t//5CYYdii-CCQ42: MM  % ! *#D)>>$4a$$S)*r   c                    t        |      }| j                  r"| j                  d| d| j                   d       | j	                  || j                        \  }}| j
                  j                  |       y )Nz.setup script did not provide a directory for 'z' -- installing right in '')r   r   warnr   r*   r   r)   )r   r   r-   r.   s       r   r.   zinstall_data._L   sn     O==II301A1A0B!E >>!T%5%56aS!r   c                "    | j                   xs g S r   )r   r   s    r   
get_inputszinstall_data.get_inputsY   s    $"$r   c                    | j                   S r   )r   r   s    r   get_outputszinstall_data.get_outputs\   s    }}r   N)r   z5tuple[str | os.PathLike, Iterable[str | os.PathLike]])r   zstr | os.PathLike)__name__
__module____qualname__descriptionuser_optionsboolean_optionsr   r   r"   	functoolssingledispatchmethodr!   registerstrr%   PathLiker.   r3   r5    r   r   r
   r
      s|    &KL iO

 ##* $** ^^C
^^BKK 	" ! 	"%r   r
   )__doc__
__future__r   r<   r%   collections.abcr   corer   utilr   r   r
   rA   r   r   <module>rG      s,   $ #  	 $  ,K7 Kr   