JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/__pycache__/sysconfig.cpython-39.pyc

a

[��f�h�@s�dZddlZddlZddlZddlZddlmZmZzddlZWne	yZddl
ZYn0gd�Zdd�Zej
r�ej�eej
��Znee���Zejdkr�ded	d���vr�eej�ee��Zejdkr�d
edd���vr�eej�eee��Zejdk�r*ded
d���v�r*eej�eee��Zdd�Ze�Zdadd�Ze��Ze�d�Zdd�Zdejdd�Zdejdd�Z dejdd�Z!ej�"ej#�Z$ej�"ej%�Z&da'dZ(dd�Z)dd�Z*dd �Z+d!d"�Z,d#d$�Z-d%d&�Z.dId'd(�Z/d)d*�Z0d+d,�Z1d-d.�Z2dJd/d0�Z3d1d2�Z4d3d4�Z5d5d6�Z6e-�dd7fd8d9�Z7e-�dd7fd:d;�Z8d<d=�Z9d>d?�Z:d@dA�Z;dBdC�Z<dDdE�Z=dFdG�Z>e?dHk�r�e>�dS)Kz-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_hcCs&z
t|�WSty |YS0dS�N)r�OSError)�path�r�K/usr/lib/python3.9/site-packages/pip/_vendor/distlib/_backport/sysconfig.py�_safe_realpath"s
r�ntZpcbuildi����z\pc\vi����z\pcbuild\amd64i�cCs,dD]"}tj�tj�td|��rdSqdS)N)z
Setup.distzSetup.localZModulesTF)�osr�isfile�join�
_PROJECT_BASE)�fnrrr�is_python_build:srFcCs�ts�ddlm}t�dd�d}||�}|�d�}|s>Jd��|���}t�|�Wd�n1sf0Yt	r�dD] }t�
|d	d
�t�
|dd�qxd
adS)N�)�finder�.�rz
sysconfig.cfgzsysconfig.cfg exists)�posix_prefixZ
posix_home�includez{srcdir}/Include�platincludez{projectbase}/.T)�	_cfg_readZ	resourcesr�__name__�rsplit�findZ	as_stream�_SCHEMESZreadfp�
_PYTHON_BUILD�set)rZbackport_packageZ_finderZ_cfgfile�s�schemerrr�_ensure_cfg_readDs

(r,z\{([^{]*?)\}c
s�t�|�d�r|�d�}nt�}|��}|D]8}|dkr<q.|D]$\}}|�||�rVq@|�|||�q@q.|�d�|��D]H}t|�|����fdd�}|�|�D]\}}|�||t	�
||��q�qzdS)N�globalscs$|�d�}|�vr�|S|�d�S�Nrr��group�Zmatchobj�name��	variablesrr�	_replaceros
z"_expand_globals.<locals>._replacer)r,Zhas_section�items�tuple�sectionsZ
has_optionr)Zremove_section�dict�	_VAR_REPL�sub)�configr-r8�section�option�valuer5rr3r�_expand_globalsYs$

r@z%s.%s.%s�z%s.%srz%s%scs�fdd�}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.
    cs8|�d�}|�vr�|S|tjvr.tj|S|�d�Sr.)r0r�environr1��
local_varsrrr5�s


z_subst_vars.<locals>._replacer�r:r;)rrDr5rrCr�_subst_vars�srFcCs0|��}|��D]\}}||vr"q|||<qdSr)�keysr6)Ztarget_dictZ
other_dictZtarget_keys�keyr?rrr�_extend_dict�s
rIcCs`i}|duri}t|t��t�|�D]4\}}tjdvrDtj�|�}tj�t	||��||<q&|S)N)�posixr)
rIrr'r6rr2r�
expanduser�normpathrF)r+�vars�resrHr?rrr�_expand_vars�s
rOcs�fdd�}t�||�S)Ncs$|�d�}|�vr�|S|�d�Sr.r/r1�rMrrr5�s
zformat_value.<locals>._replacerrE)r?rMr5rrPr�format_value�srQcCstjdkrdStjS)NrJr )rr2rrrr�_get_default_scheme�s
rRcCs�tj�dd�}dd�}tjdkrBtj�d�p.d}|r8|S||d�Stjdkr|td	�}|r||r`|S|dd
|dtjdd��S|r�|S|dd
�SdS)N�PYTHONUSERBASEcWstj�tjj|��Sr)rrrKr)�argsrrr�joinuser�sz_getuserbase.<locals>.joinuserr�APPDATA�~�Python�darwinZPYTHONFRAMEWORK�Libraryz%d.%drz.local)rrB�getr2�sys�platformr�version_info)�env_baserU�baseZ	frameworkrrr�_getuserbase�s$



�rac	Cst�d�}t�d�}t�d�}|dur*i}i}i}tj|ddd��}|��}Wd�n1s`0Y|D]�}	|	�d�sn|	��d	kr�qn|�|	�}
|
rn|
�d
d�\}}|��}|�	dd	�}
d
|
vr�|||<qnzt
|�}Wn"ty�|�	dd
�||<Yqn0|||<qnt|�
��}d}t|�dk�r�t|�D�]�}||}|�|��pP|�|�}
|
du�r�|
�d
�}d}||v�r�t||�}n�||v�r�d}nx|tjv�r�tj|}n`||v�r�|�d��r�|dd�|v�r�d	}n$d||v�r�d}nt|d|�}nd	||<}|�r�||
��d�}|d|
���||}d
|v�rL|||<n|zt
|�}Wn t�yx|��||<Yn
0|||<|�|�|�d��r�|dd�|v�r�|dd�}||v�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_]*)}Nzutf-8�surrogateescape)�encoding�errors�#�rrz$$�$)�CFLAGS�LDFLAGSZCPPFLAGSrTFZPY_rA)�re�compile�codecs�open�	readlines�
startswith�strip�matchr0�replace�int�
ValueError�listrG�lenr7�search�strrrB�end�start�remover6�
isinstance�update)�filenamerMZ_variable_rxZ_findvar1_rxZ_findvar2_rxZdoneZnotdone�f�lines�line�m�n�vZtmpvr4Zrenamed_variablesr2r?�found�itemZafter�krrr�_parse_makefile�s�	


&







�


�


r�cCsDtrtj�td�Sttd�r,dttjf}nd}tj�t	d�|d�S)z Return the path of the Makefile.ZMakefile�abiflagszconfig-%s%sr<�stdlib)
r(rrrr�hasattrr\�_PY_VERSION_SHORTr�r)Zconfig_dir_namerrrrKs
rc
Cst�}zt||�WnLty`}z4d|}t|d�rD|d|j}t|��WYd}~n
d}~00t�}z6t|��}t||�Wd�n1s�0YWnLty�}z4d|}t|d�r�|d|j}t|��WYd}~n
d}~00tr�|d|d<dS)z7Initialize the module as appropriate for POSIX systems.z.invalid Python installation: unable to open %s�strerrorz (%s)N�	BLDSHAREDZLDSHARED)	rr��IOErrorr�r�rrmrr()rMZmakefile�e�msgZconfig_hrrrr�_init_posixVs&

,
r�cCsVtd�|d<td�|d<td�|d<d|d<d	|d
<t|d<tj�ttj��|d<d
S)z+Initialize the module as appropriate for NTr�ZLIBDESTZ
platstdlibZ
BINLIBDESTr!Z	INCLUDEPYz.pydZSOz.exeZEXEZVERSIONZBINDIRN)r�_PY_VERSION_SHORT_NO_DOTrr�dirnamerr\�
executablerPrrr�_init_non_posixrsr�cCs�|duri}t�d�}t�d�}|��}|s.q�|�|�}|rv|�dd�\}}zt|�}WntyjYn0|||<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_]+) [*]/
rrr)rjrk�readlinerqr0rsrt)�fprMZ	define_rxZundef_rxr�r�r�r�rrrr�s&




rcCs:tr$tjdkrtj�td�}q,t}ntd�}tj�|d�S)zReturn the path of pyconfig.h.rZPCr"z
pyconfig.h)r(rr2rrrr)Zinc_dirrrrr�s
rcCsttt����S)z,Return a tuple containing the schemes names.)r7�sortedr'r8rrrrr
�sr
cCs
t�d�S)z*Return a tuple containing the paths names.r )r'�optionsrrrrr	�sr	TcCs&t�|rt||�Stt�|��SdS)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,rOr9r'r6)r+rM�expandrrrr
�s
r
cCst|||�|S)z[Return a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    )r
)r2r+rMr�rrrr�srcGs�tdu�rviattd<ttd<ttd<ttd<tdtdtd<ttd	<ttd
<ttd<ztjtd<Wnty�d
td<Yn0t	j
dvr�tt�t	j
dkr�tt�tj
dkr�t�td<dtvr�ttd<nttd�td<t�rXt	j
dk�rXt}zt	��}Wnt�yd}Yn0t	j�td��sX||k�rXt	j�|td�}t	j�|�td<tjdk�rvt	��d}t|�d�d�}|dk�r�dD]2}t|}t�dd|�}t�dd|�}|t|<�q�n�dt	jv�rt	jd}dD]0}t|}t�dd|�}|d|}|t|<�q�t�dd
�}	t�d|	�}
|
du�rv|
� d�}t	j�!|��svdD]$}t|}t�dd|�}|t|<�qP|�r�g}|D]}
|�"t�|
���q�|StSdS)ayWith 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_versionZpy_version_shortrrZpy_version_nodotr`ZplatbaseZprojectbaser�rf)rZos2rJz2.6�userbase�srcdirrYr�)riZ
BASECFLAGSrhZ	PY_CFLAGSr�z
-arch\s+\w+\s� z-isysroot [^ 	]*Z	ARCHFLAGSrhz-isysroot\s+(\S+)rz-isysroot\s+\S+(\s|$))#�_CONFIG_VARS�_PREFIX�_EXEC_PREFIX�_PY_VERSIONr�rr\r��AttributeErrorrr2r�r��versionrarr(�getcwdrr�isabsrrLr]�unamers�splitrjr;rBr[rwr0�exists�append)rTr`�cwdr�Zkernel_version�
major_versionrH�flagsZarchrhr�ZsdkZvalsr2rrrr�s�






�



rcCs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)
    )rr[)r2rrrrPsrcCsdtjdkrnd}tj�|�}|dkr(tjStj�d|�}tj|t|�|���}|dkr\dS|dkrhdStjStjd	ks�ttd
�s�tjSt�	�\}}}}}|���
dd�}|�
d
d�}|�
dd�}|dd�dkr�d||fS|dd�dk�r&|ddk�rVd}dt|d�d|dd�f}�n0|dd�dk�rDd||fS|dd�dk�rdd|||fS|dd�d k�r�d }t�
d!�}	|	�|�}
|
�rV|
��}�n�|dd�d"k�rVt�}|�d#�}|}
ztd$�}Wnt�y�YnR0zt�d%|���}
W|��n
|��0|
du�r8d&�|
�d'��d&�dd��}
|�sB|
}|�rV|}d(}|
d&d)k�rd*t��d+d���v�rd,}t��d+�}t�d-|�}ttt|���}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}ntd7|f��n<|d8k�r6tjd9k�rVd:}n |d;v�rVtjd9k�rRd<}nd=}d>|||fS)?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'.
    rz bit (����)Zamd64z	win-amd64Zitaniumzwin-ia64rJr��/rfr��_�-N�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%srAr�ZirixZaixz%s-%s.%s��cygwinz[\d.]+rYZMACOSX_DEPLOYMENT_TARGETz0/System/Library/CoreServices/SystemVersion.plistz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>rrZmacosxz10.4.z-archrhZfatz
-arch\s+(\S+))�i386�ppc)r��x86_64Zintel)r�r�r�Zfat3)�ppc64r�Zfat64)r�r�r�r��	universalz%Don't know machine value for archs=%rr�lr�)ZPowerPCZPower_Macintoshr�r�z%s-%s-%s) rr2r\r�r&r]rv�lowerr�r�rrrsrjrkrqr0rr[rmr�rw�read�closerr�rp�findallr7r�r)rt�maxsize)r��i�jZlookZosname�host�releaser��machineZrel_rer�ZcfgvarsZmacverZ
macreleaserZcflagsZarchsrrrrYs�
$


�
�





�

rcCstSr)r�rrrrr�srcCsFtt|����D]0\}\}}|dkr0td|�td||f�qdS)Nrz%s: z
	%s = "%s")�	enumerater�r6�print)�title�data�indexrHr?rrr�_print_dict�sr�cCsRtdt��tdt��tdt��t�tdt��t�tdt��dS)z*Display all information sysconfig detains.zPlatform: "%s"zPython version: "%s"z!Current installation scheme: "%s"ZPathsZ	VariablesN)r�rrrRr�r
rrrrr�_mainsr��__main__)N)N)@�__doc__rlrrjr\Zos.pathrrZconfigparser�ImportErrorZConfigParser�__all__rr�rr�rr�r2r�rrr(r#r,ZRawConfigParserr'rkr:r@r^r�r�r�rLr�r�r�r�r�Z
_USER_BASErFrIrOrQrRrar�rr�r�rrr
r	r
rrrrrr�r�r$rrrr�<module>sx"
!
	
v

	#

Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3aů&~$l}'NWUs$Uk^SV:U# 6w++s&r+nڐ{@29 gL u"TÙM=6(^"7r}=6YݾlCuhquympǦ GjhsǜNlɻ}o7#S6aw4!OSrD57%|?x>L |/nD6?/8w#[)L7+6〼T ATg!%5MmZ/c-{1_Je"|^$'O&ޱմTrb$w)R$& N1EtdU3Uȉ1pM"N*(DNyd96.(jQ)X 5cQɎMyW?Q*!R>6=7)Xj5`J]e8%t!+'!1Q5 !1 AQaqё#2"0BRb?Gt^## .llQT $v,,m㵜5ubV =sY+@d{N! dnO<.-B;_wJt6;QJd.Qc%p{ 1,sNDdFHI0ГoXшe黅XۢF:)[FGXƹ/w_cMeD,ʡcc.WDtA$j@:) -# u c1<@ۗ9F)KJ-hpP]_x[qBlbpʖw q"LFGdƶ*s+ډ_Zc"?%t[IP 6J]#=ɺVvvCGsGh1 >)6|ey?Lӣm,4GWUi`]uJVoVDG< SB6ϏQ@ TiUlyOU0kfV~~}SZ@*WUUi##; s/[=!7}"WN]'(L! ~y5g9T̅JkbM' +s:S +B)v@Mj e Cf jE 0Y\QnzG1д~Wo{T9?`Rmyhsy3!HAD]mc1~2LSu7xT;j$`}4->L#vzŏILS ֭T{rjGKC;bpU=-`BsK.SFw4Mq]ZdHS0)tLg