î h fáã@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/python34/lib64/python3.4/distutils/command/install_scripts.pyÚinitialize_optionss   z"install_scripts.initialize_optionscCs*|jdd ƒ|jdd d d ƒdS) NZbuildÚ build_scriptsrZinstallrrr r)rz build_dir)zinstall_scriptsz install_dir)úforcer)ú skip_buildr)Zset_undefined_options)rrrrÚfinalize_options!s  z install_scripts.finalize_optionscCs»|js|jdƒn|j|j|jƒ|_tjdkr·xq|jƒD]`}|j rrt j d|ƒqPtj |ƒt dBd@}t j d||ƒtj||ƒqPWndS)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 )zforcer r)rNr) Ú__name__Ú __module__Ú __qualname__Z descriptionZ user_optionsZboolean_optionsrrr&r(r rrrrrs       r) Ú__doc__rZdistutils.corerZ distutilsrr"rrrrrrÚs