HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/commands/__pycache__/debug.cpython-310.pyc
o

!��h��@s�ddlZddlZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZddl
ZddlmZddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
l m!Z!ddl"m#Z#ddl$m%Z%e�&e'�Z(de)de	ddfdd�Z*d+dd�Z+de
e)e)ffdd�Z,de)defdd�Z-de)dee)fdd�Z.de
e)e)fddfdd �Z/d+d!d"�Z0d#eddfd$d%�Z1d&ede)fd'd(�Z2Gd)d*�d*e�Z3dS),�N)�Values)�
ModuleType)�Any�Dict�List�Optional)�where)�parse)�__file__)�
cmdoptions)�Command)�make_target_python)�SUCCESS)�
Configuration)�get_environment)�
indent_log)�get_pip_version�name�value�returncCst�d||�dS)Nz%s: %s)�logger�info)rr�r�>/usr/lib/python3/dist-packages/pip/_internal/commands/debug.py�
show_valuesrcCsHt�d�tjj}t��td|�Wd�dS1swYdS)Nzsys.implementation:r)rr�sys�implementationrrr)�implementation_namerrr�show_sys_implementations

"�rcCsdtj�tj�t�dd�}t|��}dd�|��D�}Wd�n1s$wYtdd�|D��S)N�_vendorz
vendor.txtcSs(g|]}d|vr|���dd�d�qS)�==� �r)�strip�split��.0�linerrr�
<listcomp>-s"z)create_vendor_txt_map.<locals>.<listcomp>css�|]	}|�dd�VqdS)r r"N)r$r%rrr�	<genexpr>2s�z(create_vendor_txt_map.<locals>.<genexpr>)�os�path�join�dirname�pip_location�open�	readlines�dict)�vendor_txt_path�f�linesrrr�create_vendor_txt_map%s�
��r5�module_namecCs:|��}|dkr
d}td|��t�t�dd�ttj|�S)N�
setuptools�
pkg_resourceszpip._vendor.r)�level)�lower�
__import__�globals�locals�getattr�pipr)r6rrr�get_module_from_module_name5s
r@cCsHt|�}t|dd�}|s"ttj�|j�g�}|�|�}|r"t|j	�}|S)N�__version__)
r@r>rr*r+r-r
�get_distribution�str�version)r6�modulerD�env�distrrr�get_vendor_version_from_module@s

rH�vendor_txt_versionscCsZ|��D]&\}}d}t|�}|sd}|}n
t|�t|�kr"d�|�}t�d|||�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)�itemsrH�
parse_version�formatrr)rIr6�expected_version�
extra_message�actual_versionrrr�show_actual_vendor_versionsNs���rQcCsDt�d�t�}t��
t|�Wd�dS1swYdS)Nzvendored library versions:)rrr5rrQ)rIrrr�show_vendor_versionscs


"�rR�optionsc	Cs�d}t|�}|��}|��}d}|rd|�d�}d�t|�|�}t�|�|jdkr9t|�|kr9d}|d|�}nd}t��*|D]	}t�t	|��qA|r`d	j|d
�}t�|�Wd�dSWd�dS1skwYdS)N�
rJz
 (target: �)zCompatible tags: {}{}r"TFz?...
[First {tag_limit} tags shown. Pass --verbose to show all.])�	tag_limit)
r
�get_tags�format_givenrM�lenrr�verboserrC)	rSrV�
target_python�tags�formatted_target�suffix�msg�tags_limited�tagrrr�	show_tagsks0
��"�rb�configcsrt�}|��D]\}}|�|�d�d�q|sdSgd���fdd�|D�}|s+dSd|vr4|�d�d�|�S)	N�.rz
Not specified)�install�wheel�downloadcsg|]}|�vr|�qSrr)r&r9��levels_that_override_globalrrr(�sz"ca_bundle_info.<locals>.<listcomp>�globalz, )�setrK�addr$�remover,)rc�levels�key�_�global_overriding_levelrrhr�ca_bundle_info�s
�

rrc@s<eZdZdZdZdZddd�Zded	ee	de
fd
d�ZdS)
�DebugCommandz$
    Display debug information.
    z
      %prog <options>TrNcCs,t�|j�|j�d|j�|jj��dS)Nr)r�add_target_python_options�cmd_opts�parser�insert_option_grouprc�load)�selfrrr�add_options�szDebugCommand.add_optionsrS�argscCs�t�d�tdt��tdtj�tdtj�tdt���tdt���tdt	�
��tdtj�t�td	t
|jj��td
tj�d
��tdtj�d��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.zpip versionzsys.versionzsys.executablezsys.getdefaultencodingzsys.getfilesystemencodingzlocale.getpreferredencodingzsys.platformz'cert' config value�REQUESTS_CA_BUNDLE�CURL_CA_BUNDLEzpip._vendor.certifi.where()zpip._vendor.DEBUNDLED)r�warningrrrrD�
executable�getdefaultencoding�getfilesystemencoding�locale�getpreferredencoding�platformrrrrvrcr*�environ�getrr?r�	DEBUNDLEDrRrbr)ryrSr{rrr�run�s,��zDebugCommand.run�rN)�__name__�
__module__�__qualname__�__doc__�usage�ignore_require_venvrzrrrC�intr�rrrrrs�s
rsr�)4r��loggingr*r�optparser�typesr�typingrrrr�pip._vendorr?�pip._vendor.certifir�pip._vendor.packaging.versionr	rLr
r.�pip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.cmdoptionsr
�pip._internal.cli.status_codesr�pip._internal.configurationr�pip._internal.metadatar�pip._internal.utils.loggingr�pip._internal.utils.miscr�	getLoggerr�rrCrrr5r@rHrQrRrbrrrsrrrr�<module>s<