ReK@sddlmZddlZddlZddlZddlZddljjZ 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 /builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/install.pyszinstall.install_scriptscCsdS)NTr )r r r r r scCs&tjj|d|_d|_dS)N)origrinitialize_optionsold_and_unmanageable!single_version_externally_managed)r r r r r s zinstall.initialize_optionscCsRtjj||jr%d|_n)|jrN|j rN|j rNtddS)NTzAYou must specify --record or --root when building system packages)rrfinalize_optionsrootrrecordr)r r r r r%s   zinstall.finalize_optionscCs8|js|jr"tjj|Sd|_d|_dS)N)rrrrhandle_extra_path path_file extra_dirs)r r r r r0s zinstall.handle_extra_pathcCsX|js|jr"tjj|S|jtjsJtjj|n |jdS)N) rrrrrun_called_from_setupinspect currentframedo_egg_install)r r r r r:s z install.runcCs|dkrHd}tj|tjdkrDd}tj|dStj|d}|dd\}tj|}|jjdd }|d ko|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) warningswarnplatformpython_implementationrgetouterframes getframeinfo f_globalsgetfunction)Z run_framemsgresZcallerinfoZ caller_moduler r r rEs    zinstall._called_from_setupcCs|jjd}||jddd|jd|j}|jd|_|jjtjd|j d|jj dj g}t j r|jd t j ||_|jdt _ dS) N easy_installargsxrr.z*.eggZ bdist_eggr) distributionget_command_classrrensure_finalizedZalways_copy_fromZ package_indexscanglob run_commandget_command_objZ egg_output setuptoolsZbootstrap_install_frominsertr0r)r r/cmdr0r r r r`s$      zinstall.do_egg_install)rNr)rNr)r! __module__ __qualname____doc__rr user_optionsboolean_options new_commandsdict_ncrrrr staticmethodrrr r r r rs        rcCs)g|]}|dtjkr|qS)r)rrD).0r<r r r {s rG)distutils.errorsrrr7r#r%distutils.command.installcommandrrr:_install sub_commandsrBr r r r s      l