Your IP : 3.133.148.222


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyc

�
�Rec@@s�ddlmZddlZddlZddlZddlmZddlmZddl	m
Zddlm
Z
ddlmZddlmZdd	lmZmZdd
lmZddlmZddlmZdd
lmZddlmZddlm Z m!Z!ddl"m#Z#e#r�ddl$m%Z%ddl&m'Z'm(Z(m)Z)ddl*m+Z+e+die,d6e,d6e'e,d6�Z-nej.e/�Z0deefd��YZ1d�Z2ddd�Z4d�Z5dS(i(tabsolute_importN(tOrderedDict(t
pkg_resources(tparse(t
xmlrpc_client(tCommand(tSessionCommandMixin(tNO_MATCHES_FOUNDtSUCCESS(tCommandError(tPyPI(tPipXmlrpcTransport(tget_terminal_size(t
indent_log(tget_distributiontwrite_output(tMYPY_CHECK_RUNNING(tValues(tListtDicttOptional(t	TypedDicttTransformedHittnametsummarytversionst
SearchCommandcB@s5eZdZdZeZd�Zd�Zd�ZRS(s@Search for PyPI packages whose name or summary contains <query>.s
      %prog [options] <query>cC@sH|jjdddddddtjdd	�|jjd
|j�dS(Ns-is--indextdesttindextmetavartURLtdefaultthelps3Base URL of Python Package Index (default %default)i(tcmd_optst
add_optionR
tpypi_urltparsertinsert_option_group(tself((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pytadd_options,s			cC@s||std��n|}|j||�}t|�}d}tjj�r^t�d}nt|d|�|rxt	St
S(Ns)Missing required argument (search query).itterminal_width(R	tsearchttransform_hitstNonetsyststdouttisattyRt
print_resultsRR(R&toptionstargstqueryt	pypi_hitsthitsR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pytrun7scC@s]|j}|j|�}t||�}tj||�}|ji|d6|d6d�}|S(NRRtor(Rtget_default_sessionRRtServerProxyR)(R&R2R0t	index_urltsessiont	transporttpypiR4((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyR)Hs	 (	t__name__t
__module__t__doc__tusagetTruetignore_require_venvR'R5R)(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyR%s		cC@s�t�}x�|D]�}|d}|d}|d}||j�krki|d6|d6|gd6||<q||dj|�|t||d�kr|||d<qqWt|j��S(s�
    The list from pypi is really a list of versions. We want a list of
    packages with the list of versions stored inline. This converts the
    list from pypi into one we can use.
    RRtversionR(Rtkeystappendthighest_versiontlisttvalues(R4tpackagesthitRRRC((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyR*Ts	



c
	C@s|s
dS|dkretg|D]5}t|d�tt|jddg���^q �d}ngtjD]}|j^qo}x}|D]u}|d}|dp�d}t|jddg��}|dk	r||d}	|	dkrtj	||	�}
d	d
|dj
|
�}qndjd
djt��t��}y�t
|�||kr�t|�}|dk	szt�t��c|j|kr�t
d|j�n<t
d|j�t|�jr�t
d|�n
t
d|�WdQXnWq�tk
r�q�Xq�WdS(NRRt-iRtii
s
t is-{name_latest:{name_column_width}} - {summary}tname_latests{name} ({latest})sINSTALLED: %s (latest)s
INSTALLED: %ss=LATEST:    %s (pre-release; install with "pip install --pre")s
LATEST:    %s(R+tmaxtlenRFtgetRtworking_settproject_namettextwraptwraptjointformattlocalsRRtAssertionErrorR
RCt
parse_versiontpretUnicodeEncodeError(
R4tname_column_widthR(RJtptinstalled_packagesRRtlatestttarget_widtht
summary_linestlinetdist((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyR/qsH?


	



cC@st|dt�S(Ntkey(RORZ(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyRF�s(6t
__future__RtloggingR,RTtcollectionsRtpip._vendorRtpip._vendor.packaging.versionRRZtpip._vendor.six.movesRtpip._internal.cli.base_commandRtpip._internal.cli.req_commandRtpip._internal.cli.status_codesRRtpip._internal.exceptionsR	tpip._internal.models.indexR
tpip._internal.network.xmlrpcRtpip._internal.utils.compatRtpip._internal.utils.loggingR
tpip._internal.utils.miscRRtpip._internal.utils.typingRtoptparseRttypingRRRttyping_extensionsRtstrRt	getLoggerR=tloggerRR*R+R/RF(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/search.pyt<module>s:%/	-

?>