OwlCyberSecurity - MANAGER
Edit File: inspect.cpython-38.pyc
U ʗRe. � @ 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 )�cmd_opts� add_optionr � list_path�parser�insert_option_group��self� r ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/commands/inspect.py�add_options s � �zInspectCommand.add_options)�options�argsr c s^ t �d� t�|� t|j�j|j|jt t �d�}dt� fdd�|D �t� d�}t |d� tS )Nzypip inspect is currently an experimental command. The output format may change in a future release without prior warning.)� local_only� user_only�skip�0c s g | ]}� � |��qS r )� _dist_to_dict)�.0�distr r r � <listcomp>? s z&InspectCommand.run.<locals>.<listcomp>)�version�pip_version� installed�environment)�data)�logger�warningr �check_list_path_optionr �path�iter_installed_distributions�localr �setr r r r r )r r"