3 Õì2aáã@s@ddlZddlmZddlmZddlmZGdd„deƒZdS)é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ú4/opt/alt/python36/lib64/python3.6/install_scripts.pyÚinitialize_optionssz"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‚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__Ú descriptionZ user_optionsZboolean_optionsrrr%r'rrrrrrsr)rZdistutils.corerZ distutilsrr!rrrrrrÚs