404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.116.88.132: ~ $
3

�Pfi,�@s�ddlmZddlZddlZddlZyddlmZWn ek
rTddlmZYnXddl	m
Z
ddlmZddl
mZddlmZdd	lmZmZdd
lmZddlmZmZeje�ZGdd
�d
e�Zdd�Zdd�Zdd�ZdS)�)�absolute_importN)�zip_longest)�izip_longest)�six)�Command)�CommandError)�
PackageFinder)�get_installed_distributions�dist_is_editable)�RemovedInPip10Warning)�make_option_group�index_groupcs|eZdZdZdZdZdZ�fdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�ZS)�ListCommandzt
    List installed packages, including editables.

    Packages are listed in a case-insensitive sorted order.
    �listz
      %prog [options]zList installed packages.cs�tt|�j||�|j}|jdddddd�|jddddd	d�|jd
ddddd�|jd
ddddd�|jjdddddd�|jddddd�|jdddd$dd�|jddd d!d"�tt|j�}|jjd#|�|jjd#|�dS)%Nz-oz
--outdated�
store_trueFzList outdated packages)�action�default�helpz-uz
--uptodatezList uptodate packagesz-ez
--editablezList editable projects.z-lz--localzSIf in a virtualenv that has global access, do not list globally-installed packages.z--user�userz,Only output packages installed in user-site.)�destrrrz--prezYInclude pre-release and development versions. By default, pip only finds stable versions.z--formatZstore�list_format�legacy�columns�freeze�jsonzJSelect the output format among: legacy (default), columns, freeze or json.)rr�choicesrz--not-required�not_requiredz>List packages that are not dependencies of installed packages.)rrrr)rrrr)	�superr�__init__�cmd_optsZ
add_optionrr
�parserZinsert_option_group)�self�args�kwrZ
index_opts)�	__class__��/usr/lib/python3.6/list.pyr#s^zListCommand.__init__cCst|j||j|j|j|d�S)zK
        Create a package finder appropriate to this list command.
        )�
find_links�
index_urlsZallow_all_prereleases�
trusted_hosts�process_dependency_links�session)rr'�prer)r*)r!�optionsr(r+r%r%r&�_build_package_findercsz!ListCommand._build_package_findercCs�|jrtjdt�|jr$tjdt�|jr6tjdt�|jdkrLtjdt�|jr`|jr`t	d��t
|j|j|j
d�}|jr�|j||�}n|jr�|j||�}|jr�|j||�}|j||�dS)Nz�--allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z�--allow-all-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z�--allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.z�The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.z5Options --outdated and --uptodate cannot be combined.)Z
local_onlyZ	user_onlyZeditables_only)Zallow_external�warnings�warnrZallow_all_externalZallow_unverifiedr�outdatedZuptodaterr	ZlocalrZeditable�get_outdated�get_uptodater�get_not_required�output_package_listing)r!r-r"�packagesr%r%r&�runps<

zListCommand.runcCsdd�|j||�D�S)NcSsg|]}|j|jkr|�qSr%)�latest_version�parsed_version)�.0�distr%r%r&�
<listcomp>�sz,ListCommand.get_outdated.<locals>.<listcomp>)�iter_packages_latest_infos)r!r6r-r%r%r&r2�szListCommand.get_outdatedcCsdd�|j||�D�S)NcSsg|]}|j|jkr|�qSr%)r8r9)r:r;r%r%r&r<�sz,ListCommand.get_uptodate.<locals>.<listcomp>)r=)r!r6r-r%r%r&r3�szListCommand.get_uptodatecsBt��x$|D]}�jdd�|j�D��qWt�fdd�|D��S)Ncss|]}|jVqdS)N)�key)r:Zrequirementr%r%r&�	<genexpr>�sz/ListCommand.get_not_required.<locals>.<genexpr>c3s|]}|j�kr|VqdS)N)r>)r:Zpkg)�dep_keysr%r&r?�s)�set�updateZrequires)r!r6r-r;r%)r@r&r4�s
zListCommand.get_not_requiredccs�|jg|j}|jr*tjddj|��g}g}x&|D]}|jd�r4|j|jd��q4W|j	|���}|j
|||�}|j|�xn|D]f}d}|j|j
�}	|js�dd�|	D�}	|	s�q�t|	|jd�}
|
j}|
jjr�d}nd	}||_||_|Vq�WWdQRXdS)
NzIgnoring indexes: %s�,zdependency_links.txt�unknowncSsg|]}|jjs|�qSr%)�versionZ
is_prerelease)r:�	candidater%r%r&r<�sz:ListCommand.iter_packages_latest_infos.<locals>.<listcomp>)r>ZwheelZsdist)Z	index_urlZextra_index_urlsZno_index�logger�debug�joinZhas_metadata�extendZget_metadata_linesZ_build_sessionr.Zadd_dependency_linksZfind_all_candidatesr>r,�maxZ_candidate_sort_keyrE�locationZis_wheelr8�latest_filetype)r!r6r-r(Zdependency_linksr;r+�finder�typZall_candidatesZbest_candidateZremote_versionr%r%r&r=�s8




z&ListCommand.iter_packages_latest_infoscCs0t|�rd|j|j|jfSd|j|jfSdS)Nz%s (%s, %s)z%s (%s))r
�project_namerErL)r!r;r%r%r&�
output_legacy�s
zListCommand.output_legacycCsd|j|�|j|jfS)Nz%s - Latest: %s [%s])rQr8rM)r!r;r%r%r&�output_legacy_latest�sz ListCommand.output_legacy_latestcCs�t|dd�d�}|jdkr:|r:t||�\}}|j||�n~|jdkrfxr|D]}tjd|j|j�qJWnR|jdkr�tjt||��n6x4|D],}|j	r�tj|j
|��q�tj|j|��q�WdS)NcSs
|jj�S)N)rP�lower)r;r%r%r&�<lambda>�sz4ListCommand.output_package_listing.<locals>.<lambda>)r>rrz%s==%sr)�sortedr�format_for_columns�output_package_listing_columnsrG�inforPrE�format_for_jsonr1rRrQ)r!r6r-�data�headerr;r%r%r&r5�s



z"ListCommand.output_package_listingcCsht|�dkr|jd|�t|�\}}t|�dkrL|jddjtdd�|���x|D]}tj|�qRWdS)Nr�� cSsd|S)N�-r%)�xr%r%r&rT
sz<ListCommand.output_package_listing_columns.<locals>.<lambda>)�len�insert�tabulaterI�maprGrX)r!rZr[Zpkg_strings�sizes�valr%r%r&rWs
z*ListCommand.output_package_listing_columns)�__name__�
__module__�__qualname__�__doc__�nameZusageZsummaryrr.r7r2r3r4r=rQrRr5rW�
__classcell__r%r%)r$r&rs@
6'
rcCs�t|�dkst�dgtdd�|D��}x |D]}dd�t||�D�}q.Wg}x0|D](}djdd�t||�D��}|j|�qTW||fS)Nrcss|]}t|�VqdS)N)r`)r:r_r%r%r&r?sztabulate.<locals>.<genexpr>cSs"g|]\}}t|tt|����qSr%)rKr`�str)r:�s�cr%r%r&r<sztabulate.<locals>.<listcomp>r]cSs*g|]"\}}|dk	r"t|�j|�nd�qS)N�)rl�ljust)r:rmrnr%r%r&r<s)r`�AssertionErrorrKrrI�append)�valsrd�row�resultZdisplayr%r%r&rbs


rbcCs�|j}|rddddg}nddg}g}tdd�|D��r@|jd�xR|D]J}|j|jg}|rr|j|j�|j|j�t|�r�|j|j�|j|�qFW||fS)z_
    Convert the package data into something usable
    by output_package_listing_columns.
    ZPackageZVersionZLatestZTypecss|]}t|�VqdS)N)r
)r:r_r%r%r&r?2sz%format_for_columns.<locals>.<genexpr>ZLocation)	r1�anyrrrPrEr8rMr
rL)Zpkgsr-Zrunning_outdatedr[rZZprojrtr%r%r&rV%s 

rVcCsZg}xJ|D]B}|jtj|j�d�}|jrBtj|j�|d<|j|d<|j|�q
Wtj	|�S)N)rjrEr8rM)
rPrZ	text_typerEr1r8rMrrr�dumps)r6r-rZr;rXr%r%r&rYFs

rY) Z
__future__rrZloggingr/�	itertoolsr�ImportErrorrZpip._vendorrZpip.basecommandrZpip.exceptionsrZ	pip.indexrZ	pip.utilsr	r
Zpip.utils.deprecationrZpip.cmdoptionsrr
Z	getLoggerrfrGrrbrVrYr%r%r%r&�<module>s(
|!

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 1.96 KB 0644
__init__.cpython-36.pyc File 1.96 KB 0644
check.cpython-36.opt-1.pyc File 1.22 KB 0644
check.cpython-36.pyc File 1.22 KB 0644
completion.cpython-36.opt-1.pyc File 2.52 KB 0644
completion.cpython-36.pyc File 2.52 KB 0644
download.cpython-36.opt-1.pyc File 5.24 KB 0644
download.cpython-36.pyc File 5.24 KB 0644
freeze.cpython-36.opt-1.pyc File 2.5 KB 0644
freeze.cpython-36.pyc File 2.5 KB 0644
hash.cpython-36.opt-1.pyc File 1.86 KB 0644
hash.cpython-36.pyc File 1.86 KB 0644
help.cpython-36.opt-1.pyc File 1.03 KB 0644
help.cpython-36.pyc File 1.03 KB 0644
install.cpython-36.opt-1.pyc File 10.19 KB 0644
install.cpython-36.pyc File 10.19 KB 0644
list.cpython-36.opt-1.pyc File 9.4 KB 0644
list.cpython-36.pyc File 9.44 KB 0644
search.cpython-36.opt-1.pyc File 4.04 KB 0644
search.cpython-36.pyc File 4.04 KB 0644
show.cpython-36.opt-1.pyc File 5.19 KB 0644
show.cpython-36.pyc File 5.19 KB 0644
uninstall.cpython-36.opt-1.pyc File 2.48 KB 0644
uninstall.cpython-36.pyc File 2.48 KB 0644
wheel.cpython-36.opt-1.pyc File 5.27 KB 0644
wheel.cpython-36.pyc File 5.27 KB 0644