3

Q'ícKã@svddlmZddlZddlZddlZddlZddljjZ	ddl
Z
e	jZGdd„de	jƒZdd„e	jjDƒej
e_dS)é)ÚDistutilsArgErrorNc@s„eZdZdZejjddgZejjddgZddd	„fd
dd	„fgZe	eƒZ
dd
„Zdd„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-l_bcah40/setuptools/setuptools/command/install.pyÚ<lambda>szinstall.<lambda>Úinstall_scriptscCsdS)NTr	)r
r	r	rrscCstjj|ƒd|_d|_dS)N)ÚorigrÚinitialize_optionsÚold_and_unmanageableÚ!single_version_externally_managed)r
r	r	rr 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	rr%szinstall.finalize_optionscCs(|js|jrtjj|ƒSd|_d|_dS)NÚ)rrrrÚhandle_extra_pathÚ	path_fileÚ
extra_dirs)r
r	r	rr0s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	rr:s
zinstall.runcCsz|dkr4d}tj|ƒtjƒdkr0d}tj|ƒdStj|ƒd}|dd…\}tj|ƒ}|jjdd	ƒ}|d
kox|j	dkS)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	rrEs


zinstall._called_from_setupcCsˆ|jjdƒ}||jd|j|jd}|jƒd|_|jjtjdƒƒ|j	dƒ|jj
dƒjg}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	rr`s
zinstall.do_egg_install)rNr)rNr)r!Ú
__module__Ú__qualname__Ú__doc__rrÚuser_optionsÚboolean_optionsÚnew_commandsÚdictÚ_ncrrrrÚstaticmethodrrr	r	r	rrs 


rcCsg|]}|dtjkr|‘qS)r)rrD)Ú.0r<r	r	rú
<listcomp>{srG)Zdistutils.errorsrrr7r#r%Údistutils.command.installÚcommandrrr:Ú_installÚsub_commandsrBr	r	r	rÚ<module>sl