Current File : //lib/python3.9/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-39.pyc |
a
��kheS � @ s� d Z ddlZddlZddlZddlZddlmZ dejv Zej �
ej�Zej �
ej
�Zej �
ej�Zej �
ej�Zdejv r�ej �ejd �Zn&ejr�ej �ej �ej��Zne�� Zdd� Zeed d�Zejd
kr�dd� Zee�Zee�Zd
d� Ze� ZdZ ze�sej!Z W n e"�y" Y n0 dd� Z#d-dd�Z$d.dd�Z%dd� Z&dd� Z'dd� Z(d/dd�Z)e�*d�Z+e�*d�Z,e�*d �Z-d0d!d"�Z.d#d$� Z/da0d%d&� Z1d'd(� Z2d)d*� Z3d+d,� Z4dS )1a� 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� )�DistutilsPlatformErrorZ__pypy__Z_PYTHON_PROJECT_BASEc C s, dD ]"}t j�t j�| d|��r dS qdS )N)ZSetupzSetup.localZModulesTF)�os�path�isfile�join)�d�fn� r
�C/usr/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py�_is_python_source_dir, s r �_home�ntc C s0 | r,t j�| ��t j�t j�td���r,tS | S )NZPCbuild)r r �normcase�
startswithr �PREFIX)r r
r
r �_fix_pcbuild5 s
�r c C s t rtt �S tt�S )N)� _sys_homer �project_baser
r
r
r �
_python_build= s r � c C s dt jdd� S )z�Return a string containing the major and minor Python version,
leaving off the patchlevel. Sample return values could be '1.5'
or '2.2'.
z%d.%dN� )�sys�version_infor
r
r
r �get_python_versionQ s r c C s� |du r| rt pt}tr&tj�|d�S tjdkr|tr^| r@tp>t S tj�t
d�d�}tj�|�S dt� t
}tj�|d|�S tjdkr�tr�tj�|d�tjj tj�|d� S tj�|d�S td tj ��dS )
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'.
NZinclude�posix�srcdirZInclude�pythonr �PCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIX�IS_PYPYr r r �name�python_buildr r �get_config_var�normpathr �build_flags�pathsepr )�
plat_specific�prefixZincdirZ
python_dirr
r
r �get_python_incY s.
���r* c C s� t r8|du rt}|r*tj�|dtjd �S tj�|d�S |du r^|rR| rLtpNt}n| rZt p\t}tj
dkr�| sp|r~ttdd�}nd}tj�||dt� �}|r�|S tj�|d�S n<tj
d kr�|r�tj�|d
�S tj�|d
d�S nt
dtj
��dS )aS Return 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'.
Nz
lib-pythonr z
site-packagesr �
platlibdir�libr r ZLibz?I don't know where Python installs its library on platform '%s')r! r r r r r �versionr r �EXEC_PREFIXr"