
    @[h.                         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 j        e          Z G 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                   b    e Zd ZdZdZdZddZdedee	         de
fd	Zd
edee	ef         fdZdS )InspectCommandzZ
    Inspect the content of a Python environment and produce a report in JSON format.
    Tz
      %prog [options]returnNc                    | j                             dddd           | j                             ddddd	           | j                             t          j                               | 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)selfs    m/var/www/api.easyaligner.net/htdocs/venv_linux/lib/python3.11/site-packages/pip/_internal/commands/inspect.pyadd_optionszInspectCommand.add_options   s      / 	! 	
 	
 	
 	  ? 	! 	
 	
 	
 	  !5!7!7888''4=99999    optionsargsc                 b    t                               d           t          j        |           t	          |j                                      |j        |j        t          t                              }dt           fd|D             t                      d}t          |           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                 :    g | ]}                     |          S  )_dist_to_dict).0distr    s     r!   
<listcomp>z&InspectCommand.run.<locals>.<listcomp>?   s'    EEEt$,,T22EEEr#   )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outputs   `    r!   runzInspectCommand.run0   s    V	
 	
 	

 	)'222--JJ}l[!! K 
 
 &EEEEuEEE.00	
 
 	r#   r/   c                     |j         |j        d}|j        }||                                |d<   n |j        }|t          |          ddid|d<   |j        }|j        r||d<   |j        r
|j        |d<   |S )N)metadatametadata_location
direct_urleditableT)urldir_info	installer	requested)	metadata_dictinfo_locationrC   to_dicteditable_project_locationr   rG   installed_with_dist_inforH   )r    r/   resrC   rL   rG   s         r!   r-   zInspectCommand._dist_to_dictF   s    *!%!3
 
 _
! * 2 2 4 4C )-(F%(4&'@AA"D!% %L! N	> 	)(C( 	.#~C
r#   )r   N)__name__
__module____qualname____doc__ignore_require_venvusager"   r   r   strintr?   r   r   r   r-   r,   r#   r!   r   r      s          E: : : :(6 c s    ,"2 tCH~      r#   r   )loggingoptparser   typingr   r   r   pip._vendor.packaging.markersr   pip._vendor.richr   pipr	   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   	getLoggerrO   r6   r   r,   r#   r!   <module>rd      s6          " " " " " " " " " " = = = = = = ' ' ' ' ' '       ( ( ( ( ( ( 1 1 1 1 1 1 2 2 2 2 2 2 D D D D D D D D 2 2 2 2 2 2 0 0 0 0 0 0		8	$	$N N N N NW N N N N Nr#   