o
    LK&hÒ  ã                   @   sP   d 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	 G dd	„ d	e	ƒZ
dS )
zudistutils.command.install_scripts

Implements the Distutils 'install_scripts' command, for installing
Python scripts.é    N)Úlog)ÚST_MODE)ÚClassVaré   )ÚCommandc                   @   s^   e Zd ZU dZg d¢ZddgZeee  e	d< dd„ Z
dd
d„Zddd„Zdd„ Zdd„ Zd	S )Úinstall_scriptsz%install scripts (Python or otherwise)))zinstall-dir=Údzdirectory to install scripts to)z
build-dir=Úbz'build directory (where to install from))ÚforceÚfz-force installation (overwrite existing files))ú
skip-buildNzskip the build stepsr
   r   Úboolean_optionsc                 C   s   d | _ d| _d | _d | _d S )NF)Úinstall_dirr
   Ú	build_dirÚ
skip_build©Úself© r   ú`/var/www/html/venv/lib/python3.10/site-packages/setuptools/_distutils/command/install_scripts.pyÚinitialize_options   s   
z"install_scripts.initialize_optionsÚreturnNc                 C   s    |   dd¡ |   dddd¡ d S )NÚbuild)Úbuild_scriptsr   Úinstall)r   r   )r
   r
   )r   r   )Úset_undefined_optionsr   r   r   r   Úfinalize_options"   s   üz install_scripts.finalize_optionsc                 C   s†   | j s|  d¡ |  | j| j¡| _tjdkr?|  ¡ D ]&}| j	r&t
 d|¡ qt |¡t dB d@ }t
 d||¡ t ||¡ qd S d S )Nr   Úposixzchanging mode of %sim  iÿ  zchanging mode of %s to %o)r   Úrun_commandÚ	copy_treer   r   ÚoutfilesÚosÚnameÚget_outputsÚdry_runr   ÚinfoÚstatr   Úchmod)r   ÚfileÚmoder   r   r   Úrun+   s   

÷zinstall_scripts.runc                 C   s   | j jpg S ©N)ÚdistributionÚscriptsr   r   r   r   Ú
get_inputs:   s   zinstall_scripts.get_inputsc                 C   s
   | j pg S r*   )r   r   r   r   r   r"   =   s   
zinstall_scripts.get_outputs)r   N)Ú__name__Ú
__module__Ú__qualname__ÚdescriptionÚuser_optionsr   r   ÚlistÚstrÚ__annotations__r   r   r)   r-   r"   r   r   r   r   r      s   
 

	r   )Ú__doc__r    Údistutils._logr   r%   r   Útypingr   Úcorer   r   r   r   r   r   Ú<module>   s    