<!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¡}|s>tdƒ‚| ¡ }t 	|¡ W 5 Q R X t
r†dD ] }t |d	d
¡ t |dd¡ qdda d S )Né   )ÚfinderÚ.é   r   zsysconfig.cfgzsysconfig.cfg exists)Úposix_prefixZ
posix_homeÚincludez{srcdir}/IncludeÚplatincludez{projectbase}/.T)Ú	_cfg_readZ	resourcesr   Ú__name__ÚrsplitÚfindÚAssertionErrorZ	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.   r9   ZsectionZoptionÚvaluer6   r   r4   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/   )r1   r   Úenvironr2   ©Ú
local_varsr   r   r6   ‹   s    


z_subst_vars.<locals>._replacer©r;   r<   )r   rC   r6   r   rB   r   Ú_subst_vars…   s    rE   c                 C   s0   |   ¡ }| ¡ D ]\}}||kr"q|| |< qd S r   )Úkeysr7   )Ztarget_dictZ
other_dictZtarget_keysÚkeyr>   r   r   r   Ú_extend_dict•   s
    rH   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   )
rH   r   r(   r7   r   r3   r   Ú
expanduserÚnormpathrE   )r,   ÚvarsÚresrG   r>   r   r   r   Ú_expand_vars   s    
rN   c                    s   ‡ fdd„}t  || ¡S )Nc                    s$   |   d¡}|ˆ krˆ | S |   d¡S r/   r0   r2   ©rL   r   r   r6   «   s    
zformat_value.<locals>._replacerrD   )r>   rL   r6   r   rO   r   Úformat_valueª   s    rP   c                   C   s   t jdkrdS t jS )NrI   r    )r   r3   r   r   r   r   Ú_get_default_scheme³   s    
rQ   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   rJ   r   )Úargsr   r   r   Újoinuser½   s    z_getuserbase.<locals>.joinuserr   ÚAPPDATAú~ÚPythonÚdarwinZPYTHONFRAMEWORKÚLibraryz%d.%dr   z.local)r   rA   Úgetr3   ÚsysÚplatformr   Úversion_info)Úenv_baserT   Ú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Úmatchr1   ÚreplaceÚintÚ
ValueErrorÚlistrF   Úlenr8   ÚsearchÚstrr   rA   ÚendÚstartÚremover7   Ú
isinstanceÚupdate)ÚfilenamerL   Z_variable_rxZ_findvar1_rxZ_findvar2_rxZdoneZnotdoneÚfÚlinesÚlineÚmÚnÚvZtmpvr5   Zrenamed_variablesr3   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   Úhasattrr[   Ú_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   rl   r   r)   )rL   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   r[   Ú
executablerO   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   )ri   rj   Úreadlinerp   r1   rr   rs   )ÚfprL   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   r3   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.)r8   Úsortedr(   r9   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-   rN   r:   r(   r7   )r,   rL   Ú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
   )r3   r,   rL   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ˆ   re   )r   Zos2rI   z2.6ÚuserbaseÚsrcdirrX   r   é   )rh   Z
BASECFLAGSrg   Z	PY_CFLAGSr   z-arch\s+\w+\sú z-isysroot [^ 	]*Z	ARCHFLAGSrg   z-isysroot\s+(\S+)r   z-isysroot\s+\S+(\s|$))#Ú_CONFIG_VARSÚ_PREFIXÚ_EXEC_PREFIXÚ_PY_VERSIONr‹   r   r[   rˆ   ÚAttributeErrorr   r3   r•   r‘   Úversionr`   r   r)   Úgetcwdr   r   Úisabsr   rK   r\   Úunamerr   Úsplitri   r<   rA   rZ   rv   r1   ÚexistsÚappend)rS   r_   Úcwdr   Zkernel_versionZmajor_versionrG   ÚflagsZarchrg   r   ZsdkZvalsr3   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   rZ   )r3   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-ia64rI   r¨   ú/re   rŸ   Ú_ú-Né   Zlinuxz%s-%sZsunosr   Ú5Zsolarisz%d.%sr@   r   é   ZirixZaixz%s-%s.%sé   Úcygwinz[\d.]+rX   ZMACOSX_DEPLOYMENT_TARGETz0/System/Library/CoreServices/SystemVersion.plistz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>r   r   Zmacosxz10.4.z-archrg   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   r3   r[   r¥   r&   r\   ru   ÚlowerrŠ   r¨   rq   rr   ri   rj   rp   r1   r   rZ   rl   rŽ   Úcloserv   Úreadr   r©   ro   Úfindallr8   r˜   r*   rs   Ú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˜   r7   Úprint)ÚtitleÚdataÚindexrG   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   rQ   rÊ   r
   r   r   r   r   r   Ú_main  s    rË   Ú__main__)N)N)AÚ__doc__rk   r   ri   r[   Zos.pathr   r   ZconfigparserÚImportErrorZConfigParserÚ__all__r   r”   r   r“   r   r¦   r3   r¼   r   r   r)   r#   r-   ZRawConfigParserr(   rj   r;   r?   r¥   r©   r£   r‹   r’   rK   rš   r¡   r›   r¢   r    Z
_USER_BASErE   rH   rN   rP   rQ   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
 	 #
