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: //usr/local/lib/python3.10/dist-packages/pip/_internal/commands/__pycache__/inspect.cpython-310.pyc
o

��hi�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZdd
lmZmZddlmZddlmZe�e�ZGd
d�de�ZdS)�N)�Values)�Any)�default_environment)�
print_json)�__version__)�
cmdoptions)�Command)�SUCCESS)�BaseDistribution�get_environment)�stdlib_pkgs)�path_to_urlc@sVeZdZdZdZdZddd�Zded	ee	de
fd
d�Zdede
e	effd
d�ZdS)�InspectCommandzZ
    Inspect the content of a Python environment and produce a report in JSON format.
    Tz
      %prog [options]�returnNcCsN|jjddddd�|jjdddddd	�|j�t���|j�d
|j�dS)Nz--local�
store_trueFzSIf in a virtualenv that has global access, do not list globally-installed packages.)�action�default�helpz--user�userz,Only output packages installed in user-site.)�destrrrr)�cmd_opts�
add_optionr�	list_path�parser�insert_option_group��self�r�I/usr/local/lib/python3.10/dist-packages/pip/_internal/commands/inspect.py�add_optionss�	�zInspectCommand.add_options�options�argscsTt�|�t|j�j|j|jtt�d�}dt	�fdd�|D�t
�d�}t|d�tS)N)�
local_only�	user_only�skip�1csg|]}��|��qSr)�
_dist_to_dict)�.0�distrrr�
<listcomp>:sz&InspectCommand.run.<locals>.<listcomp>)�version�pip_version�	installed�environment)�data)
r�check_list_path_optionr�path�iter_installed_distributions�localr�setrrrrr	)rr r!�dists�outputrrr�run0s

��
zInspectCommand.runr(cCsv|j|jd�}|j}|dur|��|d<n|j}|dur't|�ddid�|d<|j}|jr1||d<|jr9|j|d<|S)N)�metadata�metadata_location�
direct_url�editableT)�url�dir_info�	installer�	requested)	�
metadata_dict�
info_locationr9�to_dict�editable_project_locationr
r=�installed_with_dist_infor>)rr(�resr9rBr=rrrr&As$��
�
zInspectCommand._dist_to_dict)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usagerr�list�str�intr6r
�dictrr&rrrrrs
r)�logging�optparser�typingr�pip._vendor.packaging.markersr�pip._vendor.richr�pipr�pip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.status_codesr	�pip._internal.metadatar
r�pip._internal.utils.compatr�pip._internal.utils.urlsr
�	getLoggerrE�loggerrrrrr�<module>s