<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    ʗRe.                     @   s   d dl Z d dlmZ d dlmZmZmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dlmZ d d	lmZ d d
lmZmZ d dlmZ d dlmZ e eZG dd deZdS )    N)Values)AnyDictList)default_environment)
print_json)__version__)
cmdoptions)Command)SUCCESS)BaseDistributionget_environment)stdlib_pkgs)path_to_urlc                   @   sT   e Zd ZdZdZdZddddZeee	 e
dd	d
Zeee	ef dddZdS )InspectCommandzZ
    Inspect the content of a Python environment and produce a report in JSON format.
    Tz
      %prog [options]N)returnc                 C   sN   | j jddddd | j jdddddd	 | 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    	zInspectCommand.add_options)optionsargsr   c                    s^   t d t| t|jj|j|jt	t
d}dt fdd|D t d}t|d tS )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 | ]}  |qS 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"   r#   distsoutputr   r   r    run0   s     


zInspectCommand.run)r*   r   c                 C   sv   |j |jd}|j}|d k	r*| |d< n$|j}|d k	rNt|ddid|d< |j}|jrb||d< |jrr|j|d< |S )N)metadataZmetadata_location
direct_urleditableT)urldir_info	installer	requested)	metadata_dictinfo_locationr<   to_dicteditable_project_locationr   r@   installed_with_dist_inforA   )r   r*   resr<   rE   r@   r   r   r    r(   F   s&     

zInspectCommand._dist_to_dict)__name__
__module____qualname____doc__ignore_require_venvusager!   r   r   strintr:   r   r   r   r(   r   r   r   r    r      s   r   )loggingoptparser   typingr   r   r   Zpip._vendor.packaging.markersr   pip._vendor.richr   pipr   Zpip._internal.clir	   pip._internal.cli.req_commandr
   pip._internal.cli.status_codesr   pip._internal.metadatar   r   pip._internal.utils.compatr   pip._internal.utils.urlsr   	getLoggerrH   r1   r   r   r   r   r    <module>   s   
