관리-도구
편집 파일: config.cpython-311.opt-1.pyc
� c��f=3 � �x � d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddd �Z G d � de� � Zd d�Z dS )a� distutils.command.config Implements the Distutils 'config' command, a (mostly) empty command class that exists mainly to be sub-classed by specific module distributions and applications. The idea is that while every "config" command is different, at least they're all named the same, and users always see "config" in the list of standard commands. Also, this is a good place to put common configure-like tasks: "try to compile this C code", or "figure out where this header file lives". � N)�Command)�DistutilsExecError)�customize_compiler)�logz.cz.cxx)�czc++c � � e Zd ZdZg d�Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z dd�Z dd�Zdd�Z dd�Z dd�Z dd�Zdddg fd�Z dd�ZdS )�configzprepare to build) )z compiler=Nzspecify the compiler type)zcc=Nzspecify the compiler executable)z include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z libraries=�lz!external C libraries to link with)z library-dirs=�Lz.directories to search for external C libraries)�noisyNz1show every action (compile, link, run, ...) taken)zdump-sourceNz=dump generated source files before attempting to compile themc �v � d | _ d | _ d | _ d | _ d | _ d| _ d| _ g | _ d S )N� )�compiler�cc�include_dirs� libraries�library_dirsr �dump_source� temp_files��selfs �?/opt/alt/python311/lib64/python3.11/distutils/command/config.py�initialize_optionszconfig.initialize_options3 sE � ��� ���� ������ ��� �� ���� ����� c �� � | j �| j j pg | _ nCt | j t � � r)| j � t j � � | _ | j �g | _ n't | j t � � r | j g| _ | j � g | _ d S t | j t � � r+| j � t j � � | _ d S d S �N) r �distribution� isinstance�str�split�os�pathsepr r r s r �finalize_optionszconfig.finalize_optionsB s� � ���$� $� 1� >� D�"�D��� ��)�3� /� /� D� $� 1� 7� 7�� � C� C�D���>�!��D�N�N� ���� ,� ,� .�"�n�-�D�N���$� "�D���� ��)�3� /� /� D� $� 1� 7� 7�� � C� C�D���� D� Dr c � � d S r � r s r �runz config.runR s � ��r c � � ddl m}m} t | j |� � s� || j | j d�� � | _ t | j � � | j r| j � | j � � | j r| j � | j � � | j r#| j � | j � � dS dS dS )z^Check that 'self.compiler' really is a CCompiler object; if not, make it one. r )� CCompiler�new_compilerr )r �dry_run�forceN) �distutils.ccompilerr+ r, r! r r- r r �set_include_dirsr � set_librariesr �set_library_dirs)r r+ r, s r �_check_compilerzconfig._check_compilerY s� � � @�?�?�?�?�?�?�?��$�-��3�3� B�(�L�$�-�15��Q�H� H� H�D�M��t�}�-�-�-�� � B�� �.�.�t�/@�A�A�A��~� <�� �+�+�D�N�;�;�;�� � B�� �.�.�t�/@�A�A�A�A�A� B� B� B� Br c �J � dt | z }t |d� � 5 }|r2|D ]}|� d|z � � �|� d� � |� |� � |d dk r|� d� � d d d � � n# 1 swxY w Y |S )N�_configtest�wz#include <%s> � ���)�LANG_EXT�open�write)r �body�headers�lang�filename�file�headers r �_gen_temp_sourcefilezconfig._gen_temp_sourcefilek s� � � �8�D�>�1�� �(�C� � � !�D�� !�%� ;� ;�F��J�J�0�6�9�:�:�:�:�� � �4� � � ��J�J�t�����B�x�4���� � �4� � � � !� !� !� !� !� !� !� !� !� !� !���� !� !� !� !� �s �A+B�B�Bc � � | � |||� � }d}| j � ||g� � | j � |||�� � ||fS )Nz _configtest.i�r )rB r �extendr � preprocess)r r<