Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/distutils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/ccompiler.cpython-311.opt-2.pyc
�

�,d:�����	ddlZddlZddlZddlTddlmZddlmZddlm	Z	ddl
mZddlm
Z
mZddlmZGd	�d
��ZdZdd�Zd
ddddd�Zd�Zdd�Zd�Zd�ZdS)�N)�*)�spawn)�	move_file)�mkpath)�newer_group)�split_quoted�execute)�logc��eZdZ	dZdZdZdZdZdZdZ	dZ
dddddd�Zgd�Zd@d�Z
d	�Zd
�Zd�Zd�ZdAd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z dAd�Z!d�Z"d�Z#d�Z$d �Z%		dBd!�Z&			dCd"�Z'd#�Z(		dDd$�Z)d%Z*d&Z+d'Z,										dEd(�Z-										dEd)�Z.										dEd*�Z/								dFd+�Z0d,�Z1d-�Z2d.�Z3		dGd/�Z4dHd0�Z5dId2�Z6dId3�Z7dId4�Z8		dJd6�Z9dKd8�Z:d9�Z;d:�Z<dLd;�Z=d<�Z>d=�Z?dMd?�Z@dS)N�	CCompilerN�c�c++�objc)�.cz.ccz.cppz.cxxz.m)rrr
rc��||_||_||_d|_g|_g|_g|_g|_g|_g|_	|j
���D]#}|�||j
|���$dS�N)
�dry_run�force�verbose�
output_dir�macros�include_dirs�	libraries�library_dirs�runtime_library_dirs�objects�executables�keys�set_executable)�selfrrr�keys     �:/opt/alt/python311/lib64/python3.11/distutils/ccompiler.py�__init__zCCompiler.__init__Us��������
�������������������%'��!�����#�(�(�*�*�	<�	<�C�����T�%5�c�%:�;�;�;�;�	<�	<�c��	|D]F}||jvrtd|�d|jj�����|�|||���GdS)Nzunknown executable 'z' for class )r�
ValueError�	__class__�__name__r)r �kwargsr!s   r"�set_executableszCCompiler.set_executablesysw��	�2�	2�	2�C��$�*�*�*� �j��s�s�D�N�3�3�"5�6�6�6�����V�C�[�1�1�1�1�		2�	2r$c��t|t��r t||t|����dSt|||��dSr)�
isinstance�str�setattrr)r r!�values   r"rzCCompiler.set_executable�sL���e�S�!�!�	&��D�#�|�E�2�2�3�3�3�3�3��D�#�u�%�%�%�%�%r$c�H�d}|jD]}|d|kr|cS|dz
}�dS)Nr�)r)r �name�i�defns    r"�_find_macrozCCompiler._find_macro�s>��
���K�	�	�D��A�w�$�������
��F�A�A��tr$c�
�	|D]~}t|t��rOt|��dvr>t|dt��s|d�t|dt��st	d|zdzdz����dS)N)r1�r1rzinvalid macro definition '%s': z.must be tuple (string,), (string, string), or z(string, None))r,�tuple�lenr-�	TypeError)r �definitionsr4s   r"�_check_macro_definitionsz"CCompiler._check_macro_definitions�s���	� �	(�	(�D��t�U�+�+�
(���Y�Y�&�(�(�!�4��7�C�0�0�)�48��G�O���Q���-�-�5D��!B�T�!I�F�!G�&�!'�(�(�(�5D�	(�	(r$c�~�	|�|��}|�|j|=|j�||f��dSr�r5r�append)r r2r/r3s    r"�define_macrozCCompiler.define_macro�sJ��	�
���d�#�#���=���A������D�%�=�)�)�)�)�)r$c��	|�|��}|�|j|=|f}|j�|��dSrr>)r r2r3�undefns    r"�undefine_macrozCCompiler.undefine_macro�sM��	�
���d�#�#���=���A���������6�"�"�"�"�"r$c�<�	|j�|��dSr)rr?�r �dirs  r"�add_include_dirzCCompiler.add_include_dir��&��	�
	
�� � ��%�%�%�%�%r$c�&�	|dd�|_dSr�r�r �dirss  r"�set_include_dirszCCompiler.set_include_dirs�s��	�!����G����r$c�<�	|j�|��dSr)rr?)r �libnames  r"�add_libraryzCCompiler.add_library�s%��	�	
����g�&�&�&�&�&r$c�&�	|dd�|_dSr)r)r �libnamess  r"�
set_librarieszCCompiler.set_libraries�s��	�
"�!�!�!�����r$c�<�	|j�|��dSr)rr?rEs  r"�add_library_dirzCCompiler.add_library_dirrHr$c�&�	|dd�|_dSr)rrKs  r"�set_library_dirszCCompiler.set_library_dirss��	�!����G����r$c�<�	|j�|��dSr)rr?rEs  r"�add_runtime_library_dirz!CCompiler.add_runtime_library_dirs&��	�	
�!�(�(��-�-�-�-�-r$c�&�	|dd�|_dSr)rrKs  r"�set_runtime_library_dirsz"CCompiler.set_runtime_library_dirss��	�
%)����G��!�!�!r$c�<�	|j�|��dSr)rr?)r �objects  r"�add_link_objectzCCompiler.add_link_object s%��	�
	
����F�#�#�#�#�#r$c�&�	|dd�|_dSr)r)r rs  r"�set_link_objectszCCompiler.set_link_objects(s��	�
�q�q�q�z����r$c��	|�|j}n$t|t��std���|�|j}n1t|t
��r
||jpgz}ntd���|�|j}nEt|t
tf��rt|��|jpgz}ntd���|�g}|�|d|���}t||��}i}	tt|����D]p}
||
}||
}tj
�|��d}
|�tj
�|����||
f|	|<�q|||||	fS)N�%'output_dir' must be a string or None�/'macros' (if supplied) must be a list of tuples�6'include_dirs' (if supplied) must be a list of stringsr)�	strip_dirrr1)rr,r-r:r�listrr8�object_filenames�gen_preprocess_options�ranger9�os�path�splitextr�dirname)r �outdirr�incdirs�sources�depends�extrar�pp_opts�buildr3�src�obj�exts              r"�_setup_compilezCCompiler._setup_compile6s���I��>��_�F�F��F�C�(�(�	E��C�D�D�D��>��[�F�F�
���
%�
%�	O��t�{�0�b�1�F�F��M�N�N�N��?��'�G�G�
��$���
/�
/�	L��7�m�m�t�'8�'>�B�?�G�G��J�L�L�
L��=��E��'�'��1�39�(�;�;��)���9�9�����s�7�|�|�$�$�	$�	$�A��!�*�C��!�*�C��'�"�"�3�'�'��*�C��K�K������,�,�-�-�-��s��E�#�J�J��w��w��5�5r$c�8�|dgz}|rdg|dd�<|r||dd�<|S)Nz-cz-gr�)r rs�debug�before�cc_argss     r"�_get_cc_argszCCompiler._get_cc_argsas?���T�F�"���	!��&�G�B�Q�B�K��	!� �G�B�Q�B�K��r$c�~�	|�|j}n$t|t��std���|�|j}n1t|t
��r
||jpgz}ntd���|�|j}nEt|t
tf��rt|��|jpgz}ntd���|||fS)Nrbrcrd)rr,r-r:rrfrr8)r rrrs    r"�_fix_compile_argszCCompiler._fix_compile_argsjs���	�����J�J��J��,�,�	E��C�D�D�D��>��[�F�F�
���
%�
%�	O��t�{�0�b�1�F�F��M�N�N�N����,�L�L�
��t�U�m�
4�
4�	L���-�-��1B�1H�b�I�L�L��J�L�L�
L��6�<�/�/r$c�:�	|�||���}|ifS)N)r)rg)r rprrqrs     r"�
_prep_compilezCCompiler._prep_compile�s-��	��'�'��J�'�G�G��
��{�r$c���	t|ttf��std���t|��}|�|j}n$t|t
��std���||fS)Nz,'objects' must be a list or tuple of stringsrb)r,rfr8r:rr-)r rrs   r"�_fix_object_argszCCompiler._fix_object_args�sv��	�
�'�D�%�=�1�1�	L��J�K�K�K��w�-�-������J�J��J��,�,�	E��C�D�D�D���$�$r$c���	|�|j}nEt|ttf��rt|��|jpgz}nt	d���|�|j}nEt|ttf��rt|��|jpgz}nt	d���|�|j}nEt|ttf��rt|��|jpgz}nt	d���|||fS)Nz3'libraries' (if supplied) must be a list of stringsz6'library_dirs' (if supplied) must be a list of stringsz>'runtime_library_dirs' (if supplied) must be a list of strings)rr,rfr8r:rr)r rrrs    r"�
_fix_lib_argszCCompiler._fix_lib_args�s6��	�����I�I�
�	�D�%�=�
1�
1�	I��i�(�(�D�N�,@�b�A�I�I��G�I�I�
I����,�L�L�
��t�U�m�
4�
4�	L���.�.�$�2C�2I�r�J�L�L��J�L�L�
L� �'�#'�#<� � �
�,�t�U�m�
<�
<�	9�$(�)=�$>�$>�%)�%>�%D�"�%F� � ��8�9�9�
9��<�)=�>�>r$c�n�	|jrdS|jrt||d���}nt||��}|S)NT�newer)�missing)rrr)r r�output_filer�s    r"�
_need_linkzCCompiler._need_link�sL��	��:�	��4��|�
;�#�W�k�7�K�K�K���#�W�k�:�:���Lr$c�P�	t|t��s|g}d}t|j��}|D]s}tj�|��\}}|j�|��}	|j�	|��}||kr|}|}�d#t$rY�pwxYw|Sr)r,rfr9�language_orderrjrkrl�language_map�get�indexr&)	r rp�langr��source�baserw�extlang�extindexs	         r"�detect_languagezCCompiler.detect_language�s���	��'�4�(�(�	 ��i�G����D�'�(�(���		�		�F���(�(��0�0�I�D�#��'�+�+�C�0�0�G�
��.�4�4�W�=�=���e�#�#�"�D�$�E����
�
�
���
�����s�1$B�
B#�"B#c��	dSrrz)r r�r�rr�
extra_preargs�extra_postargss       r"�
preprocesszCCompiler.preprocess�s��	�	
�r$c		���	|�||||||��\}}	}}
}|�|
||��}|	D]9}
	||
\}}n#t$rY�wxYw|�|
|||||
���:|	Sr)rxr~�KeyError�_compile)r rprrrr{r�r�rqrrsrtr}rvrurws                r"�compilezCCompiler.compile�s���/	�f�#�#�J���g�$+�^�=�=�	8�����%��#�#�G�U�M�B�B���	K�	K�C�
� ��:���S�S���
�
�
���
�����M�M�#�s�C��.�'�J�J�J�J��s�A
�

A�Ac��	dSrrz)r rvrurwr}r�rss       r"r�zCCompiler._compileCs��-�	
�r$c��	dSrrz)r r�output_libnamerr{�target_langs      r"�create_static_libzCCompiler.create_static_libIs��	�,	
�r$�
shared_object�shared_library�
executablec��	t�r��NotImplementedError)r �target_descr�output_filenamerrrr�export_symbolsr{r�r��
build_tempr�s              r"�linkzCCompiler.linkis��*	�V"�!r$c
��|�tj||�|d���|||||||	|
||�
�
dS)N�shared)�lib_type)r�r�SHARED_LIBRARY�library_filename)
r rr�rrrrr�r{r�r�r�r�s
             r"�link_shared_libzCCompiler.link_shared_lib�s_��	
�	�	�)�*�G��'�'���'�J�J���\�+?� �%����[�	J�	J�	J�	J�	Jr$c
�\�|�tj|||||||||	|
||�
�
dSr)r�r�
SHARED_OBJECT)
r rr�rrrrr�r{r�r�r�r�s
             r"�link_shared_objectzCCompiler.link_shared_object�sK��	
�	�	�)�)�7�!�:��\�+?� �%����[�		J�	J�	J�	J�	Jr$c��|�tj||�|��||||d|||	d|
�
�
dSr)r�r�
EXECUTABLE�executable_filename)r r�output_prognamerrrrr{r�r�r�s           r"�link_executablezCCompiler.link_executable�sX��	
�	�	�)�&���*�*�?�;�;�Z��\�+?������k�	K�	K�	K�	K�	Kr$c��	t�rr�rEs  r"�library_dir_optionzCCompiler.library_dir_option����	�"�!r$c��	t�rr�rEs  r"�runtime_library_dir_optionz$CCompiler.runtime_library_dir_option�r�r$c��	t�rr�)r �libs  r"�library_optionzCCompiler.library_option�r�r$c��	ddl}|�g}|�g}|�g}|�g}|�d|d���\}}tj|d��}		|D]}
|	�d|
z���|	�d|z��|	���n#|	���wxYw	|�|g|���}n#t$rYd	SwxYw	|�|d
||���n#ttf$rYd	SwxYwdS)NrrT)�text�wz#include "%s"
z=int main (int argc, char **argv) {
    %s();
    return 0;
}
rJFza.out)rr)�tempfile�mkstemprj�fdopen�write�closer��CompileErrorr��	LinkErrorr:)r �funcname�includesrrrr��fd�fname�f�inclrs            r"�has_functionzCCompiler.has_function�s���	�	�������H����L����I����L��$�$�T�8�$�$�?�?�	��E��I�b�#����
	� �
6�
6�����-��4�5�5�5�5�
�G�G��
��
�
�
�
�G�G�I�I�I�I��A�G�G�I�I�I�I����	��l�l�E�7��l�F�F�G�G���	�	�	��5�5�	����	�� � ��'�+4�.:�
!�
<�
<�
<�
<���9�%�	�	�	��5�5�	�����ts0�5B�B'�+C�
C�C�C0�0D�Dc��	t�rr�)r rLr�r{s    r"�find_library_filezCCompiler.find_library_file$s��	�"�!r$�c���|�d}g}|D]�}tj�|��\}}tj�|��d}|tj�|��d�}||jvrt
d|�d|�d����|rtj�|��}|�tj�	|||j
z������|S)Nr�r1zunknown file type 'z	' (from 'z'))rjrkrl�
splitdrive�isabs�src_extensions�UnknownFileError�basenamer?�join�
obj_extension)r �source_filenamesrer�	obj_names�src_namer�rws        r"rgzCCompiler.object_filenamesOs�����J��	�(�
	F�
	F�H���(�(��2�2�I�D�#��7�%�%�d�+�+�A�.�D����
�
�d�+�+�,�,�-�D��$�-�-�-�&�&�>A�c�c�8�8�8�L�N�N�N��
.��w�'�'��-�-�����R�W�\�\�*�*.��1C�*C�E�E�
F�
F�
F�
F��r$c��|rtj�|��}tj�|||jz��Sr)rjrkr�r��shared_lib_extension�r r�rers    r"�shared_object_filenamez CCompiler.shared_object_filename`s=���	2��w�'�'��1�1�H��w�|�|�J��4�3L�(L�M�M�Mr$c��|rtj�|��}tj�|||jpdz��S)Nr�)rjrkr�r��
exe_extensionr�s    r"r�zCCompiler.executable_filenamefsB���	2��w�'�'��1�1�H��w�|�|�J��D�4F�4L�"�(M�N�N�Nr$�staticc��|dvrtd���t||dz��}t||dz��}tj�|��\}}|||fz}	|rd}tj�|||	��S)N)r�r��dylib�
xcode_stubz?'lib_type' must be "static", "shared", "dylib", or "xcode_stub"�_lib_format�_lib_extensionr�)r&�getattrrjrk�splitr�)
r rOr�rer�fmtrwrFr��filenames
          r"r�zCCompiler.library_filenamels����F�F�F��[�]�]�
]��d�H�}�4�5�5���d�H�'7�7�8�8���G�M�M�'�*�*�	��T��$���$���	��C��w�|�|�J��X�6�6�6r$r1c�.�tj|��dSr)r
r{)r �msg�levels   r"�announcezCCompiler.announces���	�#�����r$c�8�ddlm}|rt|��dSdS)Nr)�DEBUG)�distutils.debugr��print)r r�r�s   r"�debug_printzCCompiler.debug_print�s5��)�)�)�)�)�)��	��#�J�J�J�J�J�	�	r$c�J�tj�d|z��dS)Nzwarning: %s
)�sys�stderrr�)r r�s  r"�warnzCCompiler.warn�s#���
����3�.�/�/�/�/�/r$c�4�t||||j��dSr)r	r)r �func�argsr�r�s     r"r	zCCompiler.execute�s����d�C���.�.�.�.�.r$c�2�t||j���dS�N)r)rr)r �cmds  r"rzCCompiler.spawn�s��
�c�4�<�(�(�(�(�(�(r$c�0�t|||j���Sr)rr)r ru�dsts   r"rzCCompiler.move_file�s����c�4�<�8�8�8�8r$�c�4�t|||j���dSr)rr)r r2�modes   r"rzCCompiler.mkpath�s���t�T�4�<�0�0�0�0�0�0r$)rrrr)NNNNN)NNNrNNN)NrN)
NNNNNrNNNN)NNNNrNNN)NNNN)r)rr�)r�rr�)r1)Nr1)r	)Ar(�
__module__�__qualname__�
compiler_typer�r��static_lib_extensionr��static_lib_format�shared_lib_formatr�r�r�r#r*rr5r<r@rCrGrMrPrSrUrWrYr[r^r`rxr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rgr�r�r�r�r�rr	rrrrzr$r"rrs��������*�M�4�N��M����������M�!�"�"�"�#�	��L�*�)�)�N�"<�"<�"<�"<�H2�2�2�@&�&�&����(�(�(�"
*�
*�
*�
*�#�#�#�$&�&�&�$�$�$�'�'�'� %�%�%�&�&�&�$�$�$�.�.�.�,�,�,�$�$�$�"�"�"�)6�)6�)6�V���0�0�0�@���� %�%�%�" ?� ?� ?�D������0;?�IM�
�
�
�
�8<�:>�-1�B�B�B�B�H
�
�
�EI�/3�
�
�
�
�8$�M�%�N��J����"&� ��� ���9"�9"�9"�9"�B$(�"&�%)�-1�'+��&*�'+�#'�$(�J�J�J�J�0'+�%)�(,�04�*.�!"�)-�*.�&*�'+�J�J�J�J�.$(�"&�%)�-1��&*�'+�$(�K�K�K�K�,"�"�"�"�"�"�"�"�"�BF�26�*�*�*�*�X"�"�"�"�V����"N�N�N�N�O�O�O�O�2:�13�7�7�7�7�&�������
0�0�0�/�/�/�/�)�)�)�9�9�9�1�1�1�1�1�1r$r))zcygwin.*�unix)�posixr)�nt�msvcc��	|�tj}|�tj}tD]3\}}tj||���tj||���|cS�4dS)Nr)rjr2r��platform�_default_compilers�re�match)�osnamer�pattern�compilers    r"�get_default_compilerr�so����~�������<��/������
�8�G�X�&�&�2�
�8�G�V�$�$�0��O�O�O�1��6r$)�
unixccompiler�
UnixCCompilerzstandard UNIX-style compiler)�
_msvccompiler�MSVCCompilerzMicrosoft Visual C++)�cygwinccompiler�CygwinCCompilerz'Cygwin port of GNU C Compiler for Win32)r#�Mingw32CCompilerz(Mingw32 port of GNU C Compiler for Win32)�bcppcompiler�BCPPCompilerzBorland C++ Compiler)rr�cygwin�mingw32�bcppc��	ddlm}g}t���D].}|�d|zdt|df���/|���||��}|�d��dS)Nr)�FancyGetoptz	compiler=r7zList of available compilers:)�distutils.fancy_getoptr,�compiler_classrr?�sort�
print_help)r,�	compilersr�pretty_printers    r"�show_compilersr3�s����3�2�2�2�2�2��I�"�'�'�)�)�8�8�����+�h�.��(��2�1�5�7�	8�	8�	8�	8�
�N�N���� �[��+�+�N����<�=�=�=�=�=r$c���	|�tj}	|�t|��}t|\}}}n,#t$rd|z}|�|d|zz}t|���wxYw	d|z}t
|��tj|}	t|	��|}
n?#t$rtd|z���t$rtd|�d|�d����wxYw|
d||��S)Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerz
distutils.z4can't compile C/C++ code: unable to load module '%s'z0can't compile C/C++ code: unable to find class 'z
' in module '�')rjr2rr.r��DistutilsPlatformError�
__import__r��modules�vars�ImportError�DistutilsModuleError)�platrrrr�module_name�
class_name�long_descriptionr��module�klasss           r"�new_compilerrB�sO��	��|��w��	*���+�D�1�1�H�6D�X�6N�3��j�"2�"2���*�*�*�E��L�����-��8�8�C�$�S�)�)�)�	*����=�"�[�0���K� � � ���[�)���V���Z�(��������"�D�����	��=�=�=�"�"�#-�:�:�{�{�{�<�=�=�	=�=�����5��w��&�&�&s�"4�)A�!;B�<Cc���	g}|D]�}t|t��rdt|��cxkrdksntd|z���t|��dkr|�d|dz���wt|��dkr?|d�|�d|dz����|�d|z����|D]}|�d|z���|S)	Nr1r7zPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tuplez-U%srz-D%sz-D%s=%sz-I%s)r,r8r9r:r?)rrrs�macrorFs     r"rhrhs ���(�G��2�2���5�%�(�(�	�Q�#�e�*�*�-A�-A�-A�-A��-A�-A�-A�-A��J�����
�
�u�:�:��?�?��N�N�6�E�!�H�,�-�-�-�-�
��Z�Z�1�_�_��Q�x�����v��a��0�1�1�1�1�
���y�5�0�1�1�1���%�%�����v��|�$�$�$�$��Nr$c�,�	g}|D]*}|�|�|�����+|D]G}|�|��}t|t��r||z}�2|�|���H|D]�}t
j�|��\}}	|rH|�|g|	��}
|
r|�|
���U|�	d|z���n|�|�
|������|S)Nz6no library file corresponding to '%s' found (skipping))r?r�r�r,rfrjrkr�r�rr�)rrrr�lib_optsrF�optr��lib_dir�lib_name�lib_files           r"�gen_lib_optionsrK8sK����H��:�:������3�3�C�8�8�9�9�9�9�#�!�!���1�1�#�6�6���c�4� � �	!��#�~�H�H��O�O�C� � � � ��
;�
;�� �g�m�m�C�0�0���(��	;��1�1�7�)�X�F�F�H��
=�����)�)�)�)��
�
�6�8;�<�=�=�=�=�
�O�O�H�3�3�S�9�9�:�:�:�:��Or$)NN)NNrrr)r�rjr�distutils.errors�distutils.spawnr�distutils.file_utilr�distutils.dir_utilr�distutils.dep_utilr�distutils.utilrr	�	distutilsr
rrrr.r3rBrhrKrzr$r"�<module>rSso��1�
����������������!�!�!�!�!�!�)�)�)�)�)�)�%�%�%�%�%�%�*�*�*�*�*�*�0�0�0�0�0�0�0�0�������E1�E1�E1�E1�E1�E1�E1�E1�X������0?�7�J�K�7�
�
��>�>�>�"*'�*'�*'�*'�Z*�*�*�Z$�$�$�$�$r$

ZeroDay Forums Mini