U vf" @ sn d dl Z d dlZze 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)cffi._shimmed_dist_utilsr )msgr r F/opt/alt/python38/lib64/python3.8/site-packages/cffi/setuptools_ext.pyerror s r c C s@ t | }| }W 5 Q R X |d7 }t|| d}t||| d S )N exec)openreadcompiler )filenameglobfsrccoder r r execfile s r c C s ddl m} t|ts*tdt|jf t|}z|d\}}W n" t k rf td|f Y nX t j|sd}| ddd }t j|rd |d | f }td||f d|d }t|| z|| }W n$ tk r td||f Y nX t||s| }t||s0td|t|jf t|dsJtd|f |j\} } }}|jrr| }|| | d krt| || 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' ./.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 strsplit ValueErrorospathexistsreplacer KeyErrorhasattrr Z_windows_unicodecopyZ_apply_windows_unicode_add_py_module _add_c_module) distZmod_specr Zbuild_file_nameZffi_var_nameextZ rewrittenZmod_varsffimodule_namesourcesource_extensionkwdsr r r add_cffi_module sV r2 c C sv ddl m} d|krrttdsr|jrrddl}z(t|jdd }|dkrRd|d<