Your IP : 3.145.88.104


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-1.pyc

o

6��f1�@sFdZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZm
ZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'e%�Z(ej)dkr^ddl
m*Z*ej+d	e,d
d�ddd
�Zee"dd�Z-eee(�Zeee(�Z.ddd�Z/dZ0zes�ej1Z0Wn	e2y�Ynwdd�Z3ddd�Z4ddd�Z5dS)a�Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
�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|�}|rb|�dd�\}}	|	��}	|	�d	d
�}
d|
vrF|	||<nzt	|	�}	Wnt
y]|	�d	d�||<Ynw|	||<qd}|�r4t|�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�|
||<qlzt	|
�}
Wnt
�y|
��||<Ynw|
||<||=|�d��r-|dd�|v�r-|dd�}||v�r-|
||<ql||=ql|sh|��|��D]\}}	t|	t��rL|	��||<�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.
    r)�TextFiler�surrogateescape)Zstrip_commentsZskip_blanksZ
join_lines�errorsNTrz$$��$)�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<tddd	d
ddd
d�\}}}}}}}}	dtj	vrTtj	d}
tjdkrRdtj	vrR|�
|�rR|
|t|�d�}|
}dtj	vr^tj	d}dtj	vrhtj	d}dtj	vrstj	d}n|d}dtj	vr�|dtj	d}d	tj	vr�|dtj	d	}|dtj	d	}dtj	vr�|dtj	d}|dtj	d}|dtj	d}d
tj	vr�tj	d
}dtj	vr�|dtj	d}n|d|	}|d|}
|j||
|
d|||||d�||_
dSdS)z�Do any platform-specific customization of a CCompiler instance.

    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
    Zunix�darwinZCUSTOMIZED_OSX_COMPILERrN�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�sf


	

��



�











�
	�rVcCs�|dur
|rtp	t}tjdkr5tr&|rtptStj�t	d�d�}tj�
|�Sdt�t}tj�|d|�StjdkrUtrNtj�|d�tjj
tj�|d�Stj�|d�Std	tj��)
a�Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    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
|r
tpt}n|rtpt}tjdkr8|s|r tj}nd}tj�	||dt
��}|r1|Stj�	|d�StjdkrN|rFtj�	|d�Stj�	|dd�Stdtj��)	aSReturn the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.base_prefix or
    sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
    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_lib5s.

�
��rk)N)rN)rrN)6�__doc__�_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(

?>