관리-도구
편집 파일: cygwinccompiler.cpython-312.pyc
� t��e�. � �> � d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddlmZ ddl mZmZmZmZ ddlmZmZ dd lmZ ej. d gdgdgd gdgdgdgdgej0 d� � Zd� ZdZ G d� de � Z G d� de� ZdZdZdZ d� Z!d� Z"dZ#y)a distutils.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_deprecation)�RangeMap�msvcr70�msvcr71�msvcr80�msvcr90�msvcr100�msvcr110�msvcr120�vcruntime140) i i ix i� i@ i� i il i� c �� � t j dt j � } t | j d� � } t | S # t $ r Y yw xY w# t $ r t d|z � �w xY w)zaInclude the appropriate MSVC runtime library if Python was built with MSVC 7.0 or later. zMSC v\.(\d{4})r NzUnknown MS Compiler version %s ) �re�search�sys�version�int�group�AttributeError� _msvcr_lookup�KeyError� ValueError)�match�msc_vers ��/builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/_distutils/cygwinccompiler.py� get_msvcrr$ 4 sx � � �I�I�'����5�E���e�k�k�!�n�%��F��W�%�%�� � ���� � F��:�W�D�E�E�F�s �A �A � A�A�A1zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc � � � e Zd ZdZdZdZdZdZdZdZ dZ dZd Zd� 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.exec �\ �� t �| � |||� t � \ }}| j dj ||� � |t ur| j d|z � t j j dd� | _ t j j dd� | _ | j | _ d}| j d| j z d | j z d| j z d | j z dj | j |� �� t � | _ y ) 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# r4 zCygwinCCompiler.__init__V s �� � ����'�5�1�(�*�������3�:�:�6�7�K� � ��$��I�I�O�QX�Y� � �*�*�.�.��u�-����:�:�>�>�%��/����'�'���!� ����+�d�g�g�5�4�t�w�w�>�/�$�(�(�:�$�t�w�w�.�'�.�.�t��� �N� � � '�[��� c � � t j dt d�� t � 5 t d� cd d d � S # 1 sw Y y xY w)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)�warningsr9 �DeprecationWarningr r )rB s r# �gcc_versionzCygwinCCompiler.gcc_versionv sA � � � � � X��� � (� )� *���)� *� *� *�s �<�Ac � � |dv r | j dd|d|g� y | j | j |z |d|gz |z � y# t $ r}t |� �d}~ww xY w# t $ r}t |� �d}~ww xY w)z:Compiles the source by spawning GCC and windres if needed.)�.rc�.res�windresz-iz-oN)�spawnr r r/ )rB �obj�src�ext�cc_args�extra_postargs�pp_opts�msgs r# �_compilezCygwinCCompiler._compile� s� � ��/�!� (�� � �I�t�S�$��<�=� (�� � ��$�$�w�.�#�t�S�1A�A�N�R��� &� (�"�3�'�'�� (�� &� (�"�3�'�'�� (�s. �A �'A"