????

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/show.pyc

�
}�\]c@@s�ddlmZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
mZeje�Zdefd	��YZd
�Zeed�ZdS(i(tabsolute_importN(t
FeedParser(t
pkg_resources(tcanonicalize_name(tCommand(tERRORtSUCCESStShowCommandcB@s8eZdZdZdZdZeZd�Zd�Z	RS(sx
    Show information about one or more installed packages.

    The output is in RFC-compliant mail header format.
    tshows$
      %prog [options] <package> ...s*Show information about installed packages.cO@s^tt|�j||�|jjdddddddtdd	�|jjd
|j�dS(Ns-fs--filestdesttfilestactiont
store_truetdefaultthelps7Show the full list of installed files for each package.i(tsuperRt__init__tcmd_optst
add_optiontFalsetparsertinsert_option_group(tselftargstkw((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pyRs		cC@sO|stjd�tS|}t|�}t|d|jd|j�sKtStS(Ns.ERROR: Please provide a package name or names.t
list_filestverbose(tloggertwarningRtsearch_packages_infot
print_resultsR
RR(RtoptionsRtquerytresults((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pytrun's
(
t__name__t
__module__t__doc__tnametusagetsummarytTruetignore_require_venvRR"(((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pyRs	cc@smi}x$tjD]}||t|j�<qWg|D]}t|�^q4}xg|D]}||krV||^qVD]�}i|jd6|jd6|jd6g|j�D]}|j^q�d6}d}	d}
t|tj	�r�|j
d�r~|jd�}g|D]}|jd�d^q}
g|
D]}t
jj|j|�^q,}
g|
D]}t
jj||j�^qW}	n|j
d�r:|jd�}
q:n�|j
d	�r|jd	�}
g|
D]}t
jj|j|�^q�}
g|
D]}t
jj||j�^q�}	n|j
d
�r:|jd
�}
n|j
d�re|jd�}||d<n|j
d
�r�x:|jd
�D]&}|j�r�|j�|d<Pq�q�Wnt�}|j|
�|j�}x!dD]}|j|�||<q�Wg}x=|
j�D]/}|jd�r
|j|td��q
q
W||d<|	r`t|	�|d<n|VqvWdS(s�
    Gather details from installed distributions. Print distribution name,
    version, location, and installed files. Installed files requires a
    pip generated 'installed-files.txt' in the distributions '.egg-info'
    directory.
    R&tversiontlocationtrequirestRECORDt,itMETADATAsinstalled-files.txtsPKG-INFOsentry_points.txttentry_pointst	INSTALLERt	installersmetadata-versionR(s	home-pagetauthorsauthor-emailtlicensesClassifier: tclassifiersR
N(smetadata-versionssummarys	home-pagesauthorsauthor-emailslicense(Rtworking_setRtproject_nameR+R,R-tNonet
isinstancetDistInfoDistributionthas_metadatatget_metadata_linestsplittostpathtjointrelpathtget_metadatategg_infotstripRtfeedtclosetgett
splitlinest
startswithtappendtlentsorted(R t	installedtpR&tquery_namestpkgtdisttdeptpackaget	file_listtmetadatatlinestltpathsR1tlinetfeed_parsert
pkg_info_dicttkeyR6((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pyR4s`0


&&+.+.
	


c
C@s�t}x�t|�D]�\}}t}|dkrAtjd�n|jdd�}gtjD]7}|g|j�D]}|j	^qskr]|j
^q]}	tjd|�tjd|jdd��tjd|jd	d��tjd
|jdd��tjd|jd
d��tjd|jdd��tjd|jdd��tjd|jdd��tjddj|jdg���tjddj|	��|rgtjd|jdd��tjd|jdd��tjd�x*|jdg�D]}
tjd|
�q
Wtjd�x3|jd g�D]}tjd|j��qDWn|rtjd!�x0|jd"g�D]}tjd|j��q�Wd"|kr�tjd#�q�qqW|S($sD
    Print the informations from installed distributions found.
    is---R&tsName: %ssVersion: %sR+sSummary: %sR(s
Home-page: %ss	home-pages
Author: %sR4sAuthor-email: %ssauthor-emailsLicense: %sR5sLocation: %sR,sRequires: %ss, R-sRequired-by: %ssMetadata-Version: %ssmetadata-versions
Installer: %sR3sClassifiers:R6s  %ss
Entry-points:R1sFiles:R
s!Cannot locate installed-files.txt(
Rt	enumerateR)RtinfoRHRR7R-R&R8RARE(
t
distributionsRRtresults_printedtiRRR&RQtrequiredtrequired_byt
classifiertentryRZ((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pyR}sF7%	


(t
__future__RtloggingR?temail.parserRtpip._vendorRtpip._vendor.packaging.utilsRtpip._internal.cli.base_commandRtpip._internal.cli.status_codesRRt	getLoggerR#RRRRR(((s:/tmp/pip-install-ewDPok/pip/pip/_internal/commands/show.pyt<module>s$	I