<!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
    ÀÒ.eTi  ã                   @   s¢  d Z ddlZddlZddlZddlZddlmZmZ zddlZW n e	k
r\   ddl
ZY nX dddddd	d
ddddgZdd„ Zejršej eejƒ¡Znee ¡ ƒZejdkrÖdedd…  ¡ krÖeej ee¡ƒZejdkrdedd…  ¡ kreej eee¡ƒZejdkrBdedd…  ¡ krBeej eee¡ƒZdd„ Zeƒ Zdadd„ Ze ¡ Ze d¡Zdd„ Zej ¡ d Z ejdd … Z!e d e d!  Z"ej #ej$¡Z%ej #ej&¡Z'da(dZ)d"d#„ Z*d$d%„ Z+d&d'„ Z,d(d)„ Z-d*d+„ Z.d,d-„ Z/dEd.d/„Z0d0d„ Z1d1d2„ Z2d3d4„ Z3dFd5d„Z4d6d„ Z5d7d„ Z6d8d	„ Z7e.ƒ dd9fd:d
„Z8e.ƒ dd9fd;d„Z9d<d„ Z:d=d„ Z;d>d„ Z<d?d„ Z=d@dA„ Z>dBdC„ Z?e@dDkrže?ƒ  dS )Gz-Access to Python's configuration information.é    N)ÚpardirÚrealpathÚget_config_h_filenameÚget_config_varÚget_config_varsÚget_makefile_filenameÚget_pathÚget_path_namesÚ	get_pathsÚget_platformÚget_python_versionÚget_scheme_namesÚparse_config_hc                 C   s(   z
t | ƒW S  tk
r"   |  Y S X d S ©N)r   ÚOSError)Úpath© r   úK/usr/lib/python3.8/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyÚ_safe_realpath"   s    
r   ÚntZpcbuildiøÿÿÿz\pc\viöÿÿÿz\pcbuild\amd64iòÿÿÿc                  C   s,   dD ]"} t j t j td| ¡¡r dS qdS )N)z
Setup.distzSetup.localZModulesTF)Úosr   ÚisfileÚjoinÚ_PROJECT_BASE)Úfnr   r   r   Úis_python_build:   s    r   Fc               	   C   s‚   t s~ddlm}  t dd¡d }| |ƒ}| d¡}| ¡ }t |¡ W 5 Q R X t	rzdD ] }t 
|dd	¡ t 
|d
d¡ qXda d S )Né   )ÚfinderÚ.é   r   zsysconfig.cfg)Úposix_prefixZ
posix_homeÚincludez{srcdir}/IncludeÚplatincludez{projectbase}/.T)Ú	_cfg_readZ	resourcesr   Ú__name__ÚrsplitÚfindZ	as_streamÚ_SCHEMESZreadfpÚ_PYTHON_BUILDÚset)r   Zbackport_packageZ_finderZ_cfgfileÚsÚschemer   r   r   Ú_ensure_cfg_readD   s    

r,   z\{([^{]*?)\}c              
      sÈ   t ƒ  |  d¡r|  d¡}ntƒ }|  ¡ }|D ]8}|dkr<q.|D ]$\}}|  ||¡rVq@|  |||¡ q@q.|  d¡ |  ¡ D ]H}t|  |¡ƒ‰ ‡ fdd„}|  |¡D ]\}}|  ||t	 
||¡¡ q¢qzd S )NÚglobalsc                    s$   |   d¡}|ˆ krˆ | S |   d¡S ©Nr   r   ©Úgroup©ZmatchobjÚname©Ú	variablesr   r   Ú	_replacero   s    
z"_expand_globals.<locals>._replacer)r,   Zhas_sectionÚitemsÚtupleÚsectionsZ
has_optionr)   Zremove_sectionÚdictÚ	_VAR_REPLÚsub)Úconfigr-   r8   ZsectionZoptionÚvaluer5   r   r3   r   Ú_expand_globalsY   s$    

r>   é   r   c                    s   ‡ fdd„}t  || ¡S )z»In the string `path`, replace tokens like {some.thing} with the
    corresponding value from the map `local_vars`.

    If there is no corresponding value, leave the token unchanged.
    c                    s8   |   d¡}|ˆ krˆ | S |tjkr.tj| S |   d¡S r.   )r0   r   Úenvironr1   ©Ú
local_varsr   r   r5   ‹   s    


z_subst_vars.<locals>._replacer©r:   r;   )r   rB   r5   r   rA   r   Ú_subst_vars…   s    rD   c                 C   s0   |   ¡ }| ¡ D ]\}}||kr"q|| |< qd S r   )Úkeysr6   )Ztarget_dictZ
other_dictZtarget_keysÚkeyr=   r   r   r   Ú_extend_dict•   s
    rG   c                 C   s`   i }|d kri }t |tƒ ƒ t | ¡D ]4\}}tjdkrDtj |¡}tj t	||ƒ¡||< q&|S )N)Úposixr   )
rG   r   r'   r6   r   r2   r   Ú
expanduserÚnormpathrD   )r+   ÚvarsÚresrF   r=   r   r   r   Ú_expand_vars   s    
rM   c                    s   ‡ fdd„}t  || ¡S )Nc                    s$   |   d¡}|ˆ krˆ | S |   d¡S r.   r/   r1   ©rK   r   r   r5   «   s    
zformat_value.<locals>._replacerrC   )r=   rK   r5   r   rN   r   Úformat_valueª   s    rO   c                   C   s   t jdkrdS t jS )NrH   r    )r   r2   r   r   r   r   Ú_get_default_scheme³   s    
rP   c                  C   s’   t j dd ¡} dd„ }t jdkrBt j d¡p.d}| r8| S ||dƒS tjdkr|td	ƒ}|r|| r`| S |dd
|dtjd d…  ƒS | r„| S |ddƒS d S )NÚPYTHONUSERBASEc                  W   s   t j t jj| Ž ¡S r   )r   r   rI   r   )Úargsr   r   r   Újoinuser½   s    z_getuserbase.<locals>.joinuserr   ÚAPPDATAú~ÚPythonÚdarwinZPYTHONFRAMEWORKÚLibraryz%d.%dr   z.local)r   r@   Úgetr2   ÚsysÚplatformr   Úversion_info)Úenv_baserS   ÚbaseZ	frameworkr   r   r   Ú_getuserbaseº   s$    



ÿr_   c              	   C   s  t  d¡}t  d¡}t  d¡}|dkr*i }i }i }tj| ddd}| ¡ }W 5 Q R X |D ]š}	|	 d¡sZ|	 ¡ d	krvqZ| |	¡}
|
rZ|
 d
d¡\}}| ¡ }| 	dd	¡}d|krº|||< qZzt
|ƒ}W n$ tk
rê   | 	dd¡||< Y qZX |||< qZt| ¡ ƒ}d}t|ƒdkrÔt|ƒD ]°}|| }| |¡p>| |¡}
|
dk	rº|
 d
¡}d}||krpt|| ƒ}nˆ||kr€d}nx|tjkr˜tj| }n`||krì| d¡rÆ|dd… |krÆd	}n$d| |krÚd}nt|d|  ƒ}nd	 ||< }|rÌ||
 ¡ d… }|d|
 ¡ … | | }d|kr:|||< n~zt
|ƒ}W n" tk
rh   | ¡ ||< Y n
X |||< | |¡ | d¡rÌ|dd… |krÌ|dd… }||krÌ|||< n|||< | |¡ qq| ¡ D ]"\}}t|tƒrÜ| ¡ ||< qÜ| |¡ |S )zÌParse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    z"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}Nzutf-8Úsurrogateescape)ÚencodingÚerrorsú#Ú r   r   z$$ú$)ÚCFLAGSÚLDFLAGSZCPPFLAGSr   TFZPY_r?   )ÚreÚcompileÚcodecsÚopenÚ	readlinesÚ
startswithÚstripÚmatchr0   ÚreplaceÚintÚ
ValueErrorÚlistrE   Úlenr7   ÚsearchÚstrr   r@   ÚendÚstartÚremover6   Ú
isinstanceÚupdate)ÚfilenamerK   Z_variable_rxZ_findvar1_rxZ_findvar2_rxZdoneZnotdoneÚfÚlinesÚlineÚmÚnÚvZtmpvr4   Zrenamed_variablesr2   r=   ÚfoundÚitemZafterÚkr   r   r   Ú_parse_makefile×   s    	










ÿ


ÿ


r†   c                  C   sD   t rtj td¡S ttdƒr,dttjf } nd} tj t	dƒ| d¡S )z Return the path of the Makefile.ZMakefileÚabiflagszconfig-%s%sr<   Ústdlib)
r(   r   r   r   r   ÚhasattrrZ   Ú_PY_VERSION_SHORTr‡   r   )Zconfig_dir_namer   r   r   r   M  s    
c              
   C   sè   t ƒ }zt|| ƒ W nJ tk
r^ } z,d| }t|dƒrF|d|j  }t|ƒ‚W 5 d}~X Y nX tƒ }z"t|ƒ}t|| ƒ W 5 Q R X W nJ tk
rÒ } z,d| }t|dƒrº|d|j  }t|ƒ‚W 5 d}~X Y nX trä| d | d< dS )z7Initialize the module as appropriate for POSIX systems.z.invalid Python installation: unable to open %sÚstrerrorz (%s)NÚ	BLDSHAREDZLDSHARED)	r   r†   ÚIOErrorr‰   r‹   r   rk   r   r(   )rK   ZmakefileÚeÚmsgZconfig_hr}   r   r   r   Ú_init_posixX  s&    


r   c                 C   sV   t dƒ| d< t dƒ| d< t dƒ| d< d| d< d	| d
< t| d< tj ttjƒ¡| d< dS )z+Initialize the module as appropriate for NTrˆ   ZLIBDESTZ
platstdlibZ
BINLIBDESTr!   Z	INCLUDEPYz.pydZSOz.exeZEXEZVERSIONZBINDIRN)r   Ú_PY_VERSION_SHORT_NO_DOTr   r   Údirnamer   rZ   Ú
executablerN   r   r   r   Ú_init_non_posixt  s    r”   c                 C   sš   |dkri }t  d¡}t  d¡}|  ¡ }|s.q–| |¡}|rx| dd¡\}}zt|ƒ}W n tk
rl   Y nX |||< q | |¡}|r d|| d¡< q |S )zÌParse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    Nz"#define ([A-Z][A-Za-z0-9_]+) (.*)
z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
r   r   r   )rh   ri   Úreadlinero   r0   rq   rr   )ÚfprK   Z	define_rxZundef_rxr   r€   r   r‚   r   r   r   r   „  s&    




c                  C   s:   t r$tjdkrtj td¡} q,t} ntdƒ} tj | d¡S )zReturn the path of pyconfig.h.r   ZPCr"   z
pyconfig.h)r(   r   r2   r   r   r   r   )Zinc_dirr   r   r   r   £  s    
c                   C   s   t tt ¡ ƒƒS )z,Return a tuple containing the schemes names.)r7   Úsortedr'   r8   r   r   r   r   r   ¯  s    c                   C   s
   t  d¡S )z*Return a tuple containing the paths names.r    )r'   Zoptionsr   r   r   r   r	   ´  s    Tc                 C   s&   t ƒ  |rt| |ƒS tt | ¡ƒS dS )z°Return a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    N)r,   rM   r9   r'   r6   )r+   rK   Úexpandr   r   r   r
   º  s    
c                 C   s   t |||ƒ|  S )z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
   )r2   r+   rK   r˜   r   r   r   r   Ç  s    c                  G   s¬  t dkrzi a tt d< tt d< tt d< tt d< td td  t d< tt d	< tt d
< tt d< ztjt d< W n tk
r„   dt d< Y nX t	j
dkr˜tt ƒ t	j
dkrªtt ƒ tjdkr¾tƒ t d< dt krÐtt d< ntt d ƒt d< tr\t	j
dkr\t}zt	 ¡ }W n tk
r   d}Y nX t	j t d ¡s\||kr\t	j |t d ¡}t	j |¡t d< tjdkrzt	 ¡ d }t| d¡d ƒ}|dk rÊdD ]2}t | }t dd|¡}t dd|¡}|t |< q”n°dt	jkrt	jd }dD ]0}t | }t dd|¡}|d | }|t |< qät  dd¡}	t d|	¡}
|
dk	rz|
  d¡}t	j !|¡szdD ]$}t | }t dd|¡}|t |< qT| r¤g }| D ]}| "t  |¡¡ qˆ|S t S dS )ay  With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    NÚprefixÚexec_prefixZ
py_versionZpy_version_shortr   r   Zpy_version_nodotr^   ZplatbaseZprojectbaser‡   rd   )r   Zos2rH   z2.6ÚuserbaseÚsrcdirrW   r   é   )rg   Z
BASECFLAGSrf   Z	PY_CFLAGSrŒ   z-arch\s+\w+\sú z-isysroot [^ 	]*Z	ARCHFLAGSrf   z-isysroot\s+(\S+)r   z-isysroot\s+\S+(\s|$))#Ú_CONFIG_VARSÚ_PREFIXÚ_EXEC_PREFIXÚ_PY_VERSIONrŠ   r   rZ   r‡   ÚAttributeErrorr   r2   r”   r   Úversionr_   r   r(   Úgetcwdr   r   Úisabsr   rJ   r[   Úunamerq   Úsplitrh   r;   r@   rY   ru   r0   ÚexistsÚappend)rR   r^   Úcwdrœ   Zkernel_versionZmajor_versionrF   ÚflagsZarchrf   r€   ZsdkZvalsr2   r   r   r   r   Ï  s‚    






ÿ



c                 C   s   t ƒ  | ¡S )z“Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    )r   rY   )r2   r   r   r   r   R  s    c                  C   s^  t jdkrnd} tj | ¡}|dkr(tjS tj d|¡}tj|t| ƒ |…  ¡ }|dkr\dS |dkrhdS tjS t jd	ks‚tt d
ƒsˆtjS t  	¡ \}}}}}| ¡  
dd¡}| 
dd¡}| 
dd¡}|dd… dkrÞd||f S |dd… dkr&|d dkrPd}dt|d ƒd |dd… f }n*|dd… dkrDd||f S |dd… dkrdd|||f S |dd… d kr d }t d!¡}	|	 |¡}
|
rP|
 ¡ }n°|dd… d"krPtƒ }| d#¡}|}ztd$ƒ}W n tk
rè   Y nJX zt d%| ¡ ¡}
W 5 | ¡  X |
dk	r2d& |
 d'¡ d&¡dd… ¡}|s<|}|rP|}d(}|d& d)krd*tƒ  d+d¡ ¡ krd,}tƒ  d+¡}t d-|¡}ttt|ƒƒƒ}t|ƒd'kr´|d }n^|d.krÄd,}nN|d/krÔd0}n>|d1kräd2}n.|d3krôd4}n|d5krd6}ntd7|f ƒ‚n<|d8kr0tjd9krPd:}n |d;krPtjd9krLd<}nd=}d>|||f S )?a«  Return a string that identifies the current platform.

    This is used mainly to distinguish platform-specific build directories and
    platform-specific built distributions.  Typically includes the OS name
    and version and the architecture (as supplied by 'os.uname()'),
    although the exact information included depends on the OS; eg. for IRIX
    the architecture isn't particularly important (IRIX only runs on SGI
    hardware), but for Linux the kernel version isn't particularly
    important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u
       irix-5.3
       irix64-6.2

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win-ia64 (64bit Windows on Itanium)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.
    r   z bit (éÿÿÿÿú)Zamd64z	win-amd64Zitaniumzwin-ia64rH   r§   ú/rd   rž   Ú_ú-Né   Zlinuxz%s-%sZsunosr   Ú5Zsolarisz%d.%sr?   r   é   ZirixZaixz%s-%s.%sé   Úcygwinz[\d.]+rW   ZMACOSX_DEPLOYMENT_TARGETz0/System/Library/CoreServices/SystemVersion.plistz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>r   r   Zmacosxz10.4.z-archrf   Zfatz-arch\s+(\S+))Úi386Úppc)r·   Úx86_64Zintel)r·   r¸   r¹   Zfat3)Úppc64r¹   Zfat64)r·   r¸   rº   r¹   Z	universalz%Don't know machine value for archs=%rr·   l        r¹   )ZPowerPCZPower_Macintoshrº   r¸   z%s-%s-%s) r   r2   rZ   r¤   r&   r[   rt   Úlowerr‰   r§   rp   rq   rh   ri   ro   r0   r   rY   rk   r   Úcloseru   Úreadr   r¨   rn   Úfindallr7   r—   r)   rr   Úmaxsize)r™   ÚiÚjZlookZosnameZhostÚreleaser¤   ÚmachineZrel_rer€   ZcfgvarsZmacverZ
macreleaser}   ZcflagsZarchsr   r   r   r   [  s¨    
$


ÿ

ÿ





ÿ

c                   C   s   t S r   )rŠ   r   r   r   r   r   ý  s    c                 C   sF   t t| ¡ ƒƒD ]0\}\}}|dkr0td|  ƒ td||f ƒ qd S )Nr   z%s: z
	%s = "%s")Ú	enumerater—   r6   Úprint)ÚtitleÚdataÚindexrF   r=   r   r   r   Ú_print_dict  s    rÉ   c                   C   sR   t dtƒ  ƒ t dtƒ  ƒ t dtƒ  ƒ t ƒ  tdtƒ ƒ t ƒ  tdtƒ ƒ dS )z*Display all information sysconfig detains.zPlatform: "%s"zPython version: "%s"z!Current installation scheme: "%s"ZPathsZ	VariablesN)rÅ   r   r   rP   rÉ   r
   r   r   r   r   r   Ú_main  s    rÊ   Ú__main__)N)N)AÚ__doc__rj   r   rh   rZ   Zos.pathr   r   ZconfigparserÚImportErrorZConfigParserÚ__all__r   r“   r   r’   r   r¥   r2   r»   r   r   r(   r#   r,   ZRawConfigParserr'   ri   r:   r>   r¤   r¨   r¢   rŠ   r‘   rJ   r™   r    rš   r¡   rŸ   Z
_USER_BASErD   rG   rM   rO   rP   r_   r†   r   r   r”   r   r   r   r	   r
   r   r   r   r   r   rÉ   rÊ   r$   r   r   r   r   Ú<module>   sŽ   õ""
#	
v
 	 #
