Your IP : 3.144.119.149


Current Path : /opt/alt/python310/lib64/python3.10/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/distutils/__pycache__/sysconfig.cpython-310.opt-2.pyc

o

6��f1�@sD	ddlZddlZddlZddlZddlZddlmZddlmZddl	m
ZmZ
mZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&e$�Z'ej(dkr]ddl	m)Z)ej*de+d	d
�ddd�Zee!d
d�Z,eee'�Zeee'�Z-ddd�Z.dZ/zes�ej0Z/Wn	e1y�Ynwdd�Z2ddd�Z3ddd�Z4dS)�N)�partial�)�DistutilsPlatformError)�_PREFIX�_BASE_PREFIX�_EXEC_PREFIX�_BASE_EXEC_PREFIX�
_PROJECT_BASE�
_PYTHON_BUILD�_init_posix�parse_config_h�_init_non_posix�_is_python_source_dir�	_sys_home�_variable_rx�_findvar1_rx�_findvar2_rx�expand_makefile_vars�is_python_build�get_config_h_filename�get_config_var�get_config_vars�get_makefile_filename�get_python_version�nt)�_fix_pcbuildzCThe distutils.sysconfig module is deprecated, use sysconfig instead�)�
stacklevelcCst||d�S)N)�vars)�sysconfig_parse_config_h)�fp�g�r"�:/opt/alt/python310/lib64/python3.10/distutils/sysconfig.pyrBsrT)Z
check_homec	Cs�	ddlm}||ddddd�}|duri}i}i}	|��}|dur$n@t�t|�}|rc|�dd�\}}	|	��}	|	�dd	�}
d
|
vrG|	||<nzt	|	�}	Wnt
y^|	�dd
�||<Ynw|	||<qd}|�r5t|�D]�}||}
t�t
|
�p~t�t|
�}|�r/|�d�}d}||vr�t||�}n>||vr�d}n7|tjvr�tj|}n,||vr�|�d
�r�|dd�|vr�d	}nd
||vr�d}nt|d
|�}nd	||<}|�r.|
|��d�}|
d|���||}
d
|vr�|
||<qmzt	|
�}
Wnt
�y|
��||<Ynw|
||<||=|�d
��r.|dd�|v�r.|dd�}||v�r.|
||<qm||=qm|si|��|��D]\}}	t|	t��rM|	��||<�q=|�|�|S)Nr)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsTrz$$��$)�CFLAGS�LDFLAGS�CPPFLAGSFZPY_�)Zdistutils.text_filer$�readline�re�matchr�group�strip�replace�int�
ValueError�list�searchrr�str�os�environ�
startswith�end�start�close�items�
isinstance�update)�fnr!r$r ZdoneZnotdone�line�m�n�vZtmpvZrenamed_variables�name�value�found�itemZafter�kr"r"r#�parse_makefileMs�
��


�
��2�
rKr'c	Cs�	|jdkr�tjdkrt�d�sddl}|�t�dtd<tdddd	d
ddd
�\}}}}}}}}	dtj	vrUtj	d}
tjdkrSd
tj	vrS|�
|�rS|
|t|�d�}|
}dtj	vr_tj	d}d
tj	vritj	d
}dtj	vrttj	d}n|d}dtj	vr�|dtj	d}dtj	vr�|dtj	d}|dtj	d}dtj	vr�|dtj	d}|dtj	d}|dtj	d}dtj	vr�tj	d}d
tj	vr�|dtj	d
}n|d|	}|d|}
|j||
|
d|||||d�||_
dSdS)NZunix�darwinZCUSTOMIZED_OSX_COMPILERr�TrueZCCZCXXr)ZCCSHAREDZLDSHAREDZSHLIB_SUFFIXZARZARFLAGSZCPPz -Er*� r+)Zpreprocessor�compilerZcompiler_soZcompiler_cxxZ	linker_soZ
linker_exe�archiver)Z
compiler_type�sys�platform�_config_vars�get�_osx_support�customize_compilerrr8r9r:�lenZset_executablesZshared_lib_extension)rOrUZccZcxxZcflagsZccsharedZldsharedZshlib_suffixZarZar_flagsZnewccZcpprPZcc_cmdr"r"r#rV�sh


	

��



�











�
	�rVcCs�	|dur|r	tp
t}tjdkr6tr'|rtptStj�t	d�d�}tj�
|�Sdt�t}tj�|d|�StjdkrVtrOtj�|d�tjj
tj�|d�Stj�|d�Stdtj��)	N�posixZsrcdirZInclude�pythonZincluderZPCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr8rF�python_buildr�project_base�path�joinr�normpathr�build_flags�pathsepr)�
plat_specific�prefixZincdirZ
python_dirr"r"r#�get_python_inc
s,


���recCs�	|dur|r|rtpt}n|rtpt}tjdkr9|s|r!tj}nd}tj�	||dt
��}|r2|Stj�	|d�StjdkrO|rGtj�	|d�Stj�	|dd�Stdtj��)NrX�librYz
site-packagesrZLibz?I don't know where Python installs its library on platform '%s')rZr[�EXEC_PREFIX�PREFIXr8rFrQ�
platlibdirr^r_rr)rcZstandard_librd�libdirZ	libpythonr"r"r#�get_python_lib5s0


�
��rk)N)rN)rrN)5�_impr8r.rQ�warnings�	functoolsrr&rZ	sysconfigrrhrr[rrgrrZr	r]r
r\rZsysconfig_init_posixrrr
rrrrrrrrrrrrrSrFr�warn�DeprecationWarningZ
_python_buildZ_init_ntrKra�abiflags�AttributeErrorrVrerkr"r"r"r#�<module>sB\
�



o��
G(

?>