File: D:/Python311/Lib/site-packages/setuptools/_distutils/__pycache__/bcppcompiler.cpython-311.pyc
�
�nc�9 � � � d Z ddlZddlZddlmZmZmZmZmZ ddl m
Z
mZ ddlm
Z
ddlmZ ddlmZ ej de� � G d � d
e
� � ZdS )z�distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
� N)�DistutilsExecError�CompileError�LibError� LinkError�UnknownFileError)� CCompiler�gen_preprocess_options)�
write_file)�newer)�logz�bcppcompiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.c � � � e Zd ZdZdZi ZdgZg d�Zeez ZdZ dZ
dZdxZZ
d Zd� fd� Z dd
�Z dd�Z dd�Zdd�Zdd�Z dd�Z� xZS )�BCPPCompilerzConcrete class that implements an interface to the Borland C/C++
compiler, as defined by the CCompiler abstract class.
�bcppz.c)z.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exer c � �� t � � � |||� � d| _ d| _ d| _ d | _ g d�| _ g d�| _ g d�| _ g d�| _ g | _
g d�| _ g d�| _ d S ) Nz bcc32.exezilink32.exeztlib.exe)�/tWMz/O2�/q�/g0)r z/Odr r )z/Tpd�/Gnr �/x)r r r )r r r z/r)
�super�__init__�cc�linker�lib�preprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debug�ldflags_static�ldflags_exe�ldflags_exe_debug)�self�verbose�dry_run�force� __class__s ��DD:\Python311\Lib\site-packages\setuptools/_distutils/bcppcompiler.pyr zBCPPCompiler.__init__B s� �� �
������'�5�1�1�1� ���#������"&���;�;�;���%A�%A�%A��"�9�9�9���$?�$?�$?��!� ���.�.�.���!:�!:�!:����� Nc �~ � | � ||||||� � \ }} }}
}|pg }|� d� � |r|� | j � � n|� | j � � | D �]H}
||
\ }}n# t
$ r Y �w xY wt j � |� � }t j � |
� � }
| � t j �
|
� � � � |dk r��|dk r= | � dd|
|g� � n!# t $ r}t |� � �d }~ww xY w��|| j v rd}n|| j v rd}nd}d|
z } | � | j g|z |
z ||gz |z |gz � � ��)# t $ r}t |� � �d }~ww xY w| S ) Nz-c�.res�.rc�brcc32z-fo� z-P�-o)�_setup_compile�append�extendr r �KeyError�os�path�normpath�mkpath�dirname�spawnr r �
_c_extensions�_cpp_extensionsr )r# �sources�
output_dir�macros�include_dirs�debug�
extra_preargs�extra_postargs�depends�objects�pp_opts�build�compile_opts�obj�src�ext�msg� input_opt�
output_opts r( �compilezBCPPCompiler.compileZ s[ � � ;?�:M�:M����g�w��;
� ;
�7�����%� %�*������D�!�!�!�� 6����� :�;�;�;�;����� 4�5�5�5�� 1 (� 1 (�C�
� ��:���S�S���
�
�
���
���� �'�"�"�3�'�'�C��'�"�"�3�'�'�C�
�K�K������,�,�-�-�-��f�}�
���e�|�
�,��J�J��%��c�:�;�;�;�;��)� ,� ,� ,�&�s�+�+�+�����,����� �d�(�(�
�� � ���,�,�
� � � �
� ����J�
(��
�
��W�I�"�#��� !�*�-�.� %� %�
�e��� � � �� &�
(�
(�
(�"�3�'�'�'�����
(���� �sB �7B�
B�B�D+�+
E �5E�E �--F�
F:�&F5�5F:c �T � | � ||� � \ }}| � ||�� � }| � ||� � rL|dg|z }|r | � | j g|z � � d S # t
$ r}t
|� � �d }~ww xY wt j d|� � d S )N)r= z/u�skipping %s (up-to-date)) �_fix_object_args�library_filename�
_need_linkr9 r r r r r@ ) r# rD �output_libnamer= r@ �target_lang�output_filename�lib_argsrK s r( �create_static_libzBCPPCompiler.create_static_lib� s� � � !%� 5� 5�g�z� J� J���*��/�/��:�/�V�V���?�?�7�O�4�4� C�'��.��8�H��
��
$��
�
�D�H�:��0�1�1�1�1�1��%�
$�
$�
$��s�m�m�#�����
$����
�I�0�/�B�B�B�B�Bs �A2 �2
B�<B�Bc � � | � ||� � \ }}| � |||� � \ }}}|r"t j dt |� � � � |� t
j � ||� � }| � ||� � �r�|t j
k r$d}| r| j d d � }n3| j d d � }n#d}| r| j
d d � }n| j d d � }|�d}n�t
j � |� � \ }}t
j � |� � \ }}t
j � |d � � }t
j � |d|z � � }dg}|pg D ]+}|� d� ||� � � � �,| � t* ||fd |z � � t- t
j j |� � }|g}g }|D ]r}t
j � t
j � |� � � � \ }}|d
k r|� |� � �]|� |� � �s|D ]7}|� dt
j � |� � z � � �8|� d� � |� |� � |� d
|g� � |� d� � |D ]F}| � ||| � � }|�|� |� � �1|� |� � �G|� d� � |� d� � |� d
|g� � |� d
� � |� |� � |
r|
|d d�<