
    i;                    v    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
e
          ZdS )zdistutils.command.install_data

Implements the Distutils 'install_data' command, for installing
platform-independent data files.    )annotationsN)Iterable)ClassVar   )Command)change_rootconvert_pathc                      e Zd ZU dZg dZdgZded<   d Zdd	Zdd
Z	e
j        dd            Ze                    e          e                    ej                  dd                        Zd Z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                n    d | _         g | _        d | _        d| _        | j        j        | _        d| _        d S )NFT)install_diroutfilesrootr   distribution
data_fileswarn_dirselfs    b/srv/django_bis/venv311/lib/python3.11/site-packages/setuptools/_distutils/command/install_data.pyinitialize_optionszinstall_data.initialize_options"   s7    	
+6    returnNonec                6    |                      dddd           d S )Ninstall)r   r   )r   r   )r   r   )set_undefined_optionsr   s    r   finalize_optionszinstall_data.finalize_options*   s0    ""+		
 	
 	
 	
 	
r   c                x    |                      | j                   | j        D ]}|                     |           d S N)mkpathr   r   _copy)r   r   s     r   runzinstall_data.run2   sC    D$%%% 	 	AJJqMMMM	 	r   r   5tuple[str | os.PathLike, Iterable[str | os.PathLike]]c                   t          |d                   }t          j                            |          s&t          j                            | j        |          }n| j        rt          | j        |          }|                     |           |d         g k    r| j	        
                    |           d S |d         D ]D}t          |          }|                     ||          \  }}| j	        
                    |           Ed S )Nr      )r	   ospathisabsjoinr   r   r   r$   r   append	copy_file)r   r   dirdataout_s         r   r%   zinstall_data._copy7   s     1Q4  w}}S!! 	.',,t/55CCY 	.di--CCQ42:: M  %%%%% ! * *#D))>>$44a$$S))))* *r   str | os.PathLikec                    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   r2   r3   s       r   r3   zinstall_data._M   s     OO= 	IIEE E151AE E E   >>!T%566aS!!!!!r   c                    | j         pg S r#   )r   r   s    r   
get_inputszinstall_data.get_inputsZ   s    $"$r   c                    | j         S r#   )r   r   s    r   get_outputszinstall_data.get_outputs]   s
    }r   N)r   r   )r   r'   )r   r4   )__name__
__module____qualname__descriptionuser_optionsr   __annotations__r   r!   r&   	functoolssingledispatchmethodr%   registerstrr*   PathLiker3   r9   r;    r   r   r   r      s         &K  L -49O4444  
 
 
 
   
 #* * * $#** ^^C
^^BK  	" 	" 	" !  	"% % %    r   r   )__doc__
__future__r   rB   r*   collections.abcr   typingr   corer   utilr   r	   r   rG   r   r   <module>rN      s   $ $ # " " " " "     				 $ $ $ $ $ $             , , , , , , , ,K K K K K7 K K K K Kr   