HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-311.pyc
�

�nc�0����dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
mZmZmZddlmZmZd�Zd	ZGd
�de	��ZGd�d
e��ZdZdZdZd�Zd�ZdZdS)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)�check_output)�
UnixCCompiler)�
write_file)�DistutilsExecError�DistutilsPlatformError�CCompilerError�CompileError)�LooseVersion�suppress_known_deprecationc�h�tj�d��}|dkr�tj|dz|dz�}|dkrdgS|dkrdgS|d	krd
gS|dkrdgS|d
krdgS|dkrdgS|dkrdgSdt|��cxkrdkrnnddgSt	d|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�msvcr100�1700�msvcr110�1800�msvcr120ili��ucrt�vcruntime140zUnknown MS Compiler version %s N)�sys�version�find�int�
ValueError)�msc_pos�msc_vers  �GD:\Python311\Lib\site-packages\setuptools/_distutils/cygwinccompiler.py�	get_msvcrr(sG���k���x�(�(�G��"�}�J��+�g��k�G�b�L�8�9���f��	J��;��
��
�	J��;��
��
�	J��;��
��
�	J��;��
��
�
	J��<��
��
�
	J��<��
��
�	J��<��
�S��\�\�	J�	J�	J�	J�D�	J�	J�	J�	J�	J��N�+�+��>��H�I�I�I�7J�J�zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc���eZdZdZdZdZdZdZdZdZ	dZ
dZd	Zd�fd�	Z
ed���Zd
�Z										dd�Zd�Z�fd�Ze�fd���Z�xZS)�CygwinCCompilerz9Handles the Cygwin port of the GNU C compiler to Windows.�cygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exerc
���t���|||��t��\}}|�d�||����|t
ur|�d|z��tj�	dd��|_
tj�	dd��|_|j
|_d}|�
d|j
zd	|j
zd|jzd
|j
zd�|j|�����t��|_dS)
Nz%Python's GCC status: {} (details: {})z�Python's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.�CC�gcc�CXXzg++�-sharedz%s -mcygwin -O -Wallz%s -mcygwin -mdll -O -Wallz%s -mcygwinz{} -mcygwin {}��compiler�compiler_so�compiler_cxx�
linker_exe�	linker_so)�super�__init__�check_config_h�debug_print�format�CONFIG_H_OK�warn�os�environ�get�cc�cxx�
linker_dll�set_executablesr(�
dll_libraries)�self�verbose�dry_run�force�status�details�
shared_option�	__class__s       �r'r9zCygwinCCompiler.__init__Qs9���
������'�5�1�1�1�(�*�*�������3�:�:�6�7�K�K�	
�	
�	
���$�	��I�I�O�QX�Y�
�
�
��*�.�.��u�-�-����:�>�>�%��/�/����'���!�
����+�d�g�5�4�t�w�>�/�$�(�:�$�t�w�.�'�.�.�t��
�N�N�	�	
�	
�	
�'�[�[����r)c��tjdtd���t��5t	d��cddd��S#1swxYwYdS)Nz�gcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.�)�
stacklevelz11.2.0)�warningsr>�DeprecationWarningrr
)rGs r'�gcc_versionzCygwinCCompiler.gcc_versionrs���	�
�
X���		
�	
�	
�	
�(�
)�
)�	*�	*���)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�	*�	*s�A�A�Ac�*�|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	r4)rG�obj�src�ext�cc_args�extra_postargs�pp_opts�msgs        r'�_compilezCygwinCCompiler._compile�s����%�<�	(�3�&�=�	(�
(��
�
�I�t�S�$��<�=�=�=�=�=��%�
(�
(�
(�"�3�'�'�'�����
(����
(��
�
��$�w�.�#�t�S�1A�A�N�R�������&�
(�
(�
(�"�3�'�'�'�����
(���s,�*�
A�A�A�&A4�4
B�>B
�
BNc��tj|
pg��}
tj|pg��}tj|pg��}|r|�t��|�|j��|��||jks|jdkr�tj�	|d��}tj�
tj�|����\}}tj�||dz��}dtj�|��zdg}|D]}|�
|���|�t||fd|z��|�
|��|	s|
�
d��t!j||||||||d|	|
|||
��dS)	zLink the objects.Nr/rz.defz
LIBRARY %s�EXPORTSz
writing %sz-s)�copyr>�_runtime_library_dirs_msg�extendrF�
EXECUTABLErDr?�path�dirname�splitext�basename�join�append�executerr�link)rG�target_desc�objects�output_filename�
output_dir�	libraries�library_dirs�runtime_library_dirs�export_symbols�debug�
extra_preargsr^�
build_temp�target_lang�temp_dir�dll_name�
dll_extension�def_file�contents�syms                    r'rozCygwinCCompiler.link�s���$�	�-�"5�2�6�6�
��I�i�o�2�.�.�	��)�G�M�r�*�*���	1��I�I�/�0�0�0�	����+�,�,�,�
�	%��4�?�*�	%�.2�o��.F�	%��w���w�q�z�2�2�H�(*��(8�(8��� � ��1�1�)�)�%�X�}�
�w�|�|�H�h��.?�@�@�H�%�r�w�'7�'7��'H�'H�H�)�T�H�%�
%�
%������$�$�$�$��L�L��h��%9�<�(�;R�S�S�S�

�N�N�8�$�$�$��	'�� � ��&�&�&���������� �������	
�	
�	
�	
�	
r)c�:�|�t��gS�N)r>re�rG�dirs  r'�runtime_library_dir_optionz*CygwinCCompiler.runtime_library_dir_option�s��	
�	�	�+�,�,�,��	r)c���tj�|��}t���|||��Sr�)r?rh�normcaser8�_make_out_path)rGrs�	strip_dir�src_name�
norm_src_namerNs     �r'r�zCygwinCCompiler._make_out_path�s4�����(�(��2�2�
��w�w�%�%�j�)�]�K�K�Kr)c�L���it��j��fd�dD���S)z3
        Add support for rc and res files.
        c�&��i|]
}||�jz��S�)�
obj_extension)�.0r\rGs  �r'�
<dictcomp>z2CygwinCCompiler.out_extensions.<locals>.<dictcomp>s#���H�H�H��s�C�$�,�,�H�H�Hr))rWrV)r8�out_extensions)rGrNs`�r'r�zCygwinCCompiler.out_extensions�s9����

��g�g�$�
�H�H�H�H��H�H�H�
�	
r)�rrr)
NNNNNrNNNN)�__name__�
__module__�__qualname__�__doc__�
compiler_typer��static_lib_extension�shared_lib_extension�dylib_lib_extension�static_lib_format�shared_lib_format�dylib_lib_format�
exe_extensionr9�propertyrTraror�r�r��
__classcell__�rNs@r'r+r+Ds,�������C�C��M��M���#�� ��!��!�� ���M�)�)�)�)�)�)�B�*�*��X�*�(�(�(�*���!�������X
�X
�X
�X
�t���L�L�L�L�L�
�
�
�
�
��X�
�
�
�
�
r)r+c�.��eZdZdZdZd�fd�	Zd�Z�xZS)�Mingw32CCompilerz:Handles the Mingw32 port of the GNU C compiler to Windows.�mingw32rc
�r��t���|||��d}t|j��rt	d���|�d|jzd|jzd|jzd|jzd�|j|�����g|_	t��|_	dS)Nr1z1Cygwin gcc cannot be used with --compiler=mingw32z%s -O -Wallz%s -mdll -O -Wallz%sz{} {}r2)r8r9�is_cygwinccrBrrErCr<rDrFr()rGrHrIrJrMrNs     �r'r9zMingw32CCompiler.__init__
s����
������'�5�1�1�1�!�
��t�w���	V� �!T�U�U�U����"�T�W�,�+�d�g�5�&���1��d�g�~��n�n�T�_�m�D�D�	�	
�	
�	
� ���'�[�[����r)c�*�tt���r�)rrer�s  r'r�z+Mingw32CCompiler.runtime_library_dir_option&s��$�%>�?�?�?r)r�)r�r�r�r�r�r9r�r�r�s@r'r�r�s^�������D�D��M�)�)�)�)�)�)�8@�@�@�@�@�@�@r)r��okznot ok�	uncertainc��ddlm}dtjvr	tdfSdtjvr	tdfS|���}	t
|��}	d|���vr td|zf|���Std	|zf|���S#|���wxYw#t$r,}td
�||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'�Clangzsys.version mentions 'Clang'�__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '{}': {}N)�	distutilsr�r r!r=�get_config_h_filename�open�read�close�CONFIG_H_NOTOK�OSError�CONFIG_H_UNCERTAINr<�strerror)r��fn�config_h�excs    r'r:r:3s;��*$�#�#�#�#�#�
����9��8�8�8��#�+��;��:�:�:�
�	(�	(�	*�	*�B�
W���8�8��	��X�]�]�_�_�,�
O�"�$>��$C�C�
�N�N�����&�'I�B�'N�N��N�N������H�N�N����������W�W�W�"�$<�$C�$C�B���$U�$U�V�V�V�V�V�V�V�����W���sB�
C	�!B0�;C	�B0�C	�0C�C	�	
C?�!C:�4C?�:C?c��ttj|��dgz��}|����d��S)zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachinescygwin)r�shlex�split�strip�endswith)rB�
out_strings  r'r�r�bs?���e�k�"�o�o��0@�@�A�A�J������&�&�y�1�1�1r))r�r?r rdr�rR�
subprocessr�distutils.unixccompilerr�distutils.file_utilr�distutils.errorsrrrr	�distutils.versionr
rr(rer+r�r=r�r�r:r��get_versionsr�r)r'�<module>r�s�����
�	�	�	�
�
�
�
�������������#�#�#�#�#�#�1�1�1�1�1�1�*�*�*�*�*�*�������������G�F�F�F�F�F�F�F� J� J� J�HI��}
�}
�}
�}
�}
�m�}
�}
�}
�B"@�"@�"@�"@�"@��"@�"@�"@�R���� ��,W�,W�,W�^2�2�2����r)