3 � f��@sDdZddlZddlmZddlmZddlmZGdd�de�ZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.�N)�Command)�log)�ST_MODEc@sLeZdZdZddddgZdd gZdd�Zdd�Zdd�Zdd�Z dd�Z d S)�install_scriptsz%install scripts (Python or otherwise)� install-dir=�d�directory to install scripts to� build-dir=�b�'build directory (where to install from)�force�f�-force installation (overwrite existing files)� skip-buildN�skip the build stepscCsd|_d|_d|_d|_dS)Nr)� install_dirr � build_dir� skip_build)�self�r�F/opt/alt/python36/lib64/python3.6/distutils/command/install_scripts.py�initialize_optionssz"install_scripts.initialize_optionscCs |jdd �|jdd d d �dS) NZbuild� build_scriptsrZinstallrrr r)rr)rr)r r )rr)Zset_undefined_options)rrrr�finalize_options!s  z install_scripts.finalize_optionscCs�|js|jd�|j|j|j�|_tjdkr�xT|j�D]H}|j rNt j d|�q6tj |�t dBd@}t j d||�tj||�q6WdS)Nr�posixzchanging mode of %simi�zchanging mode of %s to %o)rZ run_commandZ copy_treerr�outfiles�os�name� get_outputsZdry_runr�info�statr�chmod)r�file�moderrr�run)s  zinstall_scripts.runcCs |jjp gS)N)Z distribution�scripts)rrrr� get_inputs8szinstall_scripts.get_inputscCs |jpgS)N)r)rrrrr;szinstall_scripts.get_outputs)rrr)r r r )r r r)rNr) �__name__� __module__� __qualname__Z descriptionZ user_optionsZboolean_optionsrrr$r&rrrrrrsr) �__doc__rZdistutils.corerZ distutilsrr rrrrrr�<module>s