£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

Rec           @   s  d  d l  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
 m Z d  d l 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 m Z d  d
 l m Z d  d l m Z n  e  j e  Z d e f d     YZ d S(   iN(   t   Command(   t   ERRORt   SUCCESS(   t   Configurationt   get_configuration_filest   kinds(   t   PipError(   t
   indent_log(   t   get_progt   write_output(   t   MYPY_CHECK_RUNNING(   t   Listt   Anyt   Optional(   t   Values(   t   Kindt   ConfigurationCommandc           B   s   e  Z d  Z e Z d Z d   Z d   Z d   Z d   Z	 d   Z
 d   Z d   Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z RS(   sh  
    Manage local and global configuration.

    Subcommands:

    - list: List the active configuration (or from the file specified)
    - edit: Edit the configuration file in an editor
    - get: Get the value associated with name
    - set: Set the name=value
    - unset: Unset the value associated with name
    - debug: List the configuration files and values defined under them

    If none of --user, --global and --site are passed, a virtual
    environment configuration file is used if one is active and the file
    exists. Otherwise, all modifications happen on the to the user file by
    default.
    s  
        %prog [<file-option>] list
        %prog [<file-option>] [--editor <editor-path>] edit

        %prog [<file-option>] get name
        %prog [<file-option>] set name value
        %prog [<file-option>] unset name
        %prog [<file-option>] debug
    c      
   C   s   |  j  j d d d d d d d  d d |  j  j d	 d d
 d d d t d d |  j  j d d d d d d t d d |  j  j d d d d d d t d d |  j j d |  j   d  S(   Ns   --editort   destt   editort   actiont   storet   defaultt   helps\   Editor to use to edit the file. Uses VISUAL or EDITOR environment variables if not provided.s   --globalt   global_filet
   store_trues+   Use the system-wide configuration file onlys   --usert	   user_files$   Use the user configuration file onlys   --sitet	   site_files3   Use the current environment configuration file onlyi    (   t   cmd_optst
   add_optiont   Nonet   Falset   parsert   insert_option_group(   t   self(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyt   add_options8   s2    				c         C   s@  i |  j  d 6|  j d 6|  j d 6|  j d 6|  j d 6|  j d 6} | sY | d | k r| t j d d	 j t	 |    t
 S| d } y |  j | d
 | d k } Wn( t k
 r } t j | j d  t
 SXt d | j d |  |  _ |  j j   y | | | | d  Wn( t k
 r;} t j | j d  t
 SXt S(   Nt   listt   editt   gett   sett   unsett   debugi    s   Need an action (%s) to perform.s   , t
   need_valuet   isolatedt	   load_onlyi   (   R%   R&   R'   R$   (   t   list_valuest   open_in_editort   get_namet   set_name_valuet
   unset_namet   list_config_valuest   loggert   errort   joint   sortedR   t   _determine_fileR   t   argsR   t   isolated_modet   configurationt   loadR   (   R!   t   optionsR7   t   handlersR   R+   t   e(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyt   run_   s8    





c         C   s   g  t  j | j f t  j | j f t  j | j f f D] \ } } | r4 | ^ q4 } | s | sb d  St d   t	   t  j D  r t  j St  j Sn t
 |  d k r | d St d   d  S(   Nc         s   s!   |  ] } t  j j |  Vq d  S(   N(   t   ost   patht   exists(   t   .0t   site_config_file(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pys	   <genexpr>   s   i   i    sL   Need exactly one file to operate upon (--user, --site, --global) to perform.(   R   t   USERR   t   GLOBALR   t   SITER   R   t   anyR   t   lenR   (   R!   R;   R)   t   keyt   valuet   file_options(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR6      s"    
c         C   sP   |  j  | d d d x3 t |  j j    D] \ } } t d | |  q, Wd  S(   NR#   t   ni    s   %s=%r(   t   _get_n_argsR5   R9   t   itemsR	   (   R!   R;   R7   RI   RJ   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR,      s    "c         C   s;   |  j  | d d d } |  j j |  } t d |  d  S(   Ns
   get [name]RL   i   s   %s(   RM   R9   t	   get_valueR	   (   R!   R;   R7   RI   RJ   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR.      s    c         C   s?   |  j  | d d d \ } } |  j j | |  |  j   d  S(   Ns   set [name] [value]RL   i   (   RM   R9   t	   set_valuet   _save_configuration(   R!   R;   R7   RI   RJ   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR/      s    c         C   s6   |  j  | d d d } |  j j |  |  j   d  S(   Ns   unset [name]RL   i   (   RM   R9   t   unset_valueRQ   (   R!   R;   R7   RI   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR0      s    c      
   C   s   |  j  | d d d |  j   x t |  j j    D]r \ } } t d |  xV | D]N } t   = t j j	 |  } t d | |  | r |  j
 |  n  Wd QXqV Wq6 Wd S(   s9   List config key-value pairs across different config filesR(   RL   i    s   %s:s   %s, exists: %rN(   RM   t   print_env_var_valuesR5   R9   t   iter_config_filesR	   R   R?   R@   RA   t   print_config_file_values(   R!   R;   R7   t   variantt   filest   fnamet   file_exists(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR1      s    
"

c      	   C   sM   xF |  j  j |  j   D], \ } } t    t d | |  Wd QXq Wd S(   s.   Get key-value pairs from the file of a variants   %s: %sN(   R9   t   get_values_in_configRN   R   R	   (   R!   RV   t   nameRJ   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyRU      s    
c      	   C   sl   t  d d  t   P xH t |  j j    D]1 \ } } d j | j    } t  d | |  q- WWd QXd S(   s5   Get key-values pairs present as environment variabless   %s:t   env_vars   PIP_{}s   %s=%rN(   R	   R   R5   R9   t   get_environ_varst   formatt   upper(   R!   RI   RJ   R\   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyRS      s
    
"c         C   s   |  j  |  } |  j j   } | d  k r9 t d   n  y t j | | g  Wn. t j k
 r } t d j | j	    n Xd  S(   Ns%   Could not determine appropriate file.s*   Editor Subprocess exited with exit code {}(
   t   _determine_editorR9   t   get_file_to_editR   R   t
   subprocesst
   check_callt   CalledProcessErrorR^   t
   returncode(   R!   R;   R7   R   RX   R=   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR-      s    c         C   sU   t  |  | k r9 d j | t   |  } t |   n  | d k rM | d S| Sd S(   sJ   Helper to make sure the command got the right number of arguments
        sJ   Got unexpected number of arguments, expected {}. (example: "{} config {}")i   i    N(   RH   R^   R   R   (   R!   R7   t   exampleRL   t   msg(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyRM      s    c         C   sB   y |  j  j   Wn* t k
 r= t j d  t d   n Xd  S(   Ns:   Unable to save configuration. Please report this as a bug.s   Internal Error.(   R9   t   savet	   ExceptionR2   t	   exceptionR   (   R!   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyRQ     s    c         C   sZ   | j  d  k	 r | j  Sd t j k r0 t j d Sd t j k rJ t j d St d   d  S(   Nt   VISUALt   EDITORs"   Could not determine editor to use.(   R   R   R?   t   environR   (   R!   R;   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR`     s    (   t   __name__t
   __module__t   __doc__t   Truet   ignore_require_venvt   usageR"   R>   R6   R,   R.   R/   R0   R1   RU   RS   R-   RM   RQ   R`   (    (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyR      s"   		'	.												(    t   loggingR?   Rb   t   pip._internal.cli.base_commandR    t   pip._internal.cli.status_codesR   R   t   pip._internal.configurationR   R   R   t   pip._internal.exceptionsR   t   pip._internal.utils.loggingR   t   pip._internal.utils.miscR   R	   t   pip._internal.utils.typingR
   t   typingR   R   R   t   optparseR   R   t	   getLoggerRn   R2   R   (    (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/configuration.pyt   <module>   s   