ok

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/pip/commands/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/commands/search.pyc

�
��abc@@s4ddlmZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZeje�Zdefd��YZ d�Z!ddd�Z#d�Z$dS(i(tabsolute_importN(tCommandtSUCCESS(tOrderedDict(tPipXmlrpcTransport(tPyPI(tget_terminal_size(t
indent_log(tCommandError(tNO_MATCHES_FOUND(tparse(t
pkg_resources(t
xmlrpc_clientt
SearchCommandcB@s;eZdZdZdZdZd�Zd�Zd�ZRS(s@Search for PyPI packages whose name or summary contains <query>.tsearchs
      %prog [options] <query>sSearch PyPI for packages.cO@satt|�j||�|jjdddddddtjdd	�|jjd
|j�dS(Ns-is--indextdesttindextmetavartURLtdefaultthelps3Base URL of Python Package Index (default %default)i(	tsuperR
t__init__tcmd_optst
add_optionRtpypi_urltparsertinsert_option_group(tselftargstkw((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyRs			cC@s||std��n|}|j||�}t|�}d}tjj�r^t�d}nt|d|�|rxt	St
S(Ns)Missing required argument (search query).itterminal_width(RRttransform_hitstNonetsyststdouttisattyRt
print_resultsRR	(RtoptionsRtqueryt	pypi_hitsthitsR((s7/usr/lib/python2.7/site-packages/pip/commands/search.pytrun)scC@sj|j}|j|��L}t||�}tj||�}|ji|d6|d6d�}|SWdQXdS(Ntnametsummarytor(Rt_build_sessionRRtServerProxyR(RR'R&t	index_urltsessiont	transporttpypiR)((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyR9s	 (	t__name__t
__module__t__doc__R+tusageR,RR*R(((s7/usr/lib/python2.7/site-packages/pip/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.
    R+R,tversiontversions(Rtkeystappendthighest_versiontlisttvalues(R)tpackagesthitR+R,R8((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyR Bs	



c
C@s�|s
dS|dkrctg|D]3}t|d�t|jddg�d�^q �d}ngtjD]}|j^qm}xb|D]Z}|d}|dp�d}|jddg�d}|dk	r||d}	|	d	krtj||	�}d
d|dj	|�}qnd
|d||f|f}
y�t
j|
�||kr�tj|�}t
��]t|d�}|j|kr�t
jd|j�n#t
jd|j�t
jd|�WdQXnWq�tk
r�q�Xq�WdS(NR+R9t-i����iR,tii
s
t is	%-*s - %ss%s (%s)sINSTALLED: %s (latest)s
INSTALLED: %ss
LATEST:    %s(R!tmaxtlentgetRtworking_settproject_namettextwraptwraptjointloggertinfotget_distributionRR<R8tUnicodeEncodeError(
R)tname_column_widthRR@tptinstalled_packagesR+R,R8ttarget_widthtlinetdisttlatest((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyR%^s>=


!


cC@st|dt�S(Ntkey(RDt
parse_version(R9((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyR<�s(%t
__future__RtloggingR"RItpip.basecommandRRt
pip.compatRtpip.downloadRt
pip.modelsRt	pip.utilsRtpip.utils.loggingRtpip.exceptionsRtpip.status_codesR	tpip._vendor.packaging.versionR
RXtpip._vendorRtpip._vendor.six.movesRt	getLoggerR4RLR
R R!R%R<(((s7/usr/lib/python2.7/site-packages/pip/commands/search.pyt<module>s&+	&

Zerion Mini Shell 1.0