????

Your IP : 216.73.216.152


Current Path : /proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_internal/commands/
Upload File :
Current File : //proc/self/root/proc/self/root/lib/python2.7/site-packages/pip/_internal/commands/list.pyc

�
}�\]c@@sddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZmZddlmZeje�Zd
efd��YZd�Zd�Zd�ZdS(i(tabsolute_importN(tsix(tzip_longest(t
cmdoptions(tCommand(tmake_search_scope(tCommandError(t
PackageFinder(tSelectionPreferences(tdist_is_editabletget_installed_distributions(t
get_installertListCommandcB@sqeZdZdZdZdZd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�ZRS(
st
    List installed packages, including editables.

    Packages are listed in a case-insensitive sorted order.
    tlists
      %prog [options]sList installed packages.cO@s�tt|�j||�|j}|jdddddtdd�|jdd	dddtdd
�|jdddddtdd
�|jdddddtdd�|jjddddddtdd�|jtj��|jddddtdd�|jddddddddd)dd�|jddddd dd!�|jd"dd#dd$dd%�|jd&dddd$dd'dt�tj	tj
|j�}|jjd(|�|jjd(|�dS(*Ns-os
--outdatedtactiont
store_truetdefaultthelpsList outdated packagess-us
--uptodatesList uptodate packagess-es
--editablesList editable projects.s-ls--localsSIf in a virtualenv that has global access, do not list globally-installed packages.s--usertdesttusers,Only output packages installed in user-site.s--presYInclude pre-release and development versions. By default, pip only finds stable versions.s--formattstoretlist_formattcolumnstchoicestfreezetjsonsBSelect the output format among: columns (default), freeze, or jsons--not-requiredtnot_requireds>List packages that are not dependencies of installed packages.s--exclude-editabletstore_falsetinclude_editables%Exclude editable package from output.s--include-editables%Include editable package from output.i(scolumnssfreezesjson(
tsuperRt__init__tcmd_optst
add_optiontFalseRt	list_pathtTruetmake_option_grouptindex_grouptparsertinsert_option_group(tselftargstkwRt
index_opts((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyR"sz						c	C@sIt|�}tdtd|j�}tjd|d|d|jd|�S(sK
        Create a package finder appropriate to this list command.
        tallow_yankedtallow_all_prereleasestsearch_scopetselection_prefst
trusted_hoststsession(RRR!tpreRtcreateR0(R(toptionsR1R.R/((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyt_build_package_finderrs		cC@s�|jr!|jr!td��ntj|�td|jd|jd|jd|j	d|j
�}|jr�|j||�}n|jr�|j
||�}n|jr�|j||�}n|j||�dS(Ns5Options --outdated and --uptodate cannot be combined.t
local_onlyt	user_onlyteditables_onlytinclude_editablestpaths(toutdatedtuptodateRRtcheck_list_path_optionR
tlocalRteditableRtpathRtget_not_requiredtget_outdatedtget_uptodatetoutput_package_listing(R(R4R)tpackages((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pytrun�s"
							cC@s5g|j||�D]}|j|jkr|^qS(N(titer_packages_latest_infostlatest_versiontparsed_version(R(RER4tdist((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRB�scC@s5g|j||�D]}|j|jkr|^qS(N(RGRHRI(R(RER4RJ((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRC�sc@sKt��x+|D]#}�jd�|j�D��qW�fd�|D�S(Ncs@s|]}|jVqdS(N(tkey(t.0trequirement((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pys	<genexpr>�sc@s%h|]}|j�kr|�qS((RK(RLtpkg(tdep_keys(s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pys	<setcomp>�s	(tsettupdatetrequires(R(RER4RJ((ROs:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRA�s	
!cc@s�|j|���}|j||�}x�|D]�}d}|j|j�}|jszg|D]}|jjsY|^qY}n|jd|j�}	|	j	|�}
|
dkr�q+n|
j}|
jjr�d}nd}||_
||_|Vq+WWdQXdS(Ntunknowntproject_nametwheeltsdist(t_build_sessionR5tfind_all_candidatesRKR2tversiont
is_prereleasetmake_candidate_evaluatorRTtget_best_candidatetNonetlinktis_wheelRHtlatest_filetype(R(RER4R1tfinderRJttyptall_candidatest	candidatet	evaluatortbest_candidatetremote_version((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRG�s(
	
					cC@s�t|dd��}|jdkrR|rRt||�\}}|j||�n�|jdkr�x�|D]P}|jdkr�tjd|j|j|j	�qhtjd|j|j�qhWn(|jdkr�tjt
||��ndS(	NRKcS@s
|jj�S(N(RTtlower(RJ((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyt<lambda>�sRRis%s==%s (%s)s%s==%sR(tsortedRtformat_for_columnstoutput_package_listing_columnstverbosetloggertinfoRTRYtlocationtformat_for_json(R(RER4tdatatheaderRJ((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRD�s
 cC@s�t|�dkr%|jd|�nt|�\}}t|�dkrq|jddjtd�|���nx|D]}tj|�qxWdS(Niit cS@sd|S(Nt-((tx((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRi�s(tlentinsertttabulatetjointmapRnRo(R(RrRstpkg_stringstsizestval((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRl�s(
(t__name__t
__module__t__doc__tnametusagetsummaryRR5RFRBRCRARGRDRl(((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRs	P							cC@st|�dkst�dgtd�|D��}xK|D]C}gt||�D]'\}}t|tt|���^qR}q<Wg}xm|D]e}djgt||�D]3\}}|dk	r�t|�j|�nd^q��}|j|�q�W||fS(Nics@s|]}t|�VqdS(N(Rw(RLRv((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pys	<genexpr>�sRtt(	RwtAssertionErrortmaxRtstrRzR]tljusttappend(tvalsR}trowtstctresulttdisplay((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRy�s
A
	IcC@s@|j}|r$ddddg}nddg}g}|jdks[td�|D��rk|jd�n|jdkr�|jd�nx�|D]�}|j|jg}|r�|j|j�|j|j�n|jdks�t|�r|j|j	�n|jdkr%|jt
|��n|j|�q�W||fS(	s_
    Convert the package data into something usable
    by output_package_listing_columns.
    tPackagetVersiontLatesttTypeics@s|]}t|�VqdS(N(R	(RLRv((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pys	<genexpr>stLocationt	Installer(R;RmtanyR�RTRYRHR`R	RpR(tpkgsR4trunning_outdatedRsRrtprojR�((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRks(	%
cC@s�g}x�|D]�}i|jd6tj|j�d6}|jdkre|j|d<t|�|d<n|jr�tj|j�|d<|j	|d<n|j
|�q
Wtj|�S(NR�RYiRpt	installerRHR`(
RTRt	text_typeRYRmRpRR;RHR`R�Rtdumps(RER4RrRJRo((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyRq)s


	( t
__future__RRtloggingtpip._vendorRtpip._vendor.six.movesRtpip._internal.cliRtpip._internal.cli.base_commandRtpip._internal.cli.cmdoptionsRtpip._internal.exceptionsRtpip._internal.indexRt$pip._internal.models.selection_prefsRtpip._internal.utils.miscR	R
tpip._internal.utils.packagingRt	getLoggerRRnRRyRkRq(((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/list.pyt<module>s"�		%