Your IP : 216.73.216.60


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/cffi/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/cffi/__pycache__/ffiplatform.cpython-35.pyc



.�W�@s,ddlZddlZGdd�de�ZGdd�de�Zdddd	d
gZfdd�Zddd
d�Zdddd�Zyddl	m
Z
Wnek
r�dd�Z
YnXdd�Zye
efZddlZWn$ek
re
ZddlZYnXdd�Zdd�ZdS)�Nc@seZdZdZdS)�VerificationErrorz- An error raised when verification fails
    N)�__name__�
__module__�__qualname__�__doc__�rr�C/opt/alt/python35/lib64/python3.5/site-packages/cffi/ffiplatform.pyrsrc@seZdZdZdS)�VerificationMissingzl An error raised when incomplete structures are passed into
    cdef, but no verification has been done
    N)rrrrrrrrr	sr	�sources�include_dirs�library_dirs�
extra_objects�dependscKsYddlm}|g}x'|D]}|jtjj|��q W|d|d||�S)Nr)�	Extension�namer
)�distutils.corer�append�os�path�normpath)Zsrcfilename�modnamer
�kwdsrZ
allsources�srcrrr�
get_extensions
	
rc
Cs�tjj�}z+t||||�}tjj|�}Wdx?|j�D]1\}}tjj|�|krJ|tj|<qJWX|S)z-Compile a C extension module using distutils.N)r�environ�copy�_buildr�abspath�items�get)�tmpdir�ext�compiler_verbose�debugZ
saved_environZoutputfilename�key�valuerrr�compilesr&cCsqddlm}ddl}ddl}|d|gi�}|j�|jd�}|dkrntjj}d|f|d<d|d<d|f|d	<d|f|d
<yo|j	j
d�p�d}z?|j	j|�|jd�|j
d�}	|	j�\}
Wd|j	j
|�XWnS|jj|jjfk
rl}z!td|jj|f��WYdd}~XnX|
S)
Nr)�Distribution�ext_modules�	build_ext�ffiplatformr#T�force�	build_lib�
build_tempz%s: %s)r*T)rr'�distutils.errorsZ
distutils.log�parse_config_files�get_option_dict�sys�flagsr#�log�
set_threshold�
set_verbosity�run_command�get_command_obj�get_outputs�errors�CompileError�	LinkErrorr�	__class__r)r r!r"r#r'�	distutils�dist�optionsZ	old_level�cmd_objZsoname�errrr's.



/r)�samefilecCs"tjj|�tjj|�kS)N)rrr)�f1�f2rrrrBHsrBcCs�tjj|�s|S|}g}x�|}tjj|�\}}||ksV|rZ|S|j|�y0t|tj�r�|j�tjj|�SWq%t	k
r�Yq%Xq%WdS)N)
rr�isabs�splitrrB�curdir�reverse�join�OSError)r�dir�namesZprevdirrrrr�maybe_relative_pathKs 


rMcCs#t|t�r/|jdt|�|f�n�t|t�r�t|j��}|jdt|��x�|D]$}t||�t|||�qnWn�t|tt	f�r�|jdt|��xW|D]}t||�q�Wn9t|t
�r|jd|f�ntd|f��dS)Nz%ds%sz%ddz%dlz%diz7the keywords to verify() contains unsupported object %r)�
isinstance�str�write�len�dict�sorted�keys�_flatten�list�tuple�int_or_long�	TypeError)�x�frTr$r%rrrrUfs  


rUcCs#tj�}t||�|j�S)N)�	cStringIO�StringIOrU�getvalue)rZr[rrr�flattenys
r_)r1r�	Exceptionrr	ZLIST_OF_FILE_NAMESrr&r�os.pathrB�ImportErrorrM�int�longrXr\�	NameError�iorUr_rrrr�<module>s(