3 Re0, @ s& d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlm Z d dlmZ d d lmZ d d lmZ d dlmZmZmZmZ d dlmZ d d lmZ d dlmZ erd dlm Z d dl!m"Z"m#Z#m$Z$m%Z% d dl&m'Z' d dl(m)Z) ej*e+Z,G dd de Z-dd Z.dd Z/dS ) )absolute_importN)six) cmdoptions)IndexGroupCommand)SUCCESS)CommandError) LinkCollector) PackageFinder)SelectionPreferences)dist_is_editableget_installed_distributionstabulatewrite_output) get_installer)map_multithread)MYPY_CHECK_RUNNING)Values)ListSetTupleIterator) PipSession)Distributionc @ s` e Zd ZdZdZdZdd Zdd Zdd Zd d Z dd Z dd Zdd Zdd Z dd ZdS )ListCommandzt List installed packages, including editables. Packages are listed in a case-insensitive sorted order. Tz %prog [options]c C s | j jdddddd | j jddddd d | j jd ddddd | j jd ddddd | j jdddddd | j jtj | j jddddd | j jddddd+dd | j jdddd d! | j jd"d#d$d%d! | j jd&dd$d'd(d) tjtj| j}| jjd*| | jjd*| j d S ),Nz-oz --outdated store_trueFzList outdated packages)actiondefaulthelpz-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--useruserz,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--formatstorelist_formatcolumnsfreezejsonzBSelect the output format among: columns (default), freeze, or json)r r r choicesr z--not-requirednot_requiredz>List packages that are not dependencies of installed packages.)r r r z--exclude-editablestore_falseinclude_editablez%Exclude editable package from output.z--include-editablez%Include editable package from output.T)r r r r r )r" r# r$ )cmd_opts add_optionr list_pathmake_option_groupindex_groupparserinsert_option_group)self index_opts r2 /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/list.pyadd_options. sv zListCommand.add_optionsc C s* t j||d}td|jd}tj||dS )zK Create a package finder appropriate to this list command. )optionsF)allow_yankedallow_all_prereleases)link_collectorselection_prefs)r creater prer )r0 r5 sessionr8 r9 r2 r2 r3 _build_package_finder{ s z!ListCommand._build_package_finderc C s |j r|jrtdtj| t|j|j|j|j |j d}|jrL| j||}|j r`| j ||}n|jrr| j||}| j|| tS )Nz5Options --outdated and --uptodate cannot be combined.) local_only user_onlyeditables_onlyinclude_editablespaths)outdatedZuptodater r check_list_path_optionr localr editabler( pathr&