
    q"hu                         S SK r S SKJr  S SKJrJrJr  S SKJr  S SK	J
r
  S SKJr  S SKJr  S SKJr  S S	KJr  S S
KJrJr  S SKJr  S SKJr  \ R4                  " \5      r " S S\5      rg)    N)Values)AnyDictList)default_environment)
print_json)__version__)
cmdoptions)Command)SUCCESS)BaseDistributionget_environment)stdlib_pkgs)path_to_urlc                   b    \ rS rSrSrSrSrSS jrS\S	\	\
   S\4S
 jrS\S\\
\4   4S jrSrg)InspectCommand   zR
Inspect the content of a Python environment and produce a report in JSON format.
Tz
      %prog [options]returnNc                    U R                   R                  SSSSS9  U R                   R                  SSSSSS	9  U R                   R                  [        R                  " 5       5        U R                  R                  S
U R                   5        g )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    P/var/www/html/env/lib/python3.13/site-packages/pip/_internal/commands/inspect.pyadd_optionsInspectCommand.add_options   s      / 	! 	
 	  ? 	! 	
 	  !5!5!78''4==9    optionsargsc                 D   [         R                  " U5        [        UR                  5      R	                  UR
                  UR                  [        [        5      S9nS[        U Vs/ s H  o@R                  U5      PM     sn[        5       S.n[        US9  [        $ s  snf )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"   runInspectCommand.run0   s    ))'2-JJ}}ll[! K 
 &?DEut,,T2uE.0	
 	 Fs   &Br9   c                 D   UR                   UR                  S.nUR                  nUb  UR                  5       US'   O"UR                  nUb  [        U5      SS0S.US'   UR                  nUR                  (       a  XRS'   UR                  (       a  UR                  US'   U$ )N)metadatametadata_location
direct_urleditableT)urldir_info	installer	requested)	metadata_dictinfo_locationr@   to_dicteditable_project_locationr   rD   installed_with_dist_inforE   )r!   r9   resr@   rI   rD   s         r"   r7   InspectCommand._dist_to_dictA   s    **!%!3!3
 __
! * 2 2 4C )-(F(F%(4&'@A"D!%L! NN	>>(((#~~C
r%    )r   N)__name__
__module____qualname____firstlineno____doc__ignore_require_venvusager#   r   r   strintr;   r   r   r   r7   __static_attributes__rM   r%   r"   r   r      sU     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.base_commandr   pip._internal.cli.status_codesr   pip._internal.metadatar   r   pip._internal.utils.compatr   pip._internal.utils.urlsr   	getLoggerrN   loggerr   rM   r%   r"   <module>rf      sJ      " " = '  ( 2 2 D 2 0			8	$IW Ir%   