a [f@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)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)__file__) cmdoptions)Command)make_target_python)SUCCESS) Configuration)get_environment) indent_log)get_pip_version)namevaluereturncCstd||dS)Nz%s: %s)loggerinfo)rrr@/usr/lib/python3.9/site-packages/pip/_internal/commands/debug.py show_valuesrrcCsFtdtjj}ttd|Wdn1s80YdS)Nzsys.implementation:r)rrsysimplementationrrr)Zimplementation_namerrrshow_sys_implementations rcCsdtjtjtdd}t|"}dd|D}Wdn1sH0Ytdd|DS)N_vendorz vendor.txtcSs(g|] }d|vr|dddqS)== r)stripsplit.0linerrr -sz)create_vendor_txt_map..css|]}|ddVqdS)r r"N)r$r%rrr 2z(create_vendor_txt_map..)ospathjoindirname pip_locationopen readlinesdict)Zvendor_txt_pathflinesrrrcreate_vendor_txt_map%s $r5) module_namercCs:|}|dkrd}td|ttddttj|S)NZ setuptoolsZ pkg_resourcesz pip._vendor.r)level)lower __import__globalslocalsgetattrpipr)r6rrrget_module_from_module_name5s r>cCsHt|}t|dd}|sDttj|jg}||}|rDt|j }|S)N __version__) r>r<rr+r,r.r Zget_distributionstrversion)r6modulerAenvZdistrrrget_vendor_version_from_module@s   rD)vendor_txt_versionsrcCsZ|D]L\}}d}t|}|s*d}|}nt|t|krDd|}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)z5 (CONFLICT: vendor.txt suggests version should be {})z%s==%s%sN)itemsrD parse_versionformatrr)rEr6Zexpected_versionZ extra_messageZactual_versionrrrshow_actual_vendor_versionsNsrJcCsBtdt}tt|Wdn1s40YdS)Nzvendored library versions:)rrr5rrJ)rErrrshow_vendor_versionscs rK)optionsrc Csd}t|}|}|}d}|r0d|d}dt||}t||jdkrrt||krrd}|d|}nd}tB|D]}tt |q|rd j|d }t|Wdn1s0YdS) N rFz (target: )zCompatible tags: {}{}r"TFz?... [First {tag_limit} tags shown. Pass --verbose to show all.]) tag_limit) r Zget_tagsZ format_givenrIlenrrverboserr@) rLrOZ target_pythontagsZformatted_targetsuffixmsgZ tags_limitedtagrrr show_tagsks,  rV)configrcsrt}|D]\}}||ddq|s4dSgdfdd|D}|sVdSd|vrh|dd|S) N.rz Not specified)installZwheelZdownloadcsg|]}|vr|qSrr)r&r7Zlevels_that_override_globalrrr(sz"ca_bundle_info..globalz, )setrGaddr$remover-)rWZlevelskey_Zglobal_overriding_levelrrZrca_bundle_infos  rac@s<eZdZdZdZdZddddZeee e dd d Z dS) DebugCommandz$ Display debug information. z %prog TNrcCs,t|j|jd|j|jjdS)Nr)r Zadd_target_python_optionsZcmd_optsparserZinsert_option_grouprWload)selfrrr add_optionss zDebugCommand.add_options)rLargsrcCstdtdttdtjtdtjtdttdttdt 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 valueZREQUESTS_CA_BUNDLEZCURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)rZwarningrrrrA executablegetdefaultencodinggetfilesystemencodinglocalegetpreferredencodingplatformrrarcrWr+environgetrr=rZ DEBUNDLEDrKrVr)rerLrgrrrruns,     zDebugCommand.run) __name__ __module__ __qualname____doc__usageZignore_require_venvrfrrr@intrprrrrrbs rb)4rkZloggingr+rZoptparsertypesrtypingrrrrZ pip._vendorr=Zpip._vendor.certifirZpip._vendor.packaging.versionr rHr r/Zpip._internal.clir Zpip._internal.cli.base_commandr Zpip._internal.cli.cmdoptionsr Zpip._internal.cli.status_codesrZpip._internal.configurationrZpip._internal.metadatarZpip._internal.utils.loggingrZpip._internal.utils.miscrZ getLoggerrqrr@rrr5r>rDrJrKrVrarbrrrrs: