File: //usr/local/lib/python3.10/__pycache__/_osx_support.cpython-310.opt-2.pyc
o
�iU � @ s� d dl Z d dlZd dlZg d�ZdZdZdZd-dd�Zd.d d
�Zdd� Z da
d
d� Zdadd� Z
dd� Zdd� Zdadd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� ZdS )/� N)�compiler_fixup�customize_config_vars�customize_compiler�get_platform_osx)
�CFLAGSZLDFLAGSZCPPFLAGSZ
BASECFLAGS� BLDSHARED�LDSHARED�CC�CXXZ PY_CFLAGSZ
PY_LDFLAGSZPY_CPPFLAGSZPY_CORE_CFLAGSZPY_CORE_LDFLAGS)r r r r
Z_OSX_SUPPORT_INITIAL_c C s� |d u r
t jd }|�t j�}t j�| �\}}tjdkr%|dkr%| d } t j�| �sC|D ]}t j� || �}t j�|�r@| S q-d S | S )N�PATH�win32z.exe)
�os�environ�split�pathsep�path�splitext�sys�platform�isfile�join)�
executabler �paths�base�ext�p�f� r �)/usr/local/lib/python3.10/_osx_support.py�_find_executable s
�r Fc C s� dd l }z
dd l}|�� }W n ty" tdt�� f d�}Y nw |�|��)}|r3d| |jf }nd| |jf }t� |�sH|�
� �d��� nd W d � S 1 sTw Y d S )Nr z/tmp/_osx_support.%szw+bz
%s >'%s' 2>&1z%s 2>/dev/null >'%s'�utf-8)
�
contextlib�tempfile�NamedTemporaryFile�ImportError�openr
�getpid�closing�name�system�read�decode�strip)Z
commandstringZcapture_stderrr! r"