ðÕYfáã@s\dZddlZddlmZddlmZddlmZGdd„deƒZdS)zudistutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.éN)ÚCommand)Úlog)ÚST_MODEc@speZdZdZddddgZdd 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 stepscCs(d|_d|_d|_d|_dS)Nr)Ú install_dirr Ú build_dirÚ skip_build)Úself©rúF/opt/alt/python35/lib64/python3.5/distutils/command/install_scripts.pyÚinitialize_optionss   z"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±xn|jƒD]`}|j rot j d|ƒqMtj |ƒt dBd@}t j d||ƒtj||ƒqMWdS)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|jjpgS)N)Z distributionÚscripts)rrrrÚ get_inputs8szinstall_scripts.get_inputscCs |jp gS)N)r)rrrrr;szinstall_scripts.get_outputs)rrr)r r r )r r r)rNr) Ú__name__Ú __module__Ú __qualname__Z descriptionZ user_optionsZboolean_optionsrrr$r&rrrrrrs       r) Ú__doc__rZdistutils.corerZ distutilsrr rrrrrrÚs