Kqt]S & d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z m
Z
d dlmZ d dl
mZ d dlmZ d d lmZmZ d d
lmZmZ d dlmZmZmZ d dlmZ d d
lmZ d dlm Z d dl!m"Z" d dl#m$Z$ d dl%m&Z& ej' e( Z) G d de Z*dS ) )annotationsN)Iterable)Values)AnyCallable)Version)
cmdoptions)IndexGroupCommand)ERRORSUCCESS)get_installed_distributionprint_dist_installation_info)CommandErrorDistributionNotFoundPipError)
LinkCollector)
PackageFinder)SelectionPreferences)TargetPython)
PipSession)write_outputc H e Zd ZdZdZdZddZddZddZ dddZ ddZ
dS ) IndexCommandz=
Inspect information available from package indexes.
Tz&
%prog versions
returnNonec t j | j | j t j | j t j | j t j | j t j | j t j t j t j
| j }| j d| | j d| j d S )Nr )
r add_target_python_optionscmd_opts
add_optionignore_requires_pythonprejson no_binaryonly_binarymake_option_groupindex_groupparserinsert_option_group)self
index_optss n/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/commands/index.pyadd_optionszIndexCommand.add_options' s ,T];;;
!B!D!DEEE
!1!1222
!2!2333
!5!7!7888
!7!9!9:::1"K
'':666''4=99999 .dict[str, Callable[[Values, list[str]], None]]c d| j iS )Nversions)get_available_package_versions)r) s r+ handler_mapzIndexCommand.handler_map8 s ;
r- optionsr args list[str]intc | }|r
|d |vrBt dd t | t
S |d } || ||dd nC# t $ r6}t |j d t
cY d }~S d }~ww xY wt S )Nr zNeed an action (%s) to perform., ) r2 loggererrorjoinsortedr r r4 r )r) r3 r4 r2 actiones r+ runzIndexCommand.run= s &&(( tAwk11LL1 &--..
La Kabb2222 LL###LLLLLL s ,B
C+C<CCNsessionr
target_pythonTargetPython | Noner bool | Noner c t j || }t d|j | }t j ||| S )zK
Create a package finder appropriate to the index command.
)r3 F)allow_yankedallow_all_prereleasesr )link_collectorselection_prefsrB )r creater r! r )r) r3 rA rB r rH rI s r+ _build_package_finderz"IndexCommand._build_package_finderS s_ '-gwGGG /")+#9
#)+'
r- list[Any]c l t | dk rt d t j | }|d }| | 5 }| ||||j }d | | D }|j sd |D }t | }|st d| d t |d
D }|d } d d d n# 1 swxY w Y t | }
|j
rB||| d}|
t |
j |d<