Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/cygwinccompiler.cpython-311.opt-1.pyc

�

c��f�?���dZddlZddlZddlZddlmZmZmZddlZddl	m
Z
ddlmZddl
mZmZmZmZddlmZddlmZd	�ZGd
�de
��ZGd�d
e��ZdZdZdZd�Zejd��Zd�Zd�Z d�Z!dS)adistutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
�N)�Popen�PIPE�check_output)�
UnixCCompiler)�
write_file)�DistutilsExecError�CCompilerError�CompileError�UnknownFileError)�LooseVersion)�find_executablec��tj�d��}|dkrYtj|dz|dz�}|dkrdgS|dkrdgS|d	krd
gS|dkrdgS|d
krdgStd|z���dS)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.�����
�1300�msvcr70�1310�msvcr71�1400�msvcr80�1500�msvcr90�1600�msvcr100zUnknown MS Compiler version %s N)�sys�version�find�
ValueError)�msc_pos�msc_vers  �@/opt/alt/python311/lib64/python3.11/distutils/cygwinccompiler.py�	get_msvcrr#=s����k���x�(�(�G��"�}�}��+�g�a�i���
�2�3���f����;��
��
�
��;��
��
�
��;��
��
�
��;��
��
�
��<���>��H�I�I�I�%�}�c�T�eZdZdZdZdZdZdZdZdZ	dZ
dd
�Zd�Z				dd
�Z
dd�ZdS)�CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    �cygwinz.o�.az.dllzlib%s%sz%s%sz.exerc
��tj||||��t��\}}|�d|�d|�d���|tur|�d|z��t
��\|_|_|_	|�|j
d|j�d|j�d|j	�d�z��|jd	krd
|_nd|_|jdkrd
}nd}|�dddd|j�d|�����|jdkrdg|_
|�d��dSt��|_
dS)NzPython's GCC status: z (details: �)z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.z: gcc z, ld z
, dllwrap �
z2.10.90�gcc�dllwrap�2.13�-shared�
-mdll -staticzgcc -mcygwin -O -Wallzgcc -mcygwin -mdll -O -Wallzg++ -mcygwin -O -Wallzgcc -mcygwinz
 -mcygwin ��compiler�compiler_so�compiler_cxx�
linker_exe�	linker_so�2.91.57�msvcrtz,Consider upgrading to a newer version of gcc)r�__init__�check_config_h�debug_print�CONFIG_H_OK�warn�get_versions�gcc_version�
ld_version�dllwrap_version�
compiler_type�
linker_dll�set_executables�
dll_librariesr#)�self�verbose�dry_run�force�status�details�
shared_options       r"r9zCygwinCCompiler.__init__bs�����t�W�g�u�=�=�=�(�*�*�������� �&�&�'�'�'�+�	,�	,�	,���$�$��I�I�O���
�
�
�
�N�N�	@���$�/�4�+?�����+�+��*�*�*��/�/�/��.�.�.�/0�0�	2�	2�	2��?�i�'�'�#�D�O�O�'�D�O��?�f�$�$�%�M�M�+�M�	
���&=�)F�*A�(6�)-����-�-�)I�		�	K�	K�	K���y�(�(�!)�z�D���I�I�>�
@�
@�
@�
@�
@�
"+���D���r$c�*�|dks|dkr>	|�dd|d|g��dS#t$r}t|���d}~wwxYw	|�|j|z|d|gz|z��dS#t$r}t|���d}~wwxYw)z:Compiles the source by spawning GCC and windres if needed.�.rc�.res�windresz-iz-oN)�spawnrr
r3)rF�obj�src�ext�cc_args�extra_postargs�pp_opts�msgs        r"�_compilezCygwinCCompiler._compile�s����%�<�<�3�&�=�=�
(��
�
�I�t�S�$��<�=�=�=�=�=��%�
(�
(�
(�"�3�'�'�'�����
(����
(��
�
�4�+�g�5��d�C�8H�H�)�*�+�+�+�+�+��%�
(�
(�
(�"�3�'�'�'�����
(���s,�*�
A�A�A�&A4�4
B�>B
�
BNc��tj|
pg��}
tj|pg��}tj|pg��}|�|j��|��r||jks|jdk�r[t
j�|d��}t
j�t
j�	|����\}}t
j�
||dz��}t
j�
|d|zdz��}dt
j�	|��zdg}|D]}|�|���|�t||fd	|z��|jd
kr/|
�d|g��|
�d|g��n|�|��|	s|
�d
��tj||||||||d|	|
|||
��dS)zLink the objects.Nr,rz.def�libr(z
LIBRARY %s�EXPORTSz
writing %sr-z--output-libz--defz-s)�copy�extendrE�
EXECUTABLErC�os�path�dirname�splitext�basename�join�append�executerr�link)rF�target_desc�objects�output_filename�
output_dir�	libraries�library_dirs�runtime_library_dirs�export_symbols�debug�
extra_preargsrV�
build_temp�target_lang�temp_dir�dll_name�
dll_extension�def_file�lib_file�contents�syms                     r"rhzCygwinCCompiler.link�s"���	�-�"5�2�6�6�
��I�i�o�2�.�.�	��)�G�M�r�*�*��	����+�,�,�,��
'�
�D�O�
+�
+�t��%�/G�/G��w���w�q�z�2�2�H�(*��(8�(8��� � ��1�1�)3�)3�%�X�}��w�|�|�H�h��.?�@�@�H��w�|�|�H�e�h�.>��.E�F�F�H��r�w�/�/��@�@�@���H�&�
%�
%������$�$�$�$��L�L��h��%9�%��0�
2�
2�
2���)�+�+��$�$�n�h�%?�@�@�@��$�$�g�x�%8�9�9�9�9����x�(�(�(��	'�� � ��&�&�&���4��g��%�y�,�/�� �-���&�	(�	(�	(�	(�	(r$�c�$�|�d}g}|D�]}tj�tj�|����\}}||jddgzvrtd|�d|�d����|rtj�|��}|dvr?|�tj�|||z|j	z������|�tj�|||j	z������|S)	z#Adds supports for rc and res files.Nr|rNrOzunknown file type 'z	' (from 'z'))rOrN)
r`rarc�normcase�src_extensionsrrdrfre�
obj_extension)rF�source_filenames�	strip_dirrl�	obj_names�src_name�baserTs        r"�object_filenamesz CygwinCCompiler.object_filenames�sB�����J��	�(�	K�	K�H���(�(���)9�)9�(�)C�)C�D�D�I�D�#��4�.�%���?�@�@�&�&��s�s�H�H�H�(&�'�'�'��
/��w�'�'��.�.���o�%�%�� � �"�'�,�,�z�.2�S�j�4�;M�.M�#O�#O�P�P�P�P�� � �"�'�,�,�z�/3�d�6H�/H�#J�#J�K�K�K�K��r$�rrr)
NNNNNrNNNN)rr|)�__name__�
__module__�__qualname__�__doc__rBr��static_lib_extension�shared_lib_extension�static_lib_format�shared_lib_format�
exe_extensionr9rYrhr��r$r"r&r&Ws����������M��M���!��!�����M�9-�9-�9-�9-�v
(�
(�
(�FJ�EI�9=�?C�J(�J(�J(�J(�\�����r$r&c��eZdZdZdZdd�ZdS)�Mingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    �mingw32rc�<�t�||||��|jdkrd}nd}|jdkrd}nd}t	��rtd���|�dd	d
d|j�d|�d|���
��g|_t��|_dS)Nr.r/r0r7z--entry _DllMain@12r|z1Cygwin gcc cannot be used with --compiler=mingw32zgcc -O -Wallzgcc -mdll -O -Wallzg++ -O -Wallr,� r1)
r&r9r@r?�is_cygwingccr	rDrCrEr#)rFrGrHrIrL�entry_points      r"r9zMingw32CCompiler.__init__s���� � �$���%�@�@�@��?�f�$�$�%�M�M�+�M���y�(�(�/�K�K��K��>�>�	E� �C�E�E�
E�	
���n�)=�*8�(-�+/�?�?�?�M�M�M�+6�;�(8�		�	9�	9�	9����'�[�[����r$Nr�)r�r�r�r�rBr9r�r$r"r�r�s7���������M�&)�&)�&)�&)�&)�&)r$r��okznot ok�	uncertainc��ddlm}dtjvr	tdfS|���}	t
|��}	d|���vr td|zf|���Std|zf|���S#|���wxYw#t$r}td|�d	|j��fcYd
}~Sd
}~wwxYw)awCheck if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r)�	sysconfig�GCCzsys.version mentions 'GCC'�__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read 'z': N)
�	distutilsr�rrr<�get_config_h_filename�open�read�close�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAIN�strerror)r��fn�config_h�excs    r"r:r:Fs ��*$�#�#�#�#�#�
������8�8�8�
�	(�	(�	*�	*�B�?���8�8��	��X�]�]�_�_�,�,�"�$>��$C�C�
�N�N�����&�'I�B�'N�N��N�N������H�N�N����������?�?�?�"�"�,.�B�B����=�?�	?�	?�	?�	?�	?�	?�����?���sA�B2�!B�$B2�9B�B2�B/�/B2�2
C�<C�C�Cs(\d+\.\d+(\.\d+)*)c��|���d}t|���dSt|dt���j}	|���}|���n#|���wxYwt�|��}|�dSt|�
d�������S)z�Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    rNT)�shell�stdout�)�splitr
rrr�r�r��
RE_VERSION�searchr�group�decode)�cmd�
executable�out�
out_string�results     r"�_find_exe_versionr�ss��������Q��J��z�"�"�*��t�
��4��
-�
-�
-�
4�C���X�X�Z�Z�
��	�	�������	�	��������
�
�
�z�
*�
*�F�
�~��t�����Q���.�.�0�0�1�1�1s�	A2�2Bc�<�gd�}td�|D����S)zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    )zgcc -dumpversionzld -vzdllwrap --versionc�,�g|]}t|����Sr�)r�)�.0r�s  r"�
<listcomp>z get_versions.<locals>.<listcomp>�s!��=�=�=�S�#�C�(�(�=�=�=r$)�tuple)�commandss r"r>r>�s-��
B�A�A�H��=�=�H�=�=�=�>�>�>r$c�r�tddg��}|����d��S)z>Try to determine if the gcc that would be used is from cygwin.r,z-dumpmachinescygwin)r�strip�endswith)r�s r"r�r��s4���u�n�5�6�6�J������&�&�y�1�1�1r$)"r�r`rr]�
subprocessrrr�re�distutils.unixccompilerr�distutils.file_utilr�distutils.errorsrr	r
r�distutils.versionr�distutils.spawnr
r#r&r�r<r�r�r:�compiler�r�r>r�r�r$r"�<module>r�s�����^
�	�	�	�
�
�
�
�����0�0�0�0�0�0�0�0�0�0�	�	�	�	�1�1�1�1�1�1�*�*�*�*�*�*�(�(�(�(�(�(�(�(�(�(�(�(�*�*�*�*�*�*�+�+�+�+�+�+�J�J�J�4w�w�w�w�w�m�w�w�w�t+)�+)�+)�+)�+)��+)�+)�+)�b���� ��)?�)?�)?�V�R�Z�.�
/�
/�
�2�2�2�*?�?�?�2�2�2�2�2r$

Hacked By AnonymousFox1.0, Coded By AnonymousFox