<!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>
U
    ʗRe5D                     @   s  U 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mZm	Z	m
Z
mZmZ d dl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mZmZ d
ddddddddddgZe e!Z"e#eddZ$e%e&d< ej'dkZ(e)dddZ*e* Z+e(re+sej,Z-nej.Z-e)dddZ/ee%e%f e)ddd Z0e j1dd!e)dd"d#Z2e j1dd!e)dd$d%Z3e j1dd!e)dd&d'Z4e j1dd!e)dd(d)Z5e j1dd!e)dd*d+Z6ee% e	e%ddf d,d-d.Z7e j1dd!ej8ej8e%dd/d0d1Z9ej8ej8e%e)d/d2d3Z:e j1dd!d4dddd5e)ee% ee% ee% dd6d7d8Z;dJe%e)ee% ee% e)ee% ed9d:dZ<e%dd;dZ=e%dd<dZ>e%e)d=d>d?Z?e%dd@dZ@e%ddAdZAe%e%e
e% dBdCdDZBe%e)dEdFdGZCe%e
e% dHdIdZDdS )K    N)AnyDict	GeneratorListOptionalTuple)SCHEME_KEYSScheme)WINDOWS)
deprecated)running_under_virtualenv   )
_sysconfig)USER_CACHE_DIRget_major_minor_versionget_src_prefixis_osx_frameworksite_packages	user_siter   get_bin_prefixget_bin_userr   get_platlibget_prefixed_libsget_purelib
get_schemer   r   r   Z
platlibdirlib_PLATLIBDIR)   
   )returnc                   C   s   t ttdtS )ax  This function determines the value of _USE_SYSCONFIG.

    By default, pip uses sysconfig on Python 3.10+.
    But Python distributors can override this decision by setting:
        sysconfig._PIP_USE_SYSCONFIG = True / False
    Rationale in https://github.com/pypa/pip/issues/10647

    This is a function for testability, but should be constant during any one
    run.
    _PIP_USE_SYSCONFIG)boolgetattr	sysconfig_USE_SYSCONFIG_DEFAULT r%   r%   /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/locations/__init__.py_should_use_sysconfig/   s    r'   c                  C   s<   ddl m}  z| d d }W n tk
r2   Y dS X |dkS )zsThe resolution to bpo-44860 will change this incorrect platlib.

    See <https://bugs.python.org/issue44860>.
    r   INSTALL_SCHEMES	unix_userplatlibFz	$usersite)distutils.command.installr)   KeyError)r)   unix_user_platlibr%   r%   r&   _looks_like_bpo_44860G   s    r/   )schemer   c                 C   sP   | d }d|kr$| ddt d}d|kr0dS | dd}| dd| d	 kS )
Nr+   z/$platlibdir///lib64/Fz/lib/z
$platbase/z$base/purelib)replacer   )r0   r+   	unpatchedr%   r%   r&   +_looks_like_red_hat_patched_platlib_purelibU   s    r6   )maxsizec                      s"   ddl m  t fdddD S )zRed Hat patches platlib in unix_prefix and unix_home, but not purelib.

    This is the only way I can see to tell a Red Hat-patched Python.
    r   r(   c                 3   s"   | ]}| kot  | V  qd S N)r6   .0kr(   r%   r&   	<genexpr>g   s   z*_looks_like_red_hat_lib.<locals>.<genexpr>)unix_prefix	unix_home)r,   r)   allr%   r%   r(   r&   _looks_like_red_hat_lib_   s    r@   c                  C   s   ddl m}  d| kod| kS )z#Debian adds two additional schemes.r   r(   
deb_system
unix_local)r,   r)   r(   r%   r%   r&   _looks_like_debian_schemen   s    rC   c                  C   s^   ddl m}  ddlm} | | }|  |jtjt	j dko\|j
tjt	j
 dkS )a\  Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``.

    Red Hat's ``00251-change-user-install-location.patch`` changes the install
    command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is
    (fortunately?) done quite unconditionally, so we create a default command
    object without any configuration to detect this.
    r   )install)Distributionz/local)r,   rD   distutils.distrE   finalize_optionsexec_prefixospathnormpathsysprefix)rD   rE   cmdr%   r%   r&   _looks_like_red_hat_schemev   s    	
rO   c                  C   sJ   t dkrdS ztjddd} W n tk
r4   Y dS X d| d koHdt kS )zSlackware patches sysconfig but fails to patch distutils and site.

    Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
    path, but does not do the same to the site module.
    NF
posix_user)r0   expandr2   r3   )r   r#   	get_pathsr-   pathsr%   r%   r&   _looks_like_slackware_scheme   s    rU   c                      s.   t jddd tdd  fdddD D S )a  MSYS2 patches distutils and sysconfig to use a UNIX-like scheme.

    However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is
    likely going to be included in their 3.10 release, so we ignore the warning.
    See msys2/MINGW-packages#9319.

    MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase,
    and is missing the final ``"site-packages"``.
    ntF)rQ   c                 s   s*   | ]"}d |ko d|ko | d V  qdS )Libr   zsite-packagesN)endswithr:   pr%   r%   r&   r<      s   z1_looks_like_msys2_mingw_scheme.<locals>.<genexpr>c                 3   s   | ]} | V  qd S r8   r%   )r:   keyrS   r%   r&   r<      s     r+   r3   )r#   rR   r?   r%   r%   rS   r&   _looks_like_msys2_mingw_scheme   s    r]   )partsr   c                 c   sh   t d}ttdd }|r(|r(||s6| E d H  d S | D ](}||r\|d dt|  }|V  q:d S )N	LDVERSIONabiflagsr   )r#   get_config_varr"   rL   rX   len)r^   	ldversionr`   partr%   r%   r&   _fix_abiflags   s    


re   )oldnewr[   r   c                C   s    d}d}t t|||| | d S )Nz(https://github.com/pypa/pip/issues/10151zSValue for %s does not match. Please report this to <%s>
distutils: %s
sysconfig: %s)loggerlog_MISMATCH_LEVEL)rf   rg   r[   	issue_urlmessager%   r%   r&   _warn_mismatched   s    rm   c                C   s   | |krdS t | ||d dS )NFr[   T)rm   )rf   rg   r[   r%   r%   r&   _warn_if_mismatch   s    ro   FuserhomerootrM   )rq   rr   rs   rM   r   c                 C   s,   dddddg}t td|| ||| d S )NzAdditional context:z	user = %rz	home = %rz	root = %rzprefix = %r
)rh   ri   rj   join)rq   rr   rs   rM   r^   r%   r%   r&   _log_context   s    	rv   )	dist_namerq   rr   rs   isolatedrM   r   c              	      s  t j| |||||d}tr|S ddlm} |j| |||||dg }tD ]8}	tt|	}
tt||	}|
|krxqHt	j
jdko|d k	o|	dko|
j|jko|
jdo|jd}|rqH|ot o|	dko|
jj|jko|
jjd}|rqH|	dkrt rqH|o8|	dko8t o8t	jd	ko8td
ko8t }|rBqH|o^|	dko^t o^t }|rhqH|p~|p~|p~t  o|
jdd dkot|jdko|jd dkot|jdk s|jd dkot pt }|rqHt	jdk ot o|	dkott|
j|jk}|r(qHto<|	dko<t }|rFqHtjddobt ob|	dk}|rlqH||
|d|	 f qH|sS |j | |||||dd t! fddtD rt"dd d d S |D ]\}
}}t#|
||d qt$||||d S )N)rq   rr   rs   rx   rM   r   
_distutilspypyr\   pythonheadersr+   )r   	   r   r   )usrlocalr      r   )r      )r}   r+   r3   T)
check_home)r}   includeplatincludezscheme.)ignore_config_filesc                 3   s    | ]} | t |kV  qd S r8   )r"   r9   default_oldrf   r%   r&   r<     s     zget_scheme.<locals>.<genexpr>zConfiguring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621reasonreplacementgone_inrn   rp   )%r   r   _USE_SYSCONFIG rz   r   pathlibPathr"   rL   implementationnameparent
startswithr   r@   r
   version_infor   r/   rU   r   r^   rb   rO   rC   tuplere   r]   r#   is_python_buildappenddistutils_schemeanyr   rm   rv   )rw   rq   rr   rs   rx   rM   rg   rz   warning_contextsr;   old_vnew_vskip_pypy_special_case$skip_osx_framework_user_special_caseskip_bpo_44860skip_slackware_user_schemeskip_linux_system_special_caseskip_sysconfig_abiflag_bugskip_msys2_mingw_bugskip_cpython_buildr[   r%   r   r&   r      s   	



	
c                  C   sH   t  } tr| S ddlm} | }tt|t| ddrDt  |S )Nr   ry   
bin_prefixrn   )	r   r   r   r   rz   ro   r   r   rv   rg   rz   rf   r%   r%   r&   r     s    c                   C   s   t jdddjS )Nr   T)rq   )r   r   scriptsr%   r%   r%   r&   r     s    )valuer   c                 C   s   t  s
dS | dkrdS dS )a  Check if the value is Debian's APT-controlled dist-packages.

    Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the
    default package path controlled by APT, but does not patch ``sysconfig`` to
    do the same. This is similar to the bug worked around in ``get_scheme()``,
    but here the default is ``deb_system`` instead of ``unix_local``. Ultimately
    we can't do anything about this Debian bug, and this detection allows us to
    skip the warning when needed.
    Fz/usr/lib/python3/dist-packagesT)rC   )r   r%   r%   r&   $_looks_like_deb_system_dist_packages  s
    
r   c                  C   sT   t  } tr| S ddlm} | }t|r0|S tt|t| ddrPt	  |S )z,Return the default pure-Python lib location.r   ry   r3   rn   )
r   r   r   r   rz   r   ro   r   r   rv   r   r%   r%   r&   r     s    c                  C   sT   t  } tr| S ddlm} | }t|r0|S tt|t| ddrPt	  |S )z0Return the default platform-shared lib location.r   ry   r+   rn   )
r   r   r   r   rz   r   ro   r   r   rv   r   r%   r%   r&   r     s    )v1v2r   c                 C   s   | |kr| gS | |gS )zDeduplicate values from a list.r%   )r   r   r%   r%   r&   _deduplicated  s    r   )rJ   r   c                 C   s(   t jdd dkrdS | dt  dkS )zAApple patches sysconfig to *always* look under */Library/Python*.N   darwinFz/Library/Python/z/site-packages)rL   platformr   )rJ   r%   r%   r&   _looks_like_apple_library  s    r   )rM   r   c                 C   s   t | \}}trt||S ddlm} || \}}t||}tdd |D rdtdddd |S tt	
|t	
|dd	tt	
|t	
|d
d	g}t|rt| d |S )z*Return the lib locations under ``prefix``.r   ry   c                 s   s   | ]}t |V  qd S r8   )r   rY   r%   r%   r&   r<     s     z$get_prefixed_libs.<locals>.<genexpr>a&  Python distributed by Apple's Command Line Tools incorrectly patches sysconfig to always point to '/Library/Python'. This will cause build isolation to operate incorrectly on Python 3.10 or later. Please help report this to Apple so they can fix this. https://developer.apple.com/bug-reporting/Nr   zprefixed-purelibrn   zprefixed-platlib)rM   )r   r   r   r   r   rz   r?   r   ro   r   r   r   rv   )rM   new_purenew_platrz   old_pureold_platold_lib_pathswarnedr%   r%   r&   r     s6    


)FNNFN)E	functoolsloggingrI   r   rL   r#   typingr   r   r   r   r   r   pip._internal.models.schemer   r	   pip._internal.utils.compatr
   pip._internal.utils.deprecationr   pip._internal.utils.virtualenvr   r   r   baser   r   r   r   r   r   __all__	getLogger__name__rh   r"   r   str__annotations__r   r$   r!   r'   r   WARNINGrj   DEBUGr/   r6   	lru_cacher@   rC   rO   rU   r]   re   r   rm   ro   rv   r   r   r   r   r   r   r   r   r   r%   r%   r%   r&   <module>   s      











      5