3 ”Re’ã@sNddlmZddlZddlZddlZddlZddlZddlmZddl m Z ddlm Z ddl mZddlmZddlmZdd lmZdd lmZdd lmZdd lmZerèdd lmZddlmZmZm Z ddl!m"Z"ddl#m$Z$ej%e&ƒZ'dd„Z(dd„Z)dd„Z*dd„Z+dd„Z,dd„Z-dd„Z.dd „Z/d!d"„Z0Gd#d$„d$eƒZ1dS)%é)Úabsolute_importN)Ú pkg_resources)Úwhere)Ú__file__)Ú cmdoptions)ÚCommand)Úmake_target_python)ÚSUCCESS)Ú indent_log)Úget_pip_version)ÚMYPY_CHECK_RUNNING)Ú ModuleType)ÚListÚOptionalÚDict)ÚValues)Ú ConfigurationcCstjd||ƒdS)Nz%s: %s)ÚloggerÚinfo)ÚnameÚvalue©rú‹/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/debug.pyÚ show_valuesrc CsFtjdƒttdƒr"tj}|j}nd}tƒ�td|ƒWdQRXdS)Nzsys.implementation:ÚimplementationÚr)rrÚhasattrÚsysrrr r)rÚimplementation_namerrrÚshow_sys_implementation#s  rc CsPtjjtjjtƒddƒ}t|ƒ�}dd„|jƒDƒ}WdQRXtdd„|DƒƒS)NÚ_vendorz vendor.txtcSs(g|] }d|kr|jƒjddƒd‘qS)z==ú ér)ÚstripÚsplit)Ú.0Úlinerrrú ;sz)create_vendor_txt_map..css|]}|jddƒVqdS)z==r"N)r$)r%r&rrrú ?sz(create_vendor_txt_map..)ÚosÚpathÚjoinÚdirnameÚ pip_locationÚopenÚ readlinesÚdict)Zvendor_txt_pathÚfÚlinesrrrÚcreate_vendor_txt_map0s  r3cCs:|jƒ}|dkrd}tdj|ƒtƒtƒdd�ttj|ƒS)NÚ setuptoolsrzpip._vendor.{}r)Úlevel)ÚlowerÚ __import__ÚformatÚglobalsÚlocalsÚgetattrÚpipr )Ú module_namerrrÚget_module_from_module_nameBsr>cCsPt|ƒ}t|ddƒ}|sLtjtjj|jƒgƒ}|jtj j |ƒƒ}t|ddƒ}|S)NÚ __version__Úversion) r>r;rÚ WorkingSetr)r*r,rÚfindÚ RequirementÚparse)r=Úmoduler@Zpkg_setÚpackagerrrÚget_vendor_version_from_moduleSs  rGcCsVxP|jƒD]D\}}d}t|ƒ}|s,d}|}n||kr>dj|ƒ}tjd|||ƒq WdS)z{Log the actual version and print extra info if there is a conflict or if the actual version could not be imported. rzM (Unable to locate actual module version, using vendor.txt specified version)z5 (CONFLICT: vendor.txt suggests version should be {})z%s==%s%sN)ÚitemsrGr8rr)Úvendor_txt_versionsr=Zexpected_versionZ extra_messageZactual_versionrrrÚshow_actual_vendor_versionsgsrJc Cs.tjdƒtƒ}tƒ�t|ƒWdQRXdS)Nzvendored library versions:)rrr3r rJ)rIrrrÚshow_vendor_versionsys rKc CsÀd}t|ƒ}|jƒ}|jƒ}d}|r.dj|ƒ}djt|ƒ|ƒ}tj|ƒ|jdkrpt|ƒ|krpd}|d|…}nd}tƒ�<x|D]}tjt |ƒƒq‚W|r²dj|d �}tj|ƒWdQRXdS) Né rz (target: {})zCompatible tags: {}{}r"TFz?... [First {tag_limit} tags shown. Pass --verbose to show all.])Ú tag_limit) rÚget_tagsÚ format_givenr8ÚlenrrÚverboser Ústr) ÚoptionsrMÚ target_pythonÚtagsZformatted_targetÚsuffixÚmsgZ tags_limitedÚtagrrrÚ show_tags‚s(   rYcsxtƒ}x(|jƒD]\}}|j|jdƒdƒqW|s8dSdddg‰‡fdd„|Dƒ}|s\d Sd |krn|jd ƒd j|ƒS) NÚ.rz Not specifiedÚinstallÚwheelÚdownloadcsg|]}|ˆkr|‘qSrr)r%r5)Úlevels_that_override_globalrrr'¯sz"ca_bundle_info..Úglobalz, )ÚsetrHÚaddr$Úremover+)ÚconfigÚlevelsÚkeyÚ_Zglobal_overriding_levelr)r^rÚca_bundle_info¤s  rgc@s(eZdZdZdZdZdd„Zdd„ZdS) Ú DebugCommandz$ Display debug information. z %prog TcCs,tj|jƒ|jjd|jƒ|jjjƒdS)Nr)rÚadd_target_python_optionsÚcmd_optsÚparserÚinsert_option_grouprcÚload)ÚselfrrrÚ add_optionsÂs zDebugCommand.add_optionscCsÌtjdƒtdtƒƒtdtjƒtdtjƒtdtjƒƒtdtjƒƒtdt j ƒƒtdtj ƒt ƒtd t |jjƒƒtd tjjd ƒƒtd tjjd ƒƒtd tƒƒtd tjjƒtƒt|ƒtS)Nz¸This 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 valueÚREQUESTS_CA_BUNDLEÚCURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)rÚwarningrr rr@Ú executableÚgetdefaultencodingÚgetfilesystemencodingÚlocaleÚgetpreferredencodingÚplatformrrgrkrcr)ÚenvironÚgetrr<r Ú DEBUNDLEDrKrYr )rnrSÚargsrrrÚrunÈs&      zDebugCommand.runN)Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚusageÚignore_require_venvror}rrrrrh¹s rh)2Ú __future__rrvÚloggingr)rÚ pip._vendorr<rÚpip._vendor.certifirrr-Zpip._internal.clirÚpip._internal.cli.base_commandrZpip._internal.cli.cmdoptionsrÚpip._internal.cli.status_codesr Úpip._internal.utils.loggingr Úpip._internal.utils.miscr Úpip._internal.utils.typingr Útypesr ÚtypingrrrÚoptparserÚpip._internal.configurationrÚ getLoggerr~rrrr3r>rGrJrKrYrgrhrrrrÚs>                 "