관리-도구
편집 파일: inspect.cpython-312.pyc
� G��et � �� � 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 j4 e� Z G d � de� Zy)� N)�Values)�Any�Dict�List)�default_environment)� print_json)�__version__)� cmdoptions)�Command)�SUCCESS)�BaseDistribution�get_environment)�stdlib_pkgs)�path_to_urlc �T � e Zd ZdZdZdZdd�Zdedee de fd �Zd ede e ef fd�Zy) �InspectCommandzZ Inspect the content of a Python environment and produce a report in JSON format. Tz %prog [options]�returnNc �( � | j j dddd�� | j j ddddd� � | j j t j � � | j j d | j � y )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)�selfs ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/commands/inspect.py�add_optionszInspectCommand.add_options s� � �� � � � ����/� !� � � � � � �����?� !� � � � � � ��!5�!5�!7�8����'�'��4�=�=�9� �options�argsc �J � t j |� t |j � j |j |j t t � �� }dt |D �cg c] }| j |� �� c}t � d�}t |�� t S c c}w )N)� local_only� user_only�skip�1)�version�pip_version� installed�environment)�data)r �check_list_path_optionr �path�iter_installed_distributions�localr �setr r � _dist_to_dictr r r )r r$ r% �dists�dist�outputs r! �runzInspectCommand.run0 s� � ��)�)�'�2�����-�J�J��}�}��l�l��[�!� K� �� �&�?D�E�t�$�,�,�T�2�E�.�0� �� ������ Fs �(B r7 c �. � |j |j d�}|j }|�|j � |d<