\bgu ddlZddlmZddlmZmZmZddlmZddl m Z ddl m Z ddl mZddlmZdd lmZdd lmZmZdd lmZdd lmZejeZGd deZdS)N)Values)AnyDictList)default_environment) print_json) __version__) cmdoptions)Command)SUCCESS)BaseDistributionget_environment) stdlib_pkgs) path_to_urlcbeZdZdZdZdZd dZdedee de fd Z d e de e effd ZdS) InspectCommandzZ Inspect the content of a Python environment and produce a report in JSON format. Tz %prog [options]returnNc|jdddd|jddddd |jtj|jd |jdS) Nz--local store_trueFzSIf in a virtualenv that has global access, do not list globally-installed packages.)actiondefaulthelpz--useruserz,Only output packages installed in user-site.)destrrrr)cmd_opts add_optionr list_pathparserinsert_option_group)selfs o/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pip/_internal/commands/inspect.py add_optionszInspectCommand.add_optionss   / !      ? !      !5!7!7888 ''4=99999optionsargsc.tj|t|j|j|jtt}dtfd|Dtd}t|tS)N) local_only user_onlyskip1c:g|]}|S) _dist_to_dict).0distr s r! z&InspectCommand.run..:s'EEEt$,,T22EEEr#)version pip_version installed environment)data) r check_list_path_optionrpathiter_installed_distributionslocalrsetrr rrr )r r$r%distsoutputs` r!runzInspectCommand.run0s)'222 --JJ}l[!!K   &EEEEuEEE.00    r#r/c|j|jd}|j}|||d<n |j}|t |ddid|d<|j}|jr||d<|jr |j|d<|S)N)metadatametadata_location direct_urleditableT)urldir_info installer requested) metadata_dict info_locationrAto_dicteditable_project_locationrrEinstalled_with_dist_inforF)r r/resrArJrEs r!r-zInspectCommand._dist_to_dictAs*!%!3   _  ! * 2 2 4 4C  )-(F %(4&'@AA"D!%%L!N > )(C   ( .#~C  r#)rN)__name__ __module__ __qualname____doc__ignore_require_venvusager"rrstrintr=r rrr-r,r#r!rrs E::::(6cs""2tCH~r#r)loggingoptparsertypingrrrpip._vendor.packaging.markersrpip._vendor.richrpipr pip._internal.clir pip._internal.cli.base_commandr pip._internal.cli.status_codesr pip._internal.metadatar rpip._internal.utils.compatrpip._internal.utils.urlsr getLoggerrMloggerrr,r#r!rcs6""""""""""======''''''((((((222222222222DDDDDDDD222222000000  8 $ $IIIIIWIIIIIr#