3
\ @ sD d Z ddlZddlmZ ddlmZ ddlmZ G dd deZdS )zudistutils.command.install_scripts
Implements the Distutils 'install_scripts' command, for installing
Python scripts. N)Command)log)ST_MODEc @ sL e Zd ZdZddddgZddgZdd Zdd Zdd Zdd Z dd Z
dS )install_scriptsz%install scripts (Python or otherwise)install-dir=ddirectory to install scripts to
build-dir=b'build directory (where to install from)forcef-force installation (overwrite existing files)
skip-buildNskip the build stepsc C s d | _ d| _d | _d | _d S )Nr )install_dirr build_dir
skip_build)self r '/usr/lib64/python3.6/install_scripts.pyinitialize_options s z"install_scripts.initialize_optionsc C s | j dd | j dd
dd d S )
NZbuild
build_scriptsr Zinstallr r r r )r r )r r )r r )r r )Zset_undefined_options)r r r r finalize_options! s
z install_scripts.finalize_optionsc C s | j s| jd | j| j| j| _tjdkrxT| j D ]H}| j rNt
jd| q6tj|t
dB d@ }t
jd|| tj|| q6W d S )Nr posixzchanging mode of %sim i zchanging mode of %s to %o)r Zrun_commandZ copy_treer r outfilesosnameget_outputsZdry_runr infostatr chmod)r filemoder r r run) s
zinstall_scripts.runc C s | j jp
g S )N)Zdistributionscripts)r r r r
get_inputs8 s zinstall_scripts.get_inputsc C s
| j pg S )N)r )r r r r r ; s zinstall_scripts.get_outputs)r r r )r r
r )r r
r )r Nr )__name__
__module____qualname__descriptionZuser_optionsZboolean_optionsr r r$ r&