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.7/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-37.pyc
B

L��gt�@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@sTeZdZdZdZdZdd�dd�Zeee	e
d�d	d
�Zee
e	efd�dd
�ZdS)�InspectCommandzZ
    Inspect the content of a Python environment and produce a report in JSON format.
    Tz
      %prog [options]N)�returncCsN|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�B/tmp/pip-unpacked-wheel-hv55ucu3/pip/_internal/commands/inspect.py�add_optionsszInspectCommand.add_options)�options�argsrcsTt�|�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�dist)rrr�
<listcomp>:sz&InspectCommand.run.<locals>.<listcomp>)�version�pip_version�	installed�environment)�data)
r	�check_list_path_optionr
�pathZiter_installed_distributions�localr�setrrrrr)rr!r"�dists�outputr)rr�run0s



zInspectCommand.run)r)rcCsv|j|jd�}|j}|dk	r*|��|d<n$|j}|dk	rNt|�ddid�|d<|j}|jrb||d<|jrr|j|d<|S)N)�metadataZmetadata_location�
direct_url�editableT)�url�dir_info�	installer�	requested)	Z
metadata_dictZ
info_locationr8�to_dict�editable_project_locationrr<Zinstalled_with_dist_infor=)rr)�resr8r?r<rrrr'As

zInspectCommand._dist_to_dict)�__name__�
__module__�__qualname__�__doc__�ignore_require_venv�usager rr�str�intr6rrrr'rrrrrsr)�logging�optparser�typingrrrZpip._vendor.packaging.markersrZpip._vendor.richr�piprZpip._internal.clir	�pip._internal.cli.req_commandr
�pip._internal.cli.status_codesrZpip._internal.metadatarr
�pip._internal.utils.compatr�pip._internal.utils.urlsr�	getLoggerrA�loggerrrrrr�<module>s