관리-도구
편집 파일: extension.cpython-37.opt-2.pyc
B YI~d) � @ s* d dl Z d dlZG dd� d�Zdd� ZdS )� Nc @ s e Zd Zddd�Zdd� ZdS )� ExtensionNc K s t |t�std��t |t�r.tdd� |D ��s6td��|| _|| _|pHg | _|pRg | _|p\g | _ |pfg | _ |ppg | _|pzg | _| p�g | _ | p�g | _|p�g | _|p�g | _| p�g | _|p�g | _|| _|| _t|�dk�rdd� |D �}d�t|��}d | }t�|� d S ) Nz'name' must be a stringc s s | ]}t |t�V qd S )N)� isinstance�str)�.0�v� r �8/opt/alt/python37/lib64/python3.7/distutils/extension.py� <genexpr>j s z%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsr c S s g | ]}t |��qS r )�repr)r �optionr r r � <listcomp>� s z&Extension.__init__.<locals>.<listcomp>z, zUnknown Extension options: %s)r r �AssertionError�list�all�name�sources�include_dirs� define_macros�undef_macros�library_dirs� libraries�runtime_library_dirs� extra_objects�extra_compile_args�extra_link_args�export_symbols� swig_opts�depends�language�optional�len�join�sorted�warnings�warn)�selfr r r r r r r r r r r r r r r r �kw�options�msgr r r �__init__V s4 zExtension.__init__c C s d| j j| j j| jt| �f S )Nz<%s.%s(%r) at %#x>)� __class__� __module__�__qualname__r �id)r% r r r �__repr__� s zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r+ r, r) r. r r r r r s D !r c C s� ddl m}m}m} ddlm} ddlm} || �}|| dddddd�}�zhg }�x\|�� } | d krfP |� | �rrqT| d | d kr�dkr�n n|� d | � qT|| |�} || �} | d }t|g �}d } �x�| dd � D �]�}| d k r�| �|� d } q�t j�|�d }|dd � }|d d � }|dk�r8|j�|� q�|dk�rP|j�|� q�|d k�r�|�d�}|dk�r�|j�|d f� n$|j�|d|� ||d d � f� q�|dk�r�|j�|� q�|dk�r�|j�|� q�|dk�r�|j�|� q�|dk�r|j�|� q�|dk�r|j�|� q�|dk�r0|j} q�|dk�rB|j} q�|dk�rT|j} q�|dk�rx|j�|� |�s�|j} q�|dk�r�|j�|� q�|� d| � q�W |�|� qTW W d |�� X |S )Nr )�parse_makefile�expand_makefile_vars�_variable_rx)�TextFile)�split_quoted� )Zstrip_commentsZskip_blanksZ join_linesZ lstrip_wsZ rstrip_ws����*z'%s' lines not handled yet� )z.cz.ccz.cppz.cxxz.c++z.mz.mmz-Iz-D�=z-Uz-Cz-lz-Lz-Rz-rpathz-Xlinkerz -Xcompilerz-u)z.az.soz.slz.oz.dylibzunrecognized argument '%s')Zdistutils.sysconfigr0 r1 r2 Zdistutils.text_filer3 Zdistutils.utilr4 �readline�matchr$ r �append�os�path�splitextr r �findr r r r r r r r �close)�filenamer0 r1 r2 r3 r4 �vars�file� extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsr r r �read_setup_file� s� rJ )r= r# r rJ r r r r �<module> s z