3 ÝPfi, ã @ sè d dl mZ d dlZd dlZd dlZyd dlmZ W n ek rT d dlmZ Y nX d dl m Z d dlmZ d dl mZ d dlmZ d d lmZmZ d d lmZ d dlmZmZ ejeƒZG dd „ 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_groupc s| e Zd ZdZdZdZdZ‡ fdd„Zdd„ Zd d „ Z dd„ Z d d„ Zdd„ Zdd„ 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.c sâ t t| ƒj||Ž | j}|jdddddd� |jddddd d� |jd ddddd� |jd ddddd� | jjdddddd� |jddddd� |jdddd$dd� |jddd d!d"� tt| jƒ}| jjd#|ƒ | jjd#|ƒ d S )%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.)Údestr r r z--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.)r r Úchoicesr z--not-requiredÚnot_requiredz>List packages that are not dependencies of installed packages.)r r r r )r r r r ) Úsuperr Ú__init__Úcmd_optsZ add_optionr r ÚparserZinsert_option_group)ÚselfÚargsÚkwr Z index_opts)Ú __class__© ú/usr/lib/python3.6/list.pyr # s^ zListCommand.__init__c C s t |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)r r' Úprer) r* )r! Úoptionsr( r+ r% r% r&