˛Z.AHddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZdd lmZdd lmZmZdd lmZdd lmZejeZGd deZdS)N)Values)Any)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 p/builddir/build/BUILD/cloudlinux-venv-1.0.10/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).0distrs r z&InspectCommand.run..:s'EEEt$,,T22EEEr!)version pip_version installed environment)data) rcheck_list_path_optionr pathiter_installed_distributionslocalrsetr rrrr )rr"r#distsoutputs` rrunzInspectCommand.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_locationr?to_dicteditable_project_locationrrCinstalled_with_dist_inforD)rr-resr?rHrCs rr+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 rliststrintr;r dictrr+r*r!rrrs E::::(6cs""2tCH~r!r)loggingoptparsertypingrpip._vendor.packaging.markersrpip._vendor.richrpiprpip._internal.clirpip._internal.cli.base_commandr pip._internal.cli.status_codesr pip._internal.metadatar r pip._internal.utils.compatr pip._internal.utils.urlsr getLoggerrKloggerrr*r!rrcs*======''''''((((((222222222222DDDDDDDD222222000000  8 $ $IIIIIWIIIIIr!