a *eg@sddlZddlZddlZddlZddlmZddlmZddlm Z m Z m Z m Z ddl ZddlmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd l m!Z!ddl"m#Z#ddl$m%Z%e&e'Z(e)e ddddZ*ddddZ+e e)e)fdddZ,e)e edddZ-e)e e)dddZ.e e)e)fddddZ/ddd d!Z0edd"d#d$Z1ee)d%d&d'Z2Gd(d)d)eZ3dS)*N)Values) ModuleType)AnyDictListOptional)where)parse) cmdoptions)Command)make_target_python)SUCCESS) Configuration)get_environment)open_text_resource) indent_log)get_pip_version)namevaluereturncCstd||dS)Nz%s: %s)loggerinfo)rrrF/usr/local/lib/python3.9/site-packages/pip/_internal/commands/debug.py show_valuesrrcCsFtdtjj}ttd|Wdn1s80YdS)Nzsys.implementation:r)rrsysimplementationrrr)implementation_namerrrshow_sys_implementations rcCsNtdd"}dd|D}Wdn1s20Ytdd|DS)Nz pip._vendorz vendor.txtcSs(g|] }d|vr|dddqS)== r)stripsplit.0linerrr )sz)create_vendor_txt_map..css|]}|ddVqdS)r r"Nr$r%rrr .z(create_vendor_txt_map..)r readlinesdict)flinesrrrcreate_vendor_txt_map%s  $r0) module_namercCsv|dd}|dkrd}z(td|ttddttj|WStyp|dkrjt j d krjYdSYn0dS) N-_ setuptools pkg_resourcesz pip._vendor.r)levelZ truststore) ) lowerreplace __import__globalslocalsgetattrpip_vendor ImportErrorr version_info)r1rrrget_module_from_module_name1s rCcCsZt|}t|dd}|rV|sV|jdus*Jttj|jg}||}|rVt|j }|S)N __version__) rCr>__file__rospathdirnameget_distributionstrversion)r1modulerKenvdistrrrget_vendor_version_from_moduleCs   rO)vendor_txt_versionsrcCs\|D]N\}}d}t|}|s*d}|}nt|t|krFd|d}td|||qdS)z{Log the actual version and print extra info if there is a conflict or if the actual version could not be imported. zM (Unable to locate actual module version, using vendor.txt specified version)z2 (CONFLICT: vendor.txt suggests version should be )z%s==%s%sN)itemsrO parse_versionrr)rPr1Zexpected_versionZ extra_messageZactual_versionrrrshow_actual_vendor_versionsRsrUcCsBtdt}tt|Wdn1s40YdS)Nzvendored library versions:)rrr0rrU)rPrrrshow_vendor_versionsgs rV)optionsrc Csd}t|}|}|}d}|r0d|d}dt||}t||jdkrtt||krtd}|d|}nd}tB|D]}tt|q|rd |d }t|Wdn1s0YdS) Nr8rQz (target: rRzCompatible tags: r"TFz ... [First z) tags shown. Pass --verbose to show all.]) r Zget_sorted_tags format_givenlenrrverboserrJ) rWZ tag_limit target_pythontagsZformatted_targetsuffixmsgZ tags_limitedtagrrr show_tagsos&   r`)configrcsXdd|D}|sdSgdfdd|D}|sr+z!ca_bundle_info..z Not specified)installwheeldownloadcsg|]}|vr|qSrr)r&r6Zlevels_that_override_globalrrr(sz"ca_bundle_info..globalz, )rSremovejoin)ralevelsZglobal_overriding_levelrrhrca_bundle_infos  rmc@s<eZdZdZdZdZddddZeee e dd d Z dS) DebugCommandz$ Display debug information. z %prog TNrcCs,t|j|jd|j|jjdS)Nr)r add_target_python_optionscmd_optsparserinsert_option_groupraload)selfrrr add_optionss zDebugCommand.add_options)rWargsrcCstdtdttdtjtdtjtdttdttdt tdtj t td t |jjtd tjd td tjd td ttd tjjtt|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.platformz'cert' config valueREQUESTS_CA_BUNDLECURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)rwarningrrrrK executablegetdefaultencodinggetfilesystemencodinglocalegetpreferredencodingplatformrrmrqrarFenvirongetrr?r@ DEBUNDLEDrVr`r )rtrWrvrrrruns,     zDebugCommand.run) __name__ __module__ __qualname____doc__usageignore_require_venvrurrrJintrrrrrrns rn)4r}loggingrFroptparsertypesrtypingrrrr pip._vendorr?pip._vendor.certifirZpip._vendor.packaging.versionr rTZpip._internal.clir pip._internal.cli.base_commandr Zpip._internal.cli.cmdoptionsr pip._internal.cli.status_codesr pip._internal.configurationrpip._internal.metadatarpip._internal.utils.compatrpip._internal.utils.loggingrpip._internal.utils.miscr getLoggerrrrJrrr0rCrOrUrVr`rmrnrrrrs: