관리-도구
편집 파일: setuptools_ext.cpython-36.pyc
3 M��Z � @ sn d dl Z d dlZye W n ek r0 eZY nX dd� Zdd� Zdd� Zdd � Zd d� Z dd � Z dd� ZdS )� Nc C s ddl m} || ��d S )Nr )�DistutilsSetupError)Zdistutils.errorsr )�msgr � r �&/usr/lib64/python3.6/setuptools_ext.py�error s r c C s@ t | ��}|j� }W d Q R X |d7 }t|| d�}t|||� d S )N� �exec)�open�read�compiler )�filenameZglob�f�src�coder r r �execfile s r c C s� ddl m} t|t�s*tdt|�jf � t|�}y|jd�\}}W n" t k rf td|f � Y nX t jj|�s�d}|j dd�d }t jj|�r�d |d | f }td||f � d|d �}t||� y|| }W n$ tk r� td||f � Y nX t||��s|� }t||��s0td|t|�jf � t|d��sJtd|f � |j\} } }}|j�rr|j� }|j|� | d k�r�t| || � nt| || | ||� d S )Nr )�FFIzEargument to 'cffi_modules=...' must be a str or a list of str, not %r�:z3%r must be of the form 'path/build.py:ffi_variable'� �.�/z.pyz (rewrite cffi_modules to [%r])z#%r does not name an existing file%sZ__cffi__)�__name__�__file__z!%r: object %r not found in modulez"%r is not an FFI instance (got %r)�_assigned_sourcez*%r: the set_source() method was not called)Zcffi.apir � isinstance� basestringr �typer �str�split� ValueError�os�path�exists�replacer �KeyError�hasattrr Z_windows_unicode�copyZ_apply_windows_unicode�_add_py_module� _add_c_module) �distZmod_specr Zbuild_file_nameZffi_var_name�extZ rewrittenZmod_vars�ffi�module_name�source�source_extension�kwdsr r r �add_cffi_module sL r/ c C sp d|krlt td� rltjdkrlddl}y(t|jjd�d �}|dkrLd|d<