3 �˜‚]Kã@svddlmZddlZddlZddlZddlZddljjZ ddl Z e jZ Gdd„de jƒZdd„e jj Dƒej e_ dS)é)ÚDistutilsArgErrorNc@s„eZdZdZejjddgZejjddgZddd „fd d d „fgZe eƒZ d d „Z dd„Z dd„Z dd„Zedd„ƒZdd„ZdS)Úinstallz7Use easy_install to install the package, w/dependenciesúold-and-unmanageableNúTry not to use this!ú!single-version-externally-managedú5used by system package builders to create 'flat' eggsÚinstall_egg_infocCsdS)NT©)Úselfr r ú@/tmp/pip-build-8jg9gmni/setuptools/setuptools/command/install.pyÚszinstall.Úinstall_scriptscCsdS)NTr )r r r r r scCstjj|ƒd|_d|_dS)N)ÚorigrÚinitialize_optionsÚold_and_unmanageableÚ!single_version_externally_managed)r r r r r s zinstall.initialize_optionscCs<tjj|ƒ|jrd|_n|jr8|j r8|j r8tdƒ‚dS)NTzAYou must specify --record or --root when building system packages)rrÚfinalize_optionsÚrootrÚrecordr)r r r r r%s zinstall.finalize_optionscCs(|js |jrtjj|ƒSd|_d|_dS)NÚ)rrrrÚhandle_extra_pathÚ path_fileÚ extra_dirs)r r r r r0s  zinstall.handle_extra_pathcCs@|js |jrtjj|ƒS|jtjƒƒs4tjj|ƒn|jƒdS)N) rrrrÚrunÚ_called_from_setupÚinspectÚ currentframeÚdo_egg_install)r r r r r:s   z install.runcCsz|dkr4d}tj|ƒtjƒdkr0d}tj|ƒdStj|ƒd}|dd…\}tj|ƒ}|jjdd ƒ}|d kox|j d kS) añ Attempt to detect whether run() was called from setup() or by another command. If called by setup(), the parent caller will be the 'run_command' method in 'distutils.dist', and *its* caller will be the 'run_commands' method. If called any other way, the immediate caller *might* be 'run_command', but it won't have been called by 'run_commands'. Return True in that case or if a call stack is unavailable. Return False otherwise. Nz4Call stack not available. bdist_* commands may fail.Ú IronPythonz6For best results, pass -X:Frames to enable call stack.TééÚ__name__rzdistutils.distÚ run_commands) ÚwarningsÚwarnÚplatformÚpython_implementationrÚgetouterframesÚ getframeinfoÚ f_globalsÚgetÚfunction)Z run_frameÚmsgÚresZcallerÚinfoZ caller_moduler r r rEs     zinstall._called_from_setupcCsˆ|jjdƒ}||jd|j|jd�}|jƒd|_|jjtjdƒƒ|j dƒ|jj dƒj g}t j rp|jdt j ƒ||_|jƒdt _ dS)NÚ easy_installÚx)ÚargsrrÚ.z*.eggZ bdist_eggr)Ú distributionÚget_command_classrrÚensure_finalizedZalways_copy_fromZ package_indexÚscanÚglobÚ run_commandÚget_command_objZ egg_outputÚ setuptoolsZbootstrap_install_fromÚinsertr1r)r r/Úcmdr1r r r r`s  zinstall.do_egg_install)rNr)rNr)r!Ú __module__Ú __qualname__Ú__doc__rrÚ user_optionsÚboolean_optionsÚ new_commandsÚdictÚ_ncrrrrÚ staticmethodrrr r r r rs      rcCsg|]}|dtjkr|‘qS)r)rrD)Ú.0r<r r r ú {srG)Zdistutils.errorsrrr7r#r%Údistutils.command.installÚcommandrrr:Ú_installÚ sub_commandsrBr r r r Ús  l