Your IP : 18.117.104.132
a
R�f) � @ 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/python39/lib64/python3.9/distutils/extension.py� <genexpr>j � z%Extension.__init__.<locals>.<genexpr>z#'sources' must be a list of stringsr c S s g | ]}t |��qS r )�repr)r Zoptionr r r �
<listcomp>� r
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 �kwZoptions�msgr r r �__init__V s6
�
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�}�zfg }|�� } | d u rd�q�|� | �rpqP| d | d kr�dkr�n n|�
d | � qP|| |�} || �}
|
d }t|g �}d }
|
dd � D �]�}|
d ur�|
�|� d }
q�t
j�|�d }|dd
� }|d
d � }|dv �r2|j�|� q�|dk�rJ|j�|� q�|d
k�r�|�d�}|dk�rz|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�r*|j}
q�|dk�r<|j}
q�|dk�rN|j}
q�|dk�rr|j�|� |�s�|j}
q�|dv �r�|j�|� q�|�
d| � q�|�|� qPW |�� n
|�� 0 |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.sysconfigr/ r0 r1 Zdistutils.text_filer2 Zdistutils.utilr3 �readline�matchr$ r �append�os�path�splitextr r �findr r r r r r r r �close)�filenamer/ r0 r1 r2 r3 �vars�file�
extensions�lineZwords�moduleZextZappend_next_wordZword�suffixZswitch�valueZequalsr r r �read_setup_file� s� �
�
rI )r<