<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Ren                 @   s  d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 Z	 d  d l
 Z
 d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z m Z d  d	 l m Z m Z m Z m Z m Z d  d
 l  m! Z" d  d l# m$ Z% d  d l& m' Z' d  d l( m) Z) d  d l* m+ Z+ m, Z, m- Z- m. Z. d  d l/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 d  d l4 m5 Z5 m6 Z6 d  d l7 m8 Z8 m9 Z9 e rd  d l m: Z; n d  d l m; Z; e5 rd  d l< m= Z= m> Z> m? Z? m@ Z@ mA ZA mB ZB mC ZC mD ZD mE ZE mF ZF mG ZG mH ZH d  d lI mJ ZJ eF eK eK eK f ZL eG d  ZM d d d d d d d d d d  d! d" d# d$ g ZN e jO eP  ZQ d% d&   ZR d' d(   ZS d) d"   ZT d* d    ZU e d+ d, d- d.  d/ d0 d   ZV d1 d2   ZW d3 d4   ZX d5 d   ZY d6 d7 d  ZZ d8 d9   Z[ d: d;   Z\ d< d   Z] d= d>   Z^ d? d@   Z_ dA d   Z` dB dC   Za dD d   Zb e jc dE dF  Zd dG dH d  Ze dI d   Zf dJ d   Zg dK dL   Zh dM dN   Zi dO dP   Zj dQ dR   Zk dS dT   Zl dU dV   Zm dG e2 dG d/ d/ d dW dX  Zn dY dZ   Zo d[ d\   Zp d] d^   Zq d_ d`   Zr da db   Zs Gdc dd   dd et  Zu Gde df   df e;  Zv e jw dg dh    Zx di d!   Zy dj dk   Zz d dl d#  Z{ dm dn   Z| do dp   Z} dq dr   Z~ ds dt du  Z dv dw   Z dx dy   Z dz d{   Z d| d}   Z d~ d   Z d d   Z d d   Z d d$   Z d d   Z Gd d   d et  Z d d   Z d d   Z d d   Z d d   Z d d d  Z d d   Z d d   Z d d   Z d S)    )absolute_importN)deque)tee)pkg_resources)canonicalize_name)retry)PY2	text_type)filterfilterfalseinputmapzip_longest)parse)unquote)__version__)CommandError)distutils_schemeget_major_minor_versionsite_packages	user_site)WINDOWS
expanduserstdlib_pkgsstr_to_display)MYPY_CHECK_RUNNINGcast)running_under_virtualenvvirtualenv_no_global)BytesIO)StringIO)AnyAnyStrCallable	ContainerIterableIteratorListOptionalTextTupleTypeVarUnion)DistributionTrmtreedisplay_path
backup_dirasksplitextformat_sizeis_installable_dirnormalize_pathrenamesget_progcaptured_stdout
ensure_dirget_installed_versionremove_auth_from_urlc              C   sL   t  j j t  j j t  d d  }  t  j j |   }  d j t |  t    S)Nz..zpip {} from {} (python {}))	ospathjoindirname__file__abspathformatr   r   )pip_pkg_dir rE   /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/misc.pyget_pip_versionO   s    $rG   c             C   s\   t  |   d k  r- |  d t  |   d 7}  n" t  |   d k rO |  d d  }  t d |   S)ax  
    Convert a tuple of ints representing a Python version to one of length
    three.

    :param py_version_info: a tuple of ints representing a Python version,
        or None to specify no version. The tuple can have any length.

    :return: a tuple of length three if `py_version_info` is non-None.
        Otherwise, return `py_version_info` unchanged (i.e. None).
       r   NVersionInfo)r   )lenr   )py_version_inforE   rE   rF   normalize_version_info[   s
    rL   c             C   sd   y t  j |   WnL t k
 r_ } z, | j t j k rM | j t j k rM   WYd d } ~ Xn Xd S)z os.path.makedirs without EEXIST.N)r=   makedirsOSErrorerrnoEEXIST	ENOTEMPTY)r>   erE   rE   rF   r:   o   s
    $c              C   s_   y= t  j j t j d  }  |  d k r8 d j t j  S|  SWn t t t	 f k
 rZ Yn Xd S)Nr   __main__.py-cz	{} -m pippip)rS   rT   )
r=   r>   basenamesysargvrC   
executableAttributeError	TypeError
IndexError)progrE   rE   rF   r8   z   s    stop_max_delayi  
wait_fixedi  Fc             C   s   t  j |  d | d t d  S)Nignore_errorsonerror)shutilr/   rmtree_errorhandler)dirr`   rE   rE   rF   r/      s    c             C   sk   y t  j |  j t j @} Wn t t f k
 r< d SYn X| rd t  j | t j  |  |  d S  d S)zOn Windows, the files in .svn are read-only, so when rmtree() tries to
    remove them, an exception is thrown.  We catch that here, remove the
    read-only attribute, and hopefully continue without problems.N)r=   statst_modeS_IWRITEIOErrorrN   chmod)funcr>   exc_infohas_attr_readonlyrE   rE   rF   rc      s    	
rc   c             C   s   |  d k r d St  |  t  r# |  Sy |  j t j   d  } Wn< t k
 r} t rm t d j |    } n t	 |   } Yn X| S)z
    Convert a bytes (or text) path to text (unicode in Python 2) for display
    and logging purposes.

    This function should never error out. Also, this function is mainly needed
    for Python 2 since in Python 3 str paths are already text.
    Nstrictzb{!r})

isinstancer	   decoderW   getfilesystemencodingUnicodeDecodeErrorr   r   rC   ascii)r>   r0   rE   rE   rF   path_to_display   s    	rs   c             C   s   t  j j t  j j |    }  t j d d k ra |  j t j   d  }  |  j t j	   d  }  |  j
 t  j   t  j j  r d |  t t  j    d  }  |  S)zTGives the display value for a given path, making it relative to cwd
    if possible.r      replace.N)r=   r>   normcaserB   rW   version_inforo   rp   encodegetdefaultencoding
startswithgetcwdseprJ   )r>   rE   rE   rF   r0      s     z.bakc             C   sK   d } | } x4 t  j j |  |  rB | d 7} | t |  } q W|  | S)z\Figure out the name of a directory to back up the given dir to
    (adding .bak, .bak2, etc)   )r=   r>   existsstr)rd   extn	extensionrE   rE   rF   r1      s    
c             C   sC   x3 t  j j d d  j   D] } | | k r | Sq Wt |  |  S)NPIP_EXISTS_ACTION )r=   environgetsplitr2   )messageoptionsactionrE   rE   rF   ask_path_exists   s    "r   c             C   s+   t  j j d  r' t d j |     d S)z&Raise an error if no input is allowed.PIP_NO_INPUTz7No input was expected ($PIP_NO_INPUT set); question: {}N)r=   r   r   	ExceptionrC   )r   rE   rE   rF   _check_no_input   s    r   c             C   se   x^ t  |   t |   } | j   j   } | | k rY t d j | d j |    q | Sq Wd S)z@Ask the message interactively, with the given possible responsesz>Your response ({!r}) was not one of the expected responses: {}z, N)r   r   striplowerprintrC   r?   )r   r   responserE   rE   rF   r2      s    
c             C   s   t  |   t |   S)zAsk for input interactively.)r   r   )r   rE   rE   rF   	ask_input   s    
r   c             C   s   t  |   t j |   S)z!Ask for a password interactively.)r   getpass)r   rE   rE   rF   ask_password  s    
r   c             C   sx   |  d k r! d j  |  d d  S|  d	 k rD d j  t |  d   S|  d k ra d j  |  d  Sd j  t |    Sd  S)
Ni  z	{:.1f} MBg     @@
   z{} kBz	{:.1f} kBz{} bytesi@B i'  )rC   int)bytesrE   rE   rF   r4     s    c                sU   d d   |  D }  d d   t  |  d d  D     f d d   |  D } |   f S)zReturn a list of formatted rows and a list of column sizes.

    For example::

    >>> tabulate([['foobar', 2000], [0xdeadbeef]])
    (['foobar     2000', '3735928559'], [10, 4])
    c             S   s%   g  |  ] } t  t t |    q SrE   )tupler   r   ).0rowrE   rE   rF   
<listcomp>#  s   	 ztabulate.<locals>.<listcomp>c             S   s%   g  |  ] } t  t t |    q SrE   )maxr   rJ   )r   colrE   rE   rF   r   $  s   	 	fillvaluer   c                s4   g  |  ]* } d  j  t t j |     j    q S) )r?   r   r   ljustrstrip)r   r   )sizesrE   rF   r   %  s   	 )r   )rowstablerE   )r   rF   tabulate  s    	r   c             C   sp   t  j j |   s d St  j j |  d  } t  j j |  rA d St  j j |  d  } t  j j |  rl d Sd S)zBIs path is a directory containing setup.py or pyproject.toml?
    Fzsetup.pyTzpyproject.toml)r=   r>   isdirr?   isfile)r>   setup_pypyproject_tomlrE   rE   rF   r5   )  s    c             c   s&   x |  j  |  } | s P| Vq Wd S)z7Yield pieces of data from a file-like object until EOF.N)read)filesizechunkrE   rE   rF   read_chunks8  s
    r   Tc             C   sI   t  |   }  | r' t j j |   }  n t j j |   }  t j j |   S)zN
    Convert a path to its canonical, case-normalized, absolute version.

    )r   r=   r>   realpathrB   rw   )r>   resolve_symlinksrE   rE   rF   r6   A  s
    c             C   sX   t  j |   \ } } | j   j d  rN | d d  | } | d d  } | | f S)z,Like os.path.splitext, but take off .tar tooz.tar   Nr   )	posixpathr3   r   endswith)r>   baser   rE   rE   rF   r3   O  s
    c             C   s   t  j j |  \ } } | rD | rD t  j j |  rD t  j |  t j |  |  t  j j |   \ } } | r | r y t  j |  Wn t k
 r Yn Xd S)z7Like os.renames(), but handles renaming across devices.N)	r=   r>   r   r   rM   rb   move
removedirsrN   )oldnewheadtailrE   rE   rF   r7   Y  s    c             C   s#   t    s d S|  j t t j   S)z
    Return True if path is within sys.prefix, if we're running in a virtualenv.

    If we're not in a virtualenv, all paths are considered "local."

    Caution: this function assumes the head of path has been normalized
    with normalize_path.
    T)r   r{   r6   rW   prefix)r>   rE   rE   rF   is_localk  s    
	r   c             C   s   t  t |    S)z
    Return True if given Distribution object is installed locally
    (i.e. within current virtualenv).

    Always True if we're not in a virtualenv.

    )r   dist_location)distrE   rE   rF   dist_is_localz  s    	r   c             C   s   t  |   j t t   S)zF
    Return True if given Distribution is installed in user site.
    )r   r{   r6   r   )r   rE   rE   rF   dist_in_usersite  s    r   c             C   s   t  |   j t t   S)z[
    Return True if given Distribution is installed in
    sysconfig.get_python_lib().
    )r   r{   r6   r   )r   rE   rE   rF   dist_in_site_packages  s    r   c             C   s<   t  t |    } | j t  t d  d j d  d   S)zf
    Return True if given Distribution is installed in
    path matching distutils_scheme layout.
    r   purelibpythonr   )r6   r   r{   r   r   )r   	norm_pathrE   rE   rF   dist_in_install_path  s    	r   c             C   sJ   xC t  j D]8 } t j j | |  j d  } t j j |  r
 d Sq
 Wd S)zC
    Return True if given Distribution is an editable install.
    z	.egg-linkTF)rW   r>   r=   r?   project_namer   )r   	path_itemegg_linkrE   rE   rF   dist_is_editable  s
    r   c                s   | r t  j |  } n	 t  j } |  r0 t  n d d    | rQ d d     n d d     | rr d d    n d d    | r t  n d	 d
          f d d   | D S)a^  
    Return a list of installed Distribution objects.

    If ``local_only`` is True (default), only return installations
    local to the current virtualenv, if in a virtualenv.

    ``skip`` argument is an iterable of lower-case project names to
    ignore; defaults to stdlib_pkgs

    If ``include_editables`` is False, don't report editables.

    If ``editables_only`` is True , only report editables.

    If ``user_only`` is True , only report installations in the user
    site directory.

    If ``paths`` is set, only report the distributions present at the
    specified list of locations.
    c             S   s   d S)NTrE   )drE   rE   rF   
local_test  s    z/get_installed_distributions.<locals>.local_testc             S   s   d S)NTrE   )r   rE   rE   rF   editable_test  s    z2get_installed_distributions.<locals>.editable_testc             S   s   t  |   S)N)r   )r   rE   rE   rF   r     s    c             S   s
   t  |   S)N)r   )r   rE   rE   rF   editables_only_test  s    z8get_installed_distributions.<locals>.editables_only_testc             S   s   d S)NTrE   )r   rE   rE   rF   r     s    c             S   s   d S)NTrE   )r   rE   rE   rF   	user_test  s    z.get_installed_distributions.<locals>.user_testc                sU   g  |  ]K }  |  r | j   k r   |  r  |  r  |  r |  q SrE   )key)r   r   )r   r   r   skipr   rE   rF   r     s   	 z/get_installed_distributions.<locals>.<listcomp>)r   
WorkingSetworking_setr   r   )
local_onlyr   include_editableseditables_only	user_onlypathsr   rE   )r   r   r   r   r   rF   get_installed_distributions  s     			r   c             C   sY   t  |   }  t d d d f  d d d d d d d d	  } d
 d   | D } | j |   S)zFind a distribution matching the ``req_name`` in the environment.

    This searches from *all* distributions available in the environment, to
    match the behavior of ``pkg_resources.get_distribution()``.
    r   Fr   r   Tr   r   r   Nc             S   s"   i  |  ] } | t  | j   q SrE   )r   r   )r   prE   rE   rF   
<dictcomp>  s   	 z(_search_distribution.<locals>.<dictcomp>)r   r   r   )req_namepackagespkg_dictrE   rE   rF   _search_distribution  s    
	r   c             C   sL   t  |   } | sB y t j j |   Wn t j k
 rA d SYn Xt  |   S)zGiven a requirement name, return the installed Distribution object.

    This searches from *all* distributions available in the environment, to
    match the behavior of ``pkg_resources.get_distribution()``.
    N)r   r   r   requireDistributionNotFound)r   r   rE   rE   rF   get_distribution  s    		r   c             C   s   g  } t    r< | j t  t   r\ t r\ | j t  n  t rO | j t  | j t  x@ | D]8 } t j j | |  j  d } t j j	 |  rc | Sqc Wd S)a  
    Return the path for the .egg-link file if it exists, otherwise, None.

    There's 3 scenarios:
    1) not in a virtualenv
       try to find in site.USER_SITE, then site_packages
    2) in a no-global virtualenv
       try to find in site_packages
    3) in a yes-global virtualenv
       try to find in site_packages, then site.USER_SITE
       (don't look in global location)

    For #1 and #3, there could be odd cases, where there's an egg-link in 2
    locations.

    This method will just return the first one found.
    z	.egg-linkN)
r   appendr   r   r   r=   r>   r?   r   r   )r   sitessiteegglinkrE   rE   rF   egg_link_path$  s    	r   c             C   s)   t  |   } | r t |  St |  j  S)aO  
    Get the site-packages location of this distribution. Generally
    this is dist.location, except in the case of develop-installed
    packages, where dist.location is the source code location, and we
    want to know where the egg-link file is.

    The returned location is normalized (in particular, with symlinks removed).
    )r   r6   location)r   r   rE   rE   rF   r   H  s    

r   c             G   s   t  j |  |  d  S)N)loggerinfo)msgargsrE   rE   rF   write_outputX  s    r   c               @   s:   e  Z d  Z d Z d d   Z d d   Z d d   Z d S)	FakeFilezQWrap a list of lines in an object with readline() to make
    ConfigParser happy.c             C   s   t  |  |  _ d  S)N)iter_gen)selflinesrE   rE   rF   __init__`  s    zFakeFile.__init__c             C   s.   y t  |  j  SWn t k
 r) d SYn Xd  S)Nr   )nextr   StopIteration)r   rE   rE   rF   readlinec  s    zFakeFile.readlinec             C   s   |  j  S)N)r   )r   rE   rE   rF   __iter__i  s    zFakeFile.__iter__N)__name__
__module____qualname____doc__r   r   r   rE   rE   rE   rF   r   ]  s   r   c               @   s4   e  Z d  Z e d d    Z e d d    Z d S)StreamWrapperc             C   s   | |  _  |    S)N)orig_stream)clsr   rE   rE   rF   from_streamo  s    	zStreamWrapper.from_streamc             C   s
   |  j  j S)N)r   encoding)r   rE   rE   rF   r  u  s    zStreamWrapper.encodingN)r   r   r   classmethodr  propertyr  rE   rE   rE   rF   r   m  s   r   c             c   sR   t  t |   } t t |  t j |   z t  t |   VWd t t |  |  Xd S)zReturn a context manager used by captured_stdout/stdin/stderr
    that temporarily replaces the sys stream *stream_name* with a StringIO.

    Taken from Lib/support/__init__.py in the CPython repo.
    N)getattrrW   setattrr   r  )stream_nameorig_stdoutrE   rE   rF   captured_outputz  s
    r	  c               C   s
   t  d  S)zCapture the output of sys.stdout:

       with captured_stdout() as stdout:
           print('hello')
       self.assertEqual(stdout.getvalue(), 'hello
')

    Taken from Lib/support/__init__.py in the CPython repo.
    stdout)r	  rE   rE   rE   rF   r9     s    	c               C   s
   t  d  S)z 
    See captured_stdout().
    stderr)r	  rE   rE   rE   rF   captured_stderr  s    r  c             C   sJ   t  j j |   } | d k r* t  j   } | j |  } | rF | j Sd S)zCGet the installed version of dist_name avoiding pkg_resources cacheN)r   Requirementr   r   findversion)	dist_namer   reqr   rE   rE   rF   r;     s
    c             C   s   t  |  d d d S)zConsume an iterable at C speed.maxlenr   N)r   )iteratorrE   rE   rF   consume  s    r  c              O   sW   t  t |  t t |     |  } d d   | j   D } | | d <t d f  |  S)Nc             S   s   i  |  ] \ } } | |  q SrE   rE   )r   r   valuerE   rE   rF   r     s   	 zenum.<locals>.<dictcomp>reverse_mappingEnum)dictziprangerJ   itemstype)
sequentialnamedenumsreverserE   rE   rF   enum  s    $
r!  c             C   s;   | d k r |  Sd |  k r+ d j  |   }  d j  |  |  S)z.
    Build a netloc from a host-port pair
    N:z[{}]z{}:{})rC   )hostportrE   rE   rF   build_netloc  s
    r%  httpsc             C   sL   |  j  d  d k r< d |  k r< d |  k r< d j |   }  d j | |   S)z)
    Build a full URL from a netloc.
    r"  rt   @[z[{}]z{}://{})countrC   )netlocschemerE   rE   rF   build_url_from_netloc  s    -r,  c             C   s+   t  |   } t j |  } | j | j f S)z2
    Return the host-port pair from a netloc.
    )r,  urllib_parseurlparsehostnamer$  )r*  urlparsedrE   rE   rF   parse_netloc  s    r2  c             C   s~   d |  k r |  d f S|  j  d d  \ } }  d | k rO | j d d  } n | d f } t d d   | D  } |  | f S)zp
    Parse out and remove the auth information from a netloc.

    Returns: (netloc, (username, password)).
    r'  Nr~   r"  c             s   s-   |  ]# } | d  k r d  n	 t  |  Vq d  S)N)urllib_unquote)r   xrE   rE   rF   	<genexpr>  s    z)split_auth_from_netloc.<locals>.<genexpr>)NN)rsplitr   r   )r*  auth	user_passrE   rE   rF   split_auth_from_netloc  s    
r9  c             C   st   t  |   \ }  \ } } | d k r( |  S| d k rC d } d } n t j |  } d } d j d | d | d |   S)	z
    Replace the sensitive data in a netloc with "****", if it exists.

    For example:
        - "user:pass@example.com" returns "user:****@example.com"
        - "accesstoken@example.com" returns "****@example.com"
    Nz****r   z:****z{user}{password}@{netloc}userpasswordr*  )r9  r-  quoterC   )r*  r:  r;  rE   rE   rF   redact_netloc  s    		r=  c             C   s\   t  j |   } | | j  } | j | d | j | j | j f } t  j |  } | | f S)aR  Transform and replace netloc in a url.

    transform_netloc is a function taking the netloc and returning a
    tuple. The first element of this tuple is the new netloc. The
    entire tuple is returned.

    Returns a tuple containing the transformed url as item 0 and the
    original tuple returned by transform_netloc as item 1.
    r   )r-  urlsplitr*  r+  r>   queryfragment
urlunsplit)r0  transform_netlocpurlnetloc_tuple
url_piecessurlrE   rE   rF   _transform_url  s
    
%rG  c             C   s
   t  |   S)N)r9  )r*  rE   rE   rF   _get_netloc$  s    rH  c             C   s   t  |   f S)N)r=  )r*  rE   rE   rF   _redact_netloc(  s    rI  c             C   s(   t  |  t  \ } \ } } | | | f S)z
    Parse a url into separate netloc, auth, and url with no auth.

    Returns: (url_without_auth, netloc, (username, password))
    )rG  rH  )r0  url_without_authr*  r7  rE   rE   rF   split_auth_netloc_from_url,  s    rK  c             C   s   t  |  t  d S)z7Return a copy of url with 'username:password@' removed.r   )rG  rH  )r0  rE   rE   rF   r<   7  s    c             C   s   t  |  t  d S)z.Replace the password in a given url with ****.r   )rG  rI  )r0  rE   rE   rF   redact_auth_from_url?  s    rL  c               @   sL   e  Z d  Z d d   Z d d   Z d d   Z d d   Z d	 d
   Z d S)
HiddenTextc             C   s   | |  _  | |  _ d  S)N)secretredacted)r   rN  rO  rE   rE   rF   r   F  s    	zHiddenText.__init__c             C   s   d j  t |    S)Nz<HiddenText {!r}>)rC   r   )r   rE   rE   rF   __repr__O  s    zHiddenText.__repr__c             C   s   |  j  S)N)rO  )r   rE   rE   rF   __str__S  s    zHiddenText.__str__c             C   s,   t  |   t  |  k r d S|  j | j k S)NF)r  rN  )r   otherrE   rE   rF   __eq__X  s    zHiddenText.__eq__c             C   s   |  | k S)NrE   )r   rR  rE   rE   rF   __ne__c  s    zHiddenText.__ne__N)r   r   r   r   rP  rQ  rS  rT  rE   rE   rE   rF   rM  E  s
   	rM  c             C   s   t  |  d d S)NrO  z****)rM  )r  rE   rE   rF   
hide_valueh  s    rU  c             C   s   t  |   } t |  d | S)NrO  )rL  rM  )r0  rO  rE   rE   rF   hide_urlm  s    rV  c             C   s   d d j  t j d  d j  t j d d    g } |  o] t o] t j j t j d  | k } | r t j d d g t j d	 d  } t	 d
 j  d j
 |     d S)zProtection of pip.exe from modification on Windows

    On Windows, any operation modifying pip should be run as:
        python -m pip ...
    zpip.exez	pip{}.exer   zpip{}.{}.exeNrt   z-mrU   r~   z3To modify pip, please run the following command:
{}r   )rC   rW   rx   r   r=   r>   rV   rX   rY   r   r?   )modifying_pip	pip_namesshould_show_use_python_msgnew_commandrE   rE   rF   (protect_pip_from_modification_on_windowss  s    r[  c               C   s   t  j d k	 o t  j j   S)z!Is this console interactive?
    N)rW   stdinisattyrE   rE   rE   rF   is_console_interactive  s    r^  r~      c             C   so   t  j   } d } t |  d  A } x7 t | d | D]# } | t |  7} | j |  q7 WWd QRX| | f S)z:Return (hash, length) for path using hashlib.sha256()
    r   rbr   N)hashlibsha256openr   rJ   update)r>   	blocksizehlengthfblockrE   rE   rF   	hash_file  s    rj  c              C   s-   y d d l  }  Wn t k
 r( d SYn Xd S)z8
    Return whether the wheel package is installed.
    r   NFT)wheelImportError)rk  rE   rE   rF   is_wheel_installed  s
    	rm  c             C   s   t  |   }  t |  |   S)zb
    Return paired elements.

    For example:
        s -> (s0, s1), (s2, s3), (s4, s5), ...
    )r   r   )iterablerE   rE   rF   pairwise  s    ro  c             C   s.   t  |  \ } } t |  |  t |  |  f S)z
    Use a predicate to partition entries into false entries and true entries,
    like

        partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
    )r   r   r
   )predrn  t1t2rE   rE   rF   	partition  s    rs  i   )
__future__r   
contextlibrO   r   ra  iologgingr=   r   rb   re   rW   collectionsr   	itertoolsr   pip._vendorr   Zpip._vendor.packaging.utilsr   pip._vendor.retryingr   Zpip._vendor.sixr   r	   pip._vendor.six.movesr
   r   r   r   r   Zpip._vendor.six.moves.urllibr   r-  "pip._vendor.six.moves.urllib.parser   r3  rU   r   pip._internal.exceptionsr   pip._internal.locationsr   r   r   r   pip._internal.utils.compatr   r   r   r   pip._internal.utils.typingr   r   pip._internal.utils.virtualenvr   r   r   r    typingr!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   Zpip._vendor.pkg_resourcesr-   r   rI   r.   __all__	getLoggerr   r   rG   rL   r:   r8   r/   rc   rs   r0   r1   r   r   r2   r   r   r4   r   r5   DEFAULT_BUFFER_SIZEr   r6   r3   r7   r   r   r   r   r   r   r   r   r   r   r   r   objectr   r   contextmanagerr	  r9   r  r;   r  r!  r%  r,  r2  r9  r=  rG  rH  rI  rK  r<   rL  rM  rU  rV  r[  r^  rj  rm  ro  rs  rE   rE   rE   rF   <module>   s   (""R	"
	
	
>$
#