a  ze@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^/opt/bitninja-python-dojo/embedded/lib/python3.9/site-packages/pip/_internal/commands/debug.py show_valuesrrcCsFtdtjj}ttd|Wdn1s80YdS)Nzsys.implementation:r)rrsysimplementationrrr)implementation_namerrrshow_sys_implementations rcCsdtjtjtdd}t|"}dd|D}Wdn1sH0Ytdd|DS)N_vendorz vendor.txtcSs(g|] }d|vr|dddqS)== r)stripsplit.0linerrr /s z)create_vendor_txt_map..css|]}|ddVqdS)r!r#N)r%r&rrr 3z(create_vendor_txt_map..)ospathjoindirname pip_locationopen readlinesdict)Zvendor_txt_pathflinesrrrcreate_vendor_txt_map%s  $r6) module_namercCs:|}|dkrd}td|ttddttj|S)N setuptools pkg_resourcesz pip._vendor.r)level)lower __import__globalslocalsgetattrpipr )r7rrrget_module_from_module_name6srAcCsHt|}t|dd}|sDttj|jg}||}|rDt|j }|S)N __version__) rAr?rr,r-r/r get_distributionstrversion)r7modulerEenvdistrrrget_vendor_version_from_moduleFs   rI)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)itemsrI parse_versionformatrr)rJr7Zexpected_versionZ extra_messageZactual_versionrrrshow_actual_vendor_versionsTsrOcCsBtdt}tt|Wdn1s40YdS)Nzvendored library versions:)rrr6rrO)rJrrrshow_vendor_versionses rP)optionsrc Csd}t|}|}|}d}|r0d|d}dt||}t||jdkrrt||krrd}|d|}nd}tB|D]}tt |q|rd j|d }t|Wdn1s0YdS) N rKz (target: )zCompatible tags: {}{}r#TFz?... [First {tag_limit} tags shown. Pass --verbose to show all.]) tag_limit) r get_tags format_givenrNlenrrverboserrD) rQrT target_pythontagsZformatted_targetsuffixmsgZ tags_limitedtagrrr show_tagsms,  r^)configrcsrt}|D]\}}||ddq|s4dSgdfdd|D}|sVdSd|vrh|dd|S) N.rz Not specified)installwheeldownloadcsg|]}|vr|qSrr)r'r:Zlevels_that_override_globalrrr)sz"ca_bundle_info..globalz, )setrLaddr%remover.)r_Zlevelskey_Zglobal_overriding_levelrrdrca_bundle_infos  rkc@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_groupr_load)selfrrr add_optionss zDebugCommand.add_options)rQargsrcCstdtdttdtjtdtjtdttdttdt 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)rwarningrrrrE executablegetdefaultencodinggetfilesystemencodinglocalegetpreferredencodingplatformrrkror_r,environgetrr@r DEBUNDLEDrPr^r)rrrQrtrrrruns*     zDebugCommand.run) __name__ __module__ __qualname____doc__usageignore_require_venvrsrrrDintrrrrrrls rl)4r{loggingr,roptparsertypesrtypingrrrr pip._vendorr@pip._vendor.certifirZpip._vendor.packaging.versionr rMr r0Zpip._internal.clir pip._internal.cli.base_commandr Zpip._internal.cli.cmdoptionsr pip._internal.cli.status_codesrpip._internal.configurationrpip._internal.metadatarpip._internal.utils.loggingrpip._internal.utils.miscr getLoggerrrrDrrr6rArIrOrPr^rkrlrrrrs:              !