a oe@sddlmZddlZddlZddlZddlmmZddl Z ddl m Z m Z ejZ GdddejZddejjDeje_dS) )DistutilsArgErrorN)SetuptoolsDeprecationWarningSetuptoolsWarningc@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_infocCsdSNTselfr r ;C:\Program Files\Certbot\pkgs\setuptools\command\install.pyzinstall.Zinstall_scriptscCsdSr r r r r r r rcCs,tjddddtj|d|_d|_dS)Nzsetup.py install is deprecated.z Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. zAhttps://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html)Zsee_url)remitorigrinitialize_optionsold_and_unmanageable!single_version_externally_managedr r r r r$s zinstall.initialize_optionscCs8tj||jrd|_n|jr4|js4|js4tddS)NTzAYou must specify --record or --root when building system packages)rrfinalize_optionsrootrrecordrr r r r r6s  zinstall.finalize_optionscCs(|js |jrtj|Sd|_d|_dS)N)rrrrhandle_extra_pathZ path_fileZ extra_dirsr r r r rAs  zinstall.handle_extra_pathcCs@|js |jrtj|S|ts4tj|n|dS)N) rrrrrun_called_from_setupinspectZ currentframedo_egg_installr r r r rKs   z install.runcCs|dur4d}t|tdkr0d}t|dSt|}|ddD]R}|dd\}t|}|jd d }|d kr|j d krqJ|d ko|j dkSdS)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.Tr__name__rzsetuptools.dist run_commandzdistutils.distZ run_commands) rrplatformZpython_implementationrZgetouterframesZ getframeinfo f_globalsgetfunction)Z run_framemsgZframesframeZcallerinfoZ caller_moduler r r rVs      zinstall._called_from_setupcCs|jd}||jd|j|jd}|d|_|jtd| d|j dj g}t j rp|dt j ||_|jdd dt _ dS) N easy_installx)argsrr.z*.eggZ bdist_eggrF)Zshow_deprecation)Z distributionZget_command_classrrZensure_finalizedZalways_copy_fromZ package_indexscanglobr!Zget_command_objZ egg_output setuptoolsZbootstrap_install_frominsertr+r)r r)cmdr+r r r rus"   zinstall.do_egg_installN)r __module__ __qualname____doc__rrZ user_optionsZboolean_options new_commandsdict_ncrrrr staticmethodrrr r r r rs(      rcCsg|]}|dtjvr|qS)r)rr7).0r1r r r sr:)Zdistutils.errorsrrr.r"Zdistutils.command.installZcommandrrr/warningsrr_installZ sub_commandsr5r r r r s