o )a*@s|ddlmZddlZddlZddlZddlZddlmmZ ddl Z e jZ Gddde jZdde jj Dej e_ dS))DistutilsArgErrorNc@seZdZdZejjddgZejjddgZdddfd d dfgZe eZ d d Z d dZ ddZ ddZeddZddZdS)installz7Use easy_install to install the package, w/dependencies)old-and-unmanageableNzTry not to use this!)!single-version-externally-managedNz5used by system package builders to create 'flat' eggsrrZinstall_egg_infocCdSNTselfrrM/opt/alt/python310/lib/python3.10/site-packages/setuptools/command/install.pyzinstall.Zinstall_scriptscCrrrr rrr r r cCs*tdtjtj|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_managedr rrr r s  zinstall.initialize_optionscCsBtj||jrd|_dS|jr|js|jstddSdSdS)NTzAYou must specify --record or --root when building system packages)rrfinalize_optionsrootrrecordrr rrr r,s   zinstall.finalize_optionscCs(|js|jr tj|Sd|_d|_dS)N)rrrrhandle_extra_pathZ path_fileZ extra_dirsr rrr r7s   zinstall.handle_extra_pathcCsB|js|jr tj|S|tstj|dS|dS)N) rrrrrun_called_from_setupinspectZ currentframedo_egg_installr rrr rAs   z install.runcCsz|durd}t|tdkrd}t|dSt|d}|dd\}t|}|jdd }|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.Z IronPythonz6For best results, pass -X:Frames to enable call stack.T__name__rzdistutils.distZ run_commands) rrplatformZpython_implementationrZgetouterframesZ getframeinfo f_globalsgetZfunction)Z run_framemsgresZcallerinfoZ caller_modulerrr rLs     zinstall._called_from_setupcCs|jd}||jd|j|jd}|d|_|jtd| d|j dj g}t j r8|dt j ||_|jdd dt _ dS) N easy_installx)argsrr.z*.eggZ bdist_eggrF)Zshow_deprecation)Z distributionZget_command_classrrZensure_finalizedZalways_copy_fromZ package_indexscanglobZ run_commandZget_command_objZ egg_outputrZbootstrap_install_frominsertr)r)r r'cmdr)rrr rgs    zinstall.do_egg_installN)r __module__ __qualname____doc__rrZ user_optionsZboolean_options new_commandsdict_ncrrrr staticmethodrrrrrr rs(       rcCsg|] }|dtjvr|qS)r)rr4).0r.rrr sr7)Zdistutils.errorsrrr,rr!Zdistutils.command.installZcommandrrr_installZ sub_commandsr2rrrr s s