й¼]áã@sVddlZddlmZddlmZddlmZGdd„deƒZdS)é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ú4/opt/alt/python35/lib64/python3.5/install_scripts.pyÚinitialize_optionss   z"install_scripts.initialize_optionscCs*|jdd ƒ|jdd d d ƒdS) NZbuildÚ build_scriptsrÚinstallrrr 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_outputsÚdry_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__Ú descriptionZ user_optionsZboolean_optionsrrr&r(rrrrrrs       r)rZdistutils.corerZ distutilsrr"rrrrrrÚs