+
    Xj                        R t ^ RIt^ RIt^ RIt^ RIt^RIHt R tR tR t	R t
R tR tR	 tR
 tR t]P                   ! ]! 4       RR7      t]P%                  RR7      t]P)                  RRR7      t]P-                  RRRR7       ]P-                  R]P.                  ! RRR7      RR7       ]P-                  RRR7       ]P)                  RR R7      t]P-                  R!R"R7       ]P-                  R#]P.                  ! RRR7      R$R7       ]P-                  R%]P.                  ! RRR7      R&R7       ]P-                  RRR7       R(R' ltR# ))a  Implementation of the ``cffi-gen-src`` command-line tool.

This module is private; the command line is the only supported
interface. Two subcommands:

``exec-python``
    Execute a Python script that constructs a :class:`cffi.FFI`
    (the same kind of script that the CFFI docs' "Main mode of usage"
    describes) and emit the generated C source.

``read-sources``
    Create the :class:`cffi.FFI` from a separate ``cdef`` file and C
    source prelude, then emit the generated C source.
N)FFIc                 8    \        WR R7      p\        W2V4       R# )exec)sourcefilenamemodeN)compiler   )pysrcr   globscompileds   &&& n   /Users/wind/Downloads/Coruna-main学习资料A/backend/venv/lib/python3.14/site-packages/cffi/_cffi_gen_src.py	_execfiler   3   s    eVDH%     c                L   \         P                  P                  V4      pRRRV/p\        P                  R,          p\        P                  P	                  ^ \         P                  P                  V4      4        \        WV4       W#9  d   \        RV: R24      hW2,          p\        V\        4      '       g   \        V4      '       d   V! 4       p\        V\        4      '       g   \        RV: R24      hVV\        P                  R&   #   T\        P                  R&   i ; i)	a  Execute ``pysrc`` and return the :class:`FFI` object it defines.

The script is executed with ``__name__`` set to ``"cffi.gen_src"``,
so a trailing ``if __name__ == "__main__": ffibuilder.compile()``
block in the script is skipped.

``ffivar`` is the name bound by the script to the :class:`FFI`
object, or to a callable that returns one.

Raises :class:`NameError` if the name is not bound by the script,
or :class:`TypeError` if the name does not resolve to an
:class:`FFI` instance.
__name__zcffi.gen_src__file__:NNNz.Expected to find the FFI object with the name z, but it was not found.zFound an object with the name z+ but it was not an instance of cffi.api.FFI)ospathabspathsysinsertdirnamer   	NameError
isinstancer   callable	TypeError)r	   r   ffivarr
   old_pathffis   &&&   r   find_ffi_in_python_scriptr   8   s     wwx(HX>Exx{HHHOOArwwx01%5)+14  m#s##%C#s##.47  hs   ;A?D D#c                ^    \        4       pVP                  V4       VP                  W4       V# )zACreate an :class:`FFI` from ``cdef`` text and a C source prelude.)r   cdef
set_source)
modulenamer!   csrc
ffibuilders   &&& r   make_ffi_from_sourcesr&   _   s)    JOOD*+r   c                n    \         P                  ! 4       pV P                  V4       VP                  4       # )z=Return the C source that :meth:`FFI.emit_c_code` would write.)ioStringIOemit_c_codegetvalue)r   outputs   & r   generate_c_sourcer-   g   s&    [[]FOOF??r   c                     V R 8X  d"   \         P                  P                  V4       R# \        V RRR7      ;_uu_ 4       pVP                  V4       RRR4       R#   + '       g   i     R# ; i)-Nwutf-8encoding)r   stdoutwriteopen)r,   	generatedfs   && r   write_c_sourcer9   n   sJ    }

#	fcG	,	,		 
-	,	,	,s   AA,	c                     WJ d   R #  \         P                  P                  V P                  VP                  4      #   \         d     R# i ; i)TF)r   r   samefilenameOSError)file1file2s   &&r   same_input_filer@   v   s@    ~ww

EJJ77 s   3= AAc                     V;_uu_ 4        \        VP                  4       VP                  V4      pR R R 4       \        X4      p\	        W4       R #   + '       g   i     L(; iN)r   readr<   r-   r9   )r,   pyfileffi_varr   r7   s   $$$  r   exec_pythonrF      s>    	'v{{GL 
!#&I6% 
s   &AA!	c           	      $   T;_uu_ 4        V;_uu_ 4        VP                  4       pVP                  4       pR R R 4       R R R 4       \        VXX4      p\        V4      p\        W4       R #   + '       g   i     L=; i  + '       g   i     LH; irB   )rC   r&   r-   r9   )r,   module_name
cdef_input
csrc_inputr$   r!   r   r7   s   $$$$    r   read_sourcesrK      sY    	ZZ      T4
8C!#&I6%  Zs!   A?!A,	A?,A<7A??B	c                      \         P                  '       d5   \        P                  P	                  \         P                  ^ ,          4      MRp V P                  R4      '       d   R# R# )     zcffi-gen-srczpython -m cffi.gen_src)r   argvr   r   basename
startswith)argv0s    r   _progrS      sA     .1XXXBGGSXXa[)2E''#r   z-Generate CFFI C source for extension modules.)progdescriptionr   )destexec-pythonz2Execute a Python script that defines an FFI object)helpz	--ffi-varr%   zFName of the FFI object in the Python script; defaults to 'ffibuilder'.)defaultrX   rD   rr1   r2   zPath to the Python script)typerX   r,   zOutput path for the C sourceread-sourcesz>Read cdef and C source prelude files that define an FFI objectrH   z5Full name of the generated module, including packagesr!   zFile containing C definitionsr$   z File containing C source preludec                 
   \         P                  V R 7      p V P                  R8X  d.   \        V P                  V P
                  V P                  R7       MV P                  R8X  dt   \        V P                  V P                  4      '       d   \         P                  R4       \        V P                  V P                  V P                  V P                  R7       M\         P                  R4       \         P                  ^ 4       R# )argsrW   )r,   rD   rE   r\   z1cdef and csrc are the same file and should not be)r,   rH   rI   rJ   z5a subcommand is required: exec-python or read-sourcesN)parser
parse_argsr   rF   r,   rD   rE   r@   r!   r$   errorrK   rH   exitr^   s   &r   runrd      s    $'DyyM!4;;t{{DLLQ	n	$499dii00LLLM;;((yyyy		
 	LM
KKNr   rB   )__doc__argparser(   r   r   apir   r   r   r&   r-   r9   r@   rF   rK   rS   ArgumentParserr`   add_subparsers
subparsers
add_parserexec_python_parseradd_argumentFileTyperead_sources_parserrd    r   r   <module>rq      s  8  	 	 
 !
$N&&$ 
	 	 	?
 """/
**	= +     	Q   
   			3	1	$   
   	'   
 !++	I ,       	@ !      
			3	1	( ! 
     
			3	1	+ ! 
     	' ! r   