a �DOg)�@s*ddlZddlZGdd�d�Zdd�ZdS)�Nc@seZdZddd�Zdd�ZdS)� ExtensionNcKst|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�|�dS) Nz'name' must be a stringcss|]}t|t�VqdS)N)� isinstance�str)�.0�v�r�+/usr/lib64/python3.9/distutils/extension.py� j�z%Extension.__init__..z#'sources' must be a list of stringsrcSsg|] }t|��qSr)�repr)r�optionrrr� �r z&Extension.__init__..z, zUnknown Extension options: %s)rr�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)�selfrrrrrrrrrrrrrrrr �kw�options�msgrrr�__init__Vs6  �            zExtension.__init__cCsd|jj|jj|jt|�fS)Nz<%s.%s(%r) at %#x>)� __class__� __module__� __qualname__r�id)r&rrr�__repr__�s �zExtension.__repr__)NNNNNNNNNNNNNN)�__name__r,r-r*r/rrrrrs D� /rcCs�ddlm}m}m}ddlm}ddlm}||�}||dddddd�}�zfg}|��} | durd�q�|� | �rpqP| d| dkr�dkr�nn|� d | �qP|| |�} || �} | d} t | g�} d} | dd�D�]�}| dur�| � |�d} q�t j�|�d}|dd �}|d d�}|d v�r2| j� |�q�|d k�rJ| j� |�q�|d k�r�|�d�}|dk�rz| j� |df�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_commentsZ skip_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.sysconfigr1r2r3Zdistutils.text_filer4Zdistutils.utilr5�readline�matchr%r�append�os�path�splitextrr�findrrrrrrrr�close)�filenamer1r2r3r4r5�vars�file� extensions�line�words�module�extZappend_next_wordZword�suffixZswitch�valueZequalsrrr�read_setup_file�s�  �          �           rM)r>r$rrMrrrr�s z