ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/bcppcompiler.cpython-311.pyc

�

�f.:��~�dZddlZddlmZmZmZmZmZddlm	Z	m
Z
ddlmZddl
mZddlmZGd�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)�logc��eZdZdZdZiZdgZgd�ZeezZdZ	dZ
dZdxZZ
d	Z			dd�Z		dd
�Z			dd�Z										dd�Zdd�Z		dd�Z					dd�ZdS)�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.exerc���tj||||��d|_d|_d|_d|_gd�|_gd�|_gd�|_gd�|_	g|_
gd�|_gd�|_dS)	Nz	bcc32.exezilink32.exeztlib.exe)�/tWMz/O2�/q�/g0)rz/Odrr)z/Tpd�/Gnr�/x)rrr)rrrz/r)
r�__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�forces    �=/opt/alt/python311/lib64/python3.11/distutils/bcppcompiler.pyrzBCPPCompiler.__init__5s���
	��D�'�7�E�:�:�:����#������"&���;�;�;���%A�%A�%A��"�9�9�9���$?�$?�$?��!� ���.�.�.���!9�!9�!9�����Nc	�~�|�||||||��\}}	}}
}|pg}|�d��|r|�|j��n|�|j��|	D�]H}
	||
\}}n#t
$rY�wxYwtj�|��}tj�|
��}
|�	tj�
|
����|dkr��|dkr=	|�dd|
|g��n!#t$r}t|���d}~wwxYw��||jvrd}n||jvrd}nd}d|
z}	|�|jg|z|
z||gz|z|gz����)#t$r}t|���d}~wwxYw|	S)	Nz-c�.res�.rc�brcc32z-fo�z-P�-o)�_setup_compile�append�extendrr�KeyError�os�path�normpath�mkpath�dirname�spawnrr�
_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.compileQsF��
�#�#�J���g�$+�^�=�=�	8�����%�%�*������T�"�"�"��	7�����!;�<�<�<�<�����!5�6�6�6��,	(�,	(�C�
� ��:���S�S���
�
�
���
�����'�"�"�3�'�'�C��'�"�"�3�'�'�C�
�K�K������,�,�-�-�-��f�}�}���e�|�|�,��J�J��5�#�s� ;�<�<�<�<��)�,�,�,�&�s�+�+�+�����,������d�(�(�(��	�	���,�,�,� �	�	�
�	����J�

(��
�
�T�W�I��4�w�>�&�
�3�4�*�+�.1�U�3�4�4�4�4��&�
(�
(�
(�"�3�'�'�'�����
(�����sB�7B�
B�B�D+�+
E	�5E�E	�--F�
F:�&F5�5F:c�T�|�||��\}}|�||���}|�||��rL|dg|z}|r		|�|jg|z��dS#t
$r}t
|���d}~wwxYwtjd|��dS)N)r;z/u�skipping %s (up-to-date))	�_fix_object_args�library_filename�
_need_linkr7rrrrr>)	r"rB�output_libnamer;r>�target_lang�output_filename�lib_argsrIs	         r&�create_static_libzBCPPCompiler.create_static_lib�s���!%� 5� 5�w�
� K� K���*��!�!�>�j�!�I�I�	��?�?�G�_�5�5�		C�'��.��8�H��
��
$��
�
�T�X�J��1�2�2�2�2�2��%�
$�
$�
$��s�m�m�#�����
$����
�I�0�/�B�B�B�B�Bs�A2�2
B�<B�Bc��|�||��\}}|�|||��\}}}|r"tjdt	|����|� t
j�||��}|�||���r�|tj
kr$d}|	r|jdd�}n3|jdd�}n#d}|	r|j
dd�}n|jdd�}|�d}n�t
j�|��\}}t
j�|��\}}t
j�|d��}t
j�|d|z��}dg}|pgD]}|�d|�d	|�����|�t(||fd
|z��t+t
jj|��}|g}g}|D]r}t
j�t
j�|����\}}|dkr|�|���]|�|���s|D]7}|�dt
j�|��z���8|�d
��|�|��|�d|g��|�d��|D]F}|�|||	��}|�|�|���1|�|���G|�d��|�d��|�d|g��|�d��|�|��|
r|
|dd�<|r|�|��|�t
j�|����	|�|jg|z��dS#t:$r}t=|���d}~wwxYwtjd|��dS)Nz7I don't know what to do with 'runtime_library_dirs': %s�c0w32�c0d32r,rz%s.def�EXPORTSz  z=_z
writing %sr)z/L%sz/L.�,z,,�import32�cw32mtrN) rO�
_fix_lib_argsr�warn�strr2r3�joinrQr�
EXECUTABLEr!r rr�split�splitextr6r/�executer
�mapr4�normcaser0�find_library_filer5r7rrrr>) r"�target_descrBrTr;�	libraries�library_dirs�runtime_library_dirs�export_symbolsr>r?r@�
build_temprS�startup_obj�ld_args�def_file�head�tail�modnamerH�temp_dir�contents�sym�objects2�	resources�file�base�lr�libfilerIs                                 r&�linkzBCPPCompiler.link�s��$!%� 5� 5�w�
� K� K���*����	�<�9M�N�N�	8��L�"6� �	0��H�N��-�.�.�
0�
0�
0��!� �g�l�l�J��H�H�O��?�?�G�_�5�5�e	C��i�2�2�2�%���2�"�4�Q�Q�Q�7�G�G�"�.�q�q�q�1�G�G�%���5�"�7����:�G�G�"�1�!�!�!�4�G��%�����W�]�]�O�<�<�
��d�!�w�/�/��6�6�����7�?�?�7�1�:�6�6���7�<�<��8�g�3E�F�F��%�;��*�0�b�=�=�C��O�O�O�#�#�#�s�s�$;�<�<�<�<����Z�(�H�)=�)�H�4�6�6�6��2�7�+�W�5�5�H�#�m�G��I� �
)�
)�� �g�.�.�r�w�/?�/?��/E�/E�F�F���s��&�=�=��$�$�T�*�*�*�*��N�N�4�(�(�(�(�"�
=�
=�����v���(8�(8��(;�(;�;�<�<�<�<��N�N�5�!�!�!�
�N�N�7�#�#�#�
�N�N�C��0�1�1�1��N�N�4� � � � �	
,�	
,���0�0��s�E�J�J���?��N�N�3�'�'�'�'��N�N�7�+�+�+�+�
�N�N�J�'�'�'��N�N�H�%�%�%�
�N�N�C��>�*�*�*��N�N�3�����N�N�9�%�%�%��
,�+�������
/����~�.�.�.��K�K�����/�:�:�;�;�;�
%��
�
�T�[�M�G�3�4�4�4�4�4��%�
%�
%�
%���n�n�$�����
%����
�I�0�/�B�B�B�B�Bs�0P�
P.�P)�)P.c��|r|dz}|dz|dz||f}n|dz|f}|D]_}|D]Z}tj�||�|����}tj�|��r|ccS�[�`dS)N�_d�_bcpp)r2r3rarP�exists)	r"�dirsrr>�dlib�	try_names�dir�namer}s	         r&rhzBCPPCompiler.find_library_file4s����	-��$�J�D�����w���c�B�I�I��w���,�I��	�	�C�!�
#�
#���'�,�,�s�D�,A�,A�$�,G�,G�H�H���7�>�>�'�*�*�#�"�N�N�N�N�N�#�
#��4r'r,c��|�d}g}|D�]=}tj�tj�|����\}}||jddgzvrtd|�d|�d����|rtj�|��}|dkr7|�tj�|||z������|dkr8|�tj�||dz������|�tj�|||j	z������?|S)Nr,r*r)zunknown file type 'z	' (from 'z'))
r2r3rdrg�src_extensionsr�basenamer/ra�
obj_extension)r"�source_filenames�	strip_dirr;�	obj_names�src_namer{rHs        r&�object_filenameszBCPPCompiler.object_filenamesNsX����B�z��	�(�	H�	H�H��'�*�*�B�G�,<�,<�X�,F�,F�G�G�K�T�3��4�.�%���?�@�@�&�&��s�s�H�H�H�(&�'�'�'��
/��w�'�'��.�.���f�}�}�� � �"�'�,�,�
�D�3�J�"G�"G�H�H�H�H������ � �"�'�,�,�
�D�6�M�"J�"J�K�K�K�K�� � �"�'�,�,�
�,0�4�3E�,E�#G�#G�H�H�H�H��r'c�0�|�d||��\}}}t||��}dg|z}	|�|	�d|z��|r||	dd�<|r|	�|��|	�|��|js|�t||��r||r2|�tj�	|����	|�
|	��dS#t$r#}
t|
��t|
���d}
~
wwxYwdS)Nz	cpp32.exer-r)�_fix_compile_argsr	r/r0r%rr5r2r3r6r7r�printr)r"�source�output_filer<r=r?r@�_rC�pp_argsrIs           r&�
preprocesszBCPPCompiler.preprocessisB��
�"�"�4���>�>�	"��F�L�(���>�>���-�'�)���"��N�N�4�+�-�.�.�.��	(�'�G�B�Q�B�K��	+��N�N�>�*�*�*����v����
�:�	(��,��f�k�0J�0J�,��
:����B�G�O�O�K�8�8�9�9�9�
(��
�
�7�#�#�#�#�#��%�
(�
(�
(��c�
�
�
�"�3�'�'�'�����
(����-�,s�C&�&
D�0D�D)rrr)NNNrNNN)NrN)
NNNNNrNNNN)r)rr,)NNNNN)�__name__�
__module__�__qualname__�__doc__�
compiler_type�executablesr8r9r�r��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionrrLrVr~rhr�r��r'r&rrsa���������M��K��F�M�-�-�-�O�#�_�4�N��M�!��!��,2�2��)��M����:�:�:�:�:HI�AE�<�<�<�<�H'+�!"�'+�C�C�C�C�:���#'�!�� �!���BC�BC�BC�BC�R����8%&�%'�����:!%��!%�"&�#'�
(�(�(�(�(�(r'r)r�r2�distutils.errorsrrrrr�distutils.ccompilerrr	�distutils.file_utilr
�distutils.dep_utilr�	distutilsrrr�r'r&�<module>r�s�����
�	�	�	�9�9�9�9�9�9�9�9�9�9�9�9�9�9�'�'�'�'�'�'�'�'�*�*�*�*�*�*�$�$�$�$�$�$�������n(�n(�n(�n(�n(�9�n(�n(�n(�n(�n(r'

Zerion Mini Shell 1.0