File: //usr/local/lib/python3.10/dist-packages/setuptools/_distutils/__pycache__/util.cpython-310.pyc
o
��h�F � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlmZmZmZ ddlmZmZ ddlmZ ddlmZ dd lmZ dd
lmZmZ ddlmZ erpddlm Z m!Z! e d
�Z"d^dd�Z#d^dd�Z$ej%dkr�da&dZ'dd� Z(dd� Z)dd� Z*d_dd�Z+ed`d"d#��Z,dad'd(�Z-ej.dbd*d+��Z/dcd.d/�Z0d0d1� Z1ddded6d7�Z2d a3 a4a5d8d9� Z6dfd;d<�Z7 = =dgdhdFdG�Z8didIdJ�Z9 = K = djdkdUdV�Z:dldXdY�Z;dmdZd[�Z<d\d]� Z=dS )nzudistutils.util
Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
� )�annotationsN)�Callable�Iterable�Mapping)�
TYPE_CHECKING�AnyStr)� pass_none� )�log)�newer)�DistutilsByteCompileError�DistutilsPlatformError)�spawn)�TypeVarTuple�Unpack�_Ts�return�strc C s t �� S )z�
Return a string that identifies the current platform. Use this
function to distinguish platform-specific build directories and
platform-specific built distributions.
)� sysconfig�get_platform� r r �E/usr/local/lib/python3.10/dist-packages/setuptools/_distutils/util.py�get_host_platform# s r c C s: t jdkrddddd�} t j�d�}| �|�pt� S t� S )N�nt�win32z win-amd64z win-arm32z win-arm64)�x86�x64�arm�arm64�VSCMD_ARG_TGT_ARCH)�os�name�environ�getr )�TARGET_TO_PLAT�targetr r r r 1 s
�r �darwin�MACOSX_DEPLOYMENT_TARGETc C s da dS )zFor testing only. Do not call.N)�_syscfg_macosx_verr r r r �_clear_cached_macosx_verC s r) c C s. t du rddlm} | �t�pd}|r|a t S )z�Get the version of macOS latched in the Python interpreter configuration.
Returns the version as a string or None if can't obtain one. Cached.Nr )r � )r( � distutilsr �get_config_var�MACOSX_VERSION_VAR)r �verr r r �!get_macosx_target_ver_from_syscfgI s r/ c C sd t � } tj�t�}|r0| r.t| �ddgkr.t|�ddgk r.dt d|� d| � d� }t|��|S | S )a Return the version of macOS for which we are building.
The target version defaults to the version in sysconfig latched at time
the Python interpreter was built, unless overridden by an environment
variable. If neither source has a value, then None is returned�
� �$z mismatch: now "z" but "z*" during configure; must use 10.3 or later)r/ r r"