ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/commands/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyo

�
�2{Yc@sddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZm
Z
mZddlmZddlmZddlmZdd	lmZmZd
efd��YZd�Zd
dd�Zd�Zd�ZdS(i����N(tCommandtSUCCESS(tget_terminal_size(tlogger(t	xmlrpclibtreducetcmp(tCommandError(tNO_MATCHES_FOUND(t
pkg_resources(t
StrictVersiontLooseVersiont
SearchCommandcBs;eZdZdZdZdZd�Zd�Zd�ZRS(s@Search for PyPI packages whose name or summary contains <query>.tsearchs
      %prog [options] <query>sSearch PyPI for packages.c
Os[tt|�j||�|jjddddddddd	�|jjd
|j�dS(Ns--indextdesttindextmetavartURLtdefaultshttps://pypi.python.org/pypithelps3Base URL of Python Package Index (default %default)i(tsuperRt__init__tcmd_optst
add_optiontparsertinsert_option_group(tselftargstkw((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyRs	cCs�|std��n|}|j}|j||�}t|�}d}tjj�rgt�d}nt	|d|�|r�t
StS(Ns)Missing required argument (search query).itterminal_width(RRR
ttransform_hitstNonetsyststdouttisattyRt
print_resultsRR(RtoptionsRtqueryt	index_urlt	pypi_hitsthitsR((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pytrun"s	cCs3tj|�}|ji|d6|d6d�}|S(Ntnametsummarytor(RtServerProxyR
(RR%R&tpypiR(((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyR
4s (	t__name__t
__module__t__doc__R*tusageR+RR)R
(((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyRs		cCsi}x�|D]�}|d}|d}|d}|d}|dkrPd}n||j�kr�i|d6|d6|gd6|d6||<q
||dj|�|t||d�kr
|||d<|||d<q
q
Wt|j�dd	�d
t�}|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+tversiont_pypi_orderingitversionstscoretkeycSs|dS(NR6((tx((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyt<lambda>TstreverseN(Rtkeystappendthighest_versiontsortedtvaluestTrue(R(tpackagesthitR*R+R3R6tpackage_list((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyR:s 




	,!icCsogtjD]}|j^q
}xI|D]A}|d}|dpCd}|dk	r�tj|||d�}dd|dj|�}nd|j|�|f}y�tj	|�||krRtj
|�}	tjd	7_z_t|d
�}
|	j
|
krtj	d|	j
�n%tj	d|	j
�tj	d
|
�Wdtjd	8_XnWq&tk
rfq&Xq&WdS(NR*R+tis
t is%s - %siR5sINSTALLED: %s (latest)s
INSTALLED: %ss
LATEST:    %s(R	tworking_settproject_nameRttextwraptwraptjointljustRtnotifytget_distributiontindentR=R3tUnicodeEncodeError(R(tname_column_widthRtptinstalled_packagesRBR*R+tlinetdisttlatest((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyR#Xs,



cCs�ytt|�t|��SWntk
r0nXytt|�t|��SWn_tk
r�tgt|�jD]}t|�^qqgt|�jD]}t|�^q��SXdS(N(RR
t
ValueErrorRt	TypeErrorR3tstr(tversion1tversion2tv((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pytcompare_versionsts

(cCstd�|�S(NcSst||�dkr|p|S(Ni(R\(tv1tv2((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyR9�s(R(R5((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyR=�s(R RHtpip.downloadtpiptpip.basecommandRRtpip.utilRtpip.logRtpip.backwardcompatRRRtpip.exceptionsRtpip.status_codesRtpip._vendorR	tdistutils.versionR
RRRRR#R\R=(((sD/opt/alt/python33/lib/python3.3/site-packages/pip/commands/search.pyt<module>s*		

Zerion Mini Shell 1.0