ó
ïRec @ sÑ d Z d d l Z d d l Z d d l m Z d d l m Z m Z d d l m Z m
Z
d d l m Z d d l
m Z m Z d d l m Z e r¯ d d l m Z m Z n d
d g Z d „ Z d
„ Z d S( s= A single place for constructing and exposing the main parser
iÿÿÿÿN( t
cmdoptions( t ConfigOptionParsert UpdatingDefaultsHelpFormatter( t
commands_dictt get_similar_commands( t CommandError( t get_pip_versiont get_prog( t MYPY_CHECK_RUNNING( t Tuplet Listt create_main_parsert
parse_commandc C sÊ i d d 6t d 6t ƒ d 6d d 6t ƒ d 6} t | } | j ƒ t ƒ | _ t j t j | ƒ } | j
| ƒ t | _ d g g t
j ƒ D] \ } } d j t ƒ ^ q } d
j | ƒ | _ | S( s6 Creates and returns the main parser for pip's CLI
s
%prog [options]t usaget add_help_optiont formattert globalt namet progt s {name:27} {command_info.summary}s
( t FalseR R R t disable_interspersed_argsR t versionR t make_option_groupt
general_groupt add_option_groupt Truet mainR t itemst formatt localst joint description( t parser_kwt parsert gen_optsR t command_infoR ( ( sŒ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/main_parser.pyR s"
/c C s# t ƒ } | j | ƒ \ } } | j rZ t j j | j ƒ t j j t j ƒ t j ƒ n | sƒ | d d k rš t | ƒ d k rš | j
ƒ t j ƒ n | d } | t k rt | ƒ } d j
| ƒ g } | rí | j d j
| ƒ ƒ n t d j | ƒ ƒ ‚ n | } | j | ƒ | | f S( Ni t helpi s unknown command "{}"s maybe you meant "{}"s - ( R t
parse_argsR t syst stdoutt writet ost linesept exitt lent
print_helpR R R t appendR R t remove( t argsR" t general_optionst args_elset cmd_namet guesst msgt cmd_args( ( sŒ /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/cli/main_parser.pyR ; s&