U .eB @sddlmZddlZddlZddlZddlmZddlmZddl m Z ddl m Z ddl mZddlmZdd lmZdd lmZerdd lmZmZdd lmZeeZd dZddZddZGdddeZ dS))absolute_importN) cmdoptions)Command)make_target_python)SUCCESS) indent_log)get_pip_version)MYPY_CHECK_RUNNING) format_tag)AnyList)ValuescCstd||dS)Nz{}: {})loggerinfoformat)namevaluer@/usr/lib/python3.8/site-packages/pip/_internal/commands/debug.py show_valuesrc CsFtdttdr"tj}|j}nd}ttd|W5QRXdS)Nzsys.implementation:implementationr)rrhasattrsysrrrr)rZimplementation_namerrrshow_sys_implementations  rc Csd}t|}|}|}d}|r.d|}dt||}t||jdkrpt||krpd}|d|}nd}t8|D]}tt |q|rdj|d }t|W5QRXdS) N rz (target: {})zCompatible tags: {}{}TFz?... [First {tag_limit} tags shown. Pass --verbose to show all.]) tag_limit) rZget_tagsZ format_givenrlenrrverboserr ) optionsrZ target_pythonZtagsZformatted_targetsuffixmsgZ tags_limitedtagrrr show_tags,s,  r$cs0eZdZdZdZdZfddZddZZS) DebugCommandz$ Display debug information. z %prog Tcs4tt|j|||j}t||jd|dS)Nr)superr%__init__cmd_optsrZadd_target_python_optionsparserZinsert_option_group)selfargskwr( __class__rrr'Ws zDebugCommand.__init__cCsvtdtdttdtjtdtjtdttdttdt tdtj t t |tS) NzThis command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.z pip versionz sys.versionzsys.executablezsys.getdefaultencodingzsys.getfilesystemencodingzlocale.getpreferredencodingz sys.platform)rZwarningrrrversion executablegetdefaultencodinggetfilesystemencodinglocaleZgetpreferredencodingplatformrr$r)r*r r+rrrrun^s     zDebugCommand.run) __name__ __module__ __qualname____doc__ZusageZignore_require_venvr'r5 __classcell__rrr-rr%Ns  r%)!Z __future__rr3ZloggingrZpip._internal.clirZpip._internal.cli.base_commandrZpip._internal.cli.cmdoptionsrZpip._internal.cli.status_codesrZpip._internal.utils.loggingrZpip._internal.utils.miscrZpip._internal.utils.typingr Zpip._internal.wheelr typingr r Zoptparser Z getLoggerr6rrrr$r%rrrrs&            "