o
     `                     @   s   d dl mZmZmZ d dlZd dlZd dlmZ d dlm	Z	 d dl
mZ ejejejeZi ZeejeddZee e W d   n1 sPw   Y  g g g fdd	Zg g g fd
dZdd Zdd ZdS )    )absolute_importdivisionprint_functionN)new_compiler)Distribution)FFIcryptographyz__about__.pyc                 C   s   g }g }g }g }	|D ]'}
t ||
  tj||
  }||j ||j ||j |	|j q
d||	 }t	| d|| ||||d}|S )a  
    Modules listed in ``modules`` should have the following attributes:

    * ``INCLUDES``: A string containing C includes.
    * ``TYPES``: A string containing C declarations for types.
    * ``FUNCTIONS``: A string containing C declarations for functions & macros.
    * ``CUSTOMIZATIONS``: A string containing arbitrary top-level C code, this
        can be used to do things like test for a define and provide an
        alternate implementation based on that.
    
)cdef_sourceverify_source	librariesextra_compile_argsextra_link_args)

__import__sysmodulesappendZTYPESZ	FUNCTIONSZINCLUDESZCUSTOMIZATIONSjoin	build_ffi)module_namemodule_prefixr   r   r   r   typesincludesZ	functionsZcustomizationsnamemoduler   ffi r   m/home/ych/rk3568/buildroot/output/rockchip_rk3568/build/host-python-cryptography-3.3.2/src/_cffi_src/utils.pybuild_ffi_for_binding   s*   	r   c                 C   sB   t  }|d7 }|dtd 7 }|| |j| ||||d |S )Nz7
static const char *const CRYPTOGRAPHY_PACKAGE_VERSION;z*
#define CRYPTOGRAPHY_PACKAGE_VERSION "{}"__version__)r   r   r   )r   formataboutcdef
set_source)r   r
   r   r   r   r   r   r   r   r   r   B   s   
r   c                 C   s   | dkrddgS g S )Nmsvcz	/NXCOMPATz/DYNAMICBASEr   )compiler_typer   r   r   r   [   s   r   c                  C   s2   t  } |   | d}|  t|jd}|jS )z}
    Gets the compiler type from distutils. On Windows with MSVC it will be
    "msvc". On macOS and linux it is "unix".
    build)compiler)r   parse_config_filesget_command_objensure_finalizedr   r'   r%   )distcmdr'   r   r   r   r%   d   s   
r%   )
__future__r   r   r   osr   distutils.ccompilerr   distutils.distr   cffir   pathdirnameabspath__file__Zbase_srcr!   openr   fexecreadr   r   r   r%   r   r   r   r   <module>   s*   
0
	