HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-310.pyc
o

��it�@s�ddlZddlmZddlmZmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZdd	lmZdd
lmZmZddlmZddlmZe�e�ZGd
d�de�ZdS)�N)�Values)�Any�Dict�List)�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/site-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�setrrrrr)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)�metadataZmetadata_location�
direct_url�editableT)�url�dir_info�	installer�	requested)	�
metadata_dict�
info_locationr:�to_dict�editable_project_locationrr>�installed_with_dist_infor?)rr*�resr:rCr>rrr r(As$��
�
zInspectCommand._dist_to_dict)rN)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager!rr�str�intr8rrrr(rrrr rs
r)�logging�optparser�typingrrrZpip._vendor.packaging.markersr�pip._vendor.richr�piprZpip._internal.clir	�pip._internal.cli.req_commandr
�pip._internal.cli.status_codesr�pip._internal.metadatarr
�pip._internal.utils.compatr�pip._internal.utils.urlsr�	getLoggerrF�loggerrrrrr �<module>s