Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyo

ó
“tÆ_c@@sddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZddlmZmZmZmZddlmZdd
lmZddlmZerUddlm Z ddl!m"Z"m#Z#m$Z$m%Z%ddl&m'Z'ddl(m)Z)nej*e+ƒZ,de	fd„ƒYZ-d„Z.d„Z/dS(i(tabsolute_importN(tsix(t
cmdoptions(tIndexGroupCommand(tSUCCESS(tCommandError(t
LinkCollector(t
PackageFinder(tSelectionPreferences(tdist_is_editabletget_installed_distributionsttabulatetwrite_output(t
get_installer(tmap_multithread(tMYPY_CHECK_RUNNING(tValues(tListtSettTupletIterator(t
PipSession(tDistributiontListCommandcB@skeZdZeZdZd„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.
    s
      %prog [options]cC@sÓ|jjdddddtddƒ|jjdd	dddtdd
ƒ|jjdddddtdd
ƒ|jjdddddtddƒ|jjddddddtddƒ|jjtjƒƒ|jjddddtddƒ|jjddddddddd)ddƒ|jjddddd dd!ƒ|jjd"dd#dd$dd%ƒ|jjd&dddd$dd'dtƒtjtj|jƒ}|jj	d(|ƒ|jj	d(|jƒ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(R R"sjson(
tcmd_optst
add_optiontFalseRt	list_pathtTruetmake_option_grouptindex_grouptparsertinsert_option_group(tselft
index_opts((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pytadd_options.sv														cC@sCtj|d|ƒ}tdtd|jƒ}tjd|d|ƒS(sK
        Create a package finder appropriate to this list command.
        toptionstallow_yankedtallow_all_prereleasestlink_collectortselection_prefs(RtcreateRR)tpreR(R0R3tsessionR6R7((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyt_build_package_finder{s	cC@sÒ|jr!|jr!tdƒ‚ntj|ƒtd|jd|jd|jd|j	d|j
ƒ}|jr‚|j||ƒ}n|jr |j
||ƒ}n|jr¾|j||ƒ}n|j||ƒtS(Ns5Options --outdated and --uptodate cannot be combined.t
local_onlyt	user_onlyteditables_onlytinclude_editablestpaths(toutdatedtuptodateRRtcheck_list_path_optionR
tlocalRteditableR&tpathR$tget_not_requiredtget_outdatedtget_uptodatetoutput_package_listingR(R0R3targstpackages((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pytruns$
							cC@s5g|j||ƒD]}|j|jkr|^qS(N(titer_packages_latest_infostlatest_versiontparsed_version(R0RLR3tdist((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRH¬scC@s5g|j||ƒD]}|j|jkr|^qS(N(RNRORP(R0RLR3RQ((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRI³sc@sQtƒ‰x+|D]#}ˆjd„|jƒDƒƒqWt‡fd†|DƒƒS(Ncs@s|]}|jVqdS(N(tkey(t.0trequirement((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pys	<genexpr>¾sc@s%h|]}|jˆkr|’qS((RR(RStpkg(tdep_keys(sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pys	<setcomp>Ãs	(tsettupdatetrequirestlist(R0RLR3RQ((RVsL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRGºs	
!c#@sn|jˆƒY}|jˆ|ƒ‰‡‡fd†}x+t||ƒD]}|dk	rF|VqFqFWWdQXdS(Nc@s·d}ˆj|jƒ}ˆjsIg|D]}|jjs(|^q(}nˆjd|jƒ}|j|ƒ}|dkr}dS|j}|j	j
r›d}nd}||_||_|S(Ntunknowntproject_nametwheeltsdist(
tfind_all_candidatesRRR9tversiont
is_prereleasetmake_candidate_evaluatorR\tsort_best_candidatetNonetlinktis_wheelROtlatest_filetype(RQttyptall_candidatest	candidatet	evaluatortbest_candidatetremote_version(tfinderR3(sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pytlatest_infoÊs"	
					(t_build_sessionR;RRd(R0RLR3R:RoRQ((RnR3sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRNÅscC@sât|dd„ƒ}|jdkrR|rRt||ƒ\}}|j||ƒnŒ|jdkr¹xz|D]J}|jdkrœtd|j|j|jƒqhtd|j|jƒqhWn%|jdkrÞtt	||ƒƒndS(	NRRcS@s
|jjƒS(N(R\tlower(RQ((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyt<lambda>ìsR R"is%s==%s (%s)s%s==%sR#(
tsortedRtformat_for_columnstoutput_package_listing_columnstverboseRR\R`tlocationtformat_for_json(R0RLR3tdatatheaderRQ((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRJès
cC@st|ƒdkr%|jd|ƒnt|ƒ\}}t|ƒdkrq|jddjtd„|ƒƒƒnx|D]}t|ƒqxWdS(Niit cS@sd|S(Nt-((tx((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRrs(tlentinsertRtjointmapR(R0RyRztpkg_stringstsizestval((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRuûs(
(t__name__t
__module__t__doc__R+tignore_require_venvtusageR2R;RMRHRIRGRNRJRu(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyR#s	M						#	cC@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	(RSR}((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pys	<genexpr>stLocationt	Installer(RARvtanytappendR\R`RORgR	RwR
(tpkgsR3trunning_outdatedRzRytprojtrow((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRts(	%
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(NtnameR`iRwt	installerRORg(
R\Rt	text_typeR`RvRwR
RARORgR‘R#tdumps(RLR3RyRQtinfo((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyRx1s


	(0t
__future__RR#tloggingtpip._vendorRtpip._internal.cliRtpip._internal.cli.req_commandRtpip._internal.cli.status_codesRtpip._internal.exceptionsRtpip._internal.index.collectorRt"pip._internal.index.package_finderRt$pip._internal.models.selection_prefsRtpip._internal.utils.miscR	R
RRtpip._internal.utils.packagingR
tpip._internal.utils.parallelRtpip._internal.utils.typingRtoptparseRttypingRRRRtpip._internal.network.sessionRtpip._vendor.pkg_resourcesRt	getLoggerR…tloggerRRtRx(((sL/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/list.pyt<module>s.""è	&
Back to Directory File Manager