Current File : //usr/lib/python3/dist-packages/setuptools/_distutils/__pycache__/bcppcompiler.cpython-312.pyc |
�
_�d�9 � � � d Z ddlZddlZddlmZmZmZmZmZ ddl m
Z
mZ ddlm
Z
ddlmZ ddlmZ ej$ d e� G d
� de
� Zy)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.exec �� �� t �| � |||� d| _ d| _ d| _ d | _ g d�| _ g d�| _ g d�| _ g d�| _ g | _
g d�| _ g d�| _ y ) 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 ��D/usr/lib/python3/dist-packages/setuptools/_distutils/bcppcompiler.pyr zBCPPCompiler.__init__B sk �� �
����'�5�1� ���#������"&���;���%A��"�9���$?��!� ���.���!:��� c �Z � | j ||||||� \ }} }}
}|xs g }|j d� |r|j | j � n|j | j � | D ]� }
||
\ }}t j j |� }t j j |
� }
| j t j j |
� � |dk( r�~|dk( r | j dd|
|g� ��|| j v rd}n|| j v rd}nd}d|
z } | j | j g|z |
z ||gz |z |gz � �� | S # t
$ r Y ��w xY w# t $ r}t |� �d }~ww xY w# t $ r}t |� �d }~ww xY w) 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.compileY s� � � ;?�:M�:M����g�w��;
�7�����%� %�*������D�!������ :� :�;����� 4� 4�5�� 1 (�C�
� ��:���S� �'�'�"�"�3�'�C��'�'�"�"�3�'�C�
�K�K�������,�-��f�}���e�|�,��J�J��%��c�:�;� � �d�(�(�(�� ���,�,�,� � �
� ����J�
(��
�
��W�W�I�"�#��� !�*�-�.� %� %�
�e���Q1 (�f ���a �
��
�� *� ,�&�s�+�+��,��: &�
(�"�3�'�'��
(�sB �3E%�3E5�3.F�% E2�1E2�5 F�>F � F� F*�F%�%F*c �2 � | j ||� \ }}| j ||�� }| j ||� r+|dg|z }|r | j | j g|z � y t j d|� y # t
$ r}t
|� �d }~ww xY w)N)r>