File: //usr/lib/python3/dist-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-310.pyc
o
    �_�a�V  �                   @   s�  d Z ddlZddlZddlZddlZddlmZ dejv Zej	�
ej�Zej	�
ej
�Zej	�
ej�Zej	�
ej�Zdejv rHej	�ejd �ZnejrWej	�ej	�ej��Zne�� Zdd� Zeed	d�Zejd
krvdd� Zee�Zee�Zd
d� Ze� ZdZ zes�ej!Z W n	 e"y�   Y nw dd� Z#d1dd�Z$dd� Z%d2dd�Z&dd� Z'dd� Z(dZ)dd� Z*d3dd �Z+e�,d!�Z-e�,d"�Z.e�,d#�Z/d3d$d%�Z0d&d'� Z1da2d(Z3d)d*� Z4d+d,� Z5d-d.� Z6d/d0� Z7dS )4a�  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�   )�DistutilsPlatformError�__pypy__�_PYTHON_PROJECT_BASEc                 C   s,   dD ]}t j�t j�| d|��r dS qdS )N)�SetupzSetup.local�ModulesTF)�os�path�isfile�join)�d�fn� r   �A/usr/lib/python3/dist-packages/setuptools/_distutils/sysconfig.py�_is_python_source_dir,   s
   �r   �_home�ntc                 C   s0   | rt j�| ��t j�t j�td���rtS | S )N�PCbuild)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 p	t}tjdkrItrtjdk rtj�|d�S t	r4| r%t
p$tS tj�td�d�}tj�
|�S tr8dnd}|t�  t }tj�|d|�S tjd	krit	rbtj�|d�tjj tj�|d
� S tj�|d�S tdtj ��)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�posix��   �   �include�srcdir�Include�pypy�pythonr   �PCzFI don't know where Python installs its C header files on platform '%s')�BASE_EXEC_PREFIX�BASE_PREFIXr   �name�IS_PYPYr   r   r	   r   �python_buildr   r   �get_config_var�normpathr    �build_flags�pathsepr   )�
plat_specific�prefix�incdir�implementation�
python_dirr   r   r   �get_python_incY   s0   
���r9   c                 C   s   | r|S t j�|d�S )N�
site-packages)r   r	   r   )�standard_lib�	libpython�early_prefixr5   r   r   r   �
_posix_lib�   s   r>