3 e*@svddlmZddlZddlZddlZddlZddljjZ ddl Z e jZ Gddde jZdde jj Dej e_ dS))DistutilsArgErrorNc@seZdZdZejjddgZejjddgZddd fd d d fgZe eZ d d Z ddZ ddZ ddZeddZddZdS)installz7Use easy_install to install the package, w/dependenciesold-and-unmanageableNTry not to use this!!single-version-externally-managed5used by system package builders to create 'flat' eggsinstall_egg_infocCsdS)NT)selfr r @/tmp/pip-build-vlmub77e/setuptools/setuptools/command/install.pyszinstall.install_scriptscCsdS)NTr )r r r r r scCs*tjdtjtjj|d|_d|_dS)NzRsetup.py install is deprecated. Use build and pip and other standards-based tools.) warningswarn setuptoolsZSetuptoolsDeprecationWarningorigrinitialize_optionsold_and_unmanageable!single_version_externally_managed)r r r r r s  zinstall.initialize_optionscCs<tjj||jrd|_n|jr8|j r8|j r8tddS)NTzAYou must specify --record or --root when building system packages)rrfinalize_optionsrootrrecordr)r r r r r,s zinstall.finalize_optionscCs(|js |jrtjj|Sd|_d|_dS)N)rrrrhandle_extra_path path_file extra_dirs)r r r r r7s  zinstall.handle_extra_pathcCs@|js |jrtjj|S|jtjs4tjj|n|jdS)N) rrrrrun_called_from_setupinspect currentframedo_egg_install)r r r r rAs   z install.runcCsz|dkr4d}tj|tjdkr0d}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) rrplatformpython_implementationrZgetouterframesZ getframeinfo f_globalsgetfunction)Z run_framemsgresZcallerinfoZ caller_moduler r r rLs     zinstall._called_from_setupcCs|jjd}||jd|j|jd}|jd|_|jjtjd|j d|jj dj g}t j rp|jdt j ||_|jdd dt _ dS) N easy_installx)argsrr.z*.eggZ bdist_eggrF)Zshow_deprecation) distributionget_command_classrrensure_finalizedZalways_copy_fromZ package_indexscanglob run_commandget_command_objZ egg_outputrZbootstrap_install_frominsertr0r)r r.cmdr0r r r r gs   zinstall.do_egg_install)rNr)rNr)r$ __module__ __qualname____doc__rr user_optionsboolean_options new_commandsdict_ncrrrr staticmethodrr r r r r rs       rcCsg|]}|dtjkr|qS)r)rrB).0r:r r r srE)Zdistutils.errorsrrr6rr&distutils.command.installcommandrrr_install sub_commandsr@r r r r s  s