| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/pip/_internal/commands/__pycache__/ |
Upload File : |
a
W��et � @ s� d dl Z d dlmZ d dlmZmZmZ d dlmZ d dl m
Z
d dlmZ d dl
mZ d dlmZ d d lmZ d d
lmZmZ d dlmZ d dlmZ e �e�ZG d
d� de�ZdS )� N)�Values)�Any�Dict�List)�default_environment)�
print_json)�__version__)�
cmdoptions)�Command)�SUCCESS)�BaseDistribution�get_environment)�stdlib_pkgs)�path_to_urlc @ sT e Zd ZdZdZdZdd�dd�Zeee e
d�d d
�Zee
e ef d�dd
�ZdS )�InspectCommandzZ
Inspect the content of a Python environment and produce a report in JSON format.
Tz
%prog [options]N)�returnc C sN | j jddddd� | j jdddddd � | j �t�� � | j�d
| j � d S )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.)�destr r r r )Zcmd_optsZ
add_optionr Z list_path�parserZinsert_option_group��self� r �B/usr/lib/python3.9/site-packages/pip/_internal/commands/inspect.py�add_options s � �zInspectCommand.add_options)�options�argsr c sT t �|� t|j�j|j|jtt�d�}dt � fdd�|D �t
� d�}t|d� tS )N)Z
local_onlyZ user_only�skip�1c s g | ]}� � |��qS r )�
_dist_to_dict)�.0�distr r r �
<listcomp>: � z&InspectCommand.run.<locals>.<listcomp>)�versionZpip_versionZ installedZenvironment)�data)
r Zcheck_list_path_optionr
�pathZiter_installed_distributions�localr �setr r r r r )r r r Zdists�outputr r r �run0 s
��
zInspectCommand.run)r$ r c C sv |j |jd�}|j}|d ur*|�� |d<