
    Ng0                     N   d dl mZ d dlZd dlZd dlmZmZmZ ddlm	Z	 ej
        dk     reZ G d de          Z G d	 d
e          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Zd Zd Zd ZdS )    )absolute_importN)ArgumentParserActionSUPPRESS   )Options)   r	   c                       e Zd ZddZdS )ParseDirectivesActionNc                     t          t          || j        t          j                                        }t          j        |d|          }t          || j        |           d S )NT)relaxed_boolcurrent_settings)dictgetattrdestr   get_directive_defaultsparse_directive_listsetattr)selfparser	namespacevaluesoption_stringold_directives
directivess          S/var/www/html/ai-engine/env/lib/python3.11/site-packages/Cython/Compiler/CmdLine.py__call__zParseDirectivesAction.__call__   sn    gi&-&D&F&FH H I I1H H H
	49j11111    N__name__
__module____qualname__r    r   r   r   r      s(        2 2 2 2 2 2r   r   c                       e Zd ZddZdS )ParseOptionsActionNc                 "   t          t          || j        i                     }|                    d          D ]?}d|v r0|                    dd          \  }}|                                dv}n|d}}|||<   @t          || j        |           d S )N,=r   )falsef0noT)r   r   r   splitlowerr   )	r   r   r   r   r   optionsoptnvs	            r   r   zParseOptionsAction.__call__   s    wy$)R8899<<$$ 	 	Cczzyya((1GGII%>>D1GAJJ	49g.....r   r   r    r$   r   r   r&   r&      s(        	/ 	/ 	/ 	/ 	/ 	/r   r&   c                       e Zd ZddZdS )ParseCompileTimeEnvActionNc                     t          t          || j        i                     }t          j        ||          }t          || j        |           d S )N)r   )r   r   r   r   parse_compile_time_envr   )r   r   r   r   r   old_envnew_envs          r   r   z"ParseCompileTimeEnvAction.__call__)   sL    wy$)R88990'RRR	49g.....r   r   r    r$   r   r   r5   r5   (   s(        / / / / / /r   r5   c                       e Zd ZddZdS )ActivateAllWarningsActionNc                 t    t          |di           }|                    t          j                   ||_        d S )Ncompiler_directives)r   updater   extra_warningsr=   )r   r   r   r   r   r   s         r   r   z"ActivateAllWarningsAction.__call__0   s9    Y(=rBB
'0111(2	%%%r   r   r    r$   r   r   r;   r;   /   s(        3 3 3 3 3 3r   r;   c                       e Zd ZddZdS )SetLenientActionNc                 "    d|_         d|_        d S )NF)error_on_unknown_nameserror_on_uninitializedr   r   r   r   r   s        r   r   zSetLenientAction.__call__7   s    +0	(+0	(((r   r   r    r$   r   r   rA   rA   6   (        1 1 1 1 1 1r   rA   c                       e Zd ZddZdS )SetGDBDebugActionNc                 6    d|_         t          j        |_        d S NT)	gdb_debugoscurdir
output_dirrE   s        r   r   zSetGDBDebugAction.__call__=   s    "	!y	r   r   r    r$   r   r   rH   rH   <   s(        ) ) ) ) ) )r   rH   c                       e Zd ZddZdS )SetGDBDebugOutputActionNc                 "    d|_         ||_        d S rJ   )rK   rN   rE   s        r   r   z SetGDBDebugOutputAction.__call__C   s    "	%	r   r   r    r$   r   r   rP   rP   B   s(        & & & & & &r   rP   c                       e Zd ZddZdS )SetAnnotateCoverageActionNc                 "    d|_         ||_        d S rJ   )annotateannotate_coverage_xmlrE   s        r   r   z"SetAnnotateCoverageAction.__call__I   s    !	*0	'''r   r   r    r$   r   r   rS   rS   H   rF   r   rS   c            	      R	   d} t          | t                    }|                    dddddd	           |                    d
ddddd	           |                    ddddd           |                    ddddt          d           |                    dddddd	           |                    ddddd d!	           |                    d"d#d$d%d&           |                    d'd(d)ddd*	           |                    d+d,dt          d-           |                    d.d/d0dt          d1           |                    d2t
          d d34           |                    d5t          t          d67           |                    d8d9d:d;d<           |                    d=d>dd?d@dAB           |                    dCddDd@dEB           |                    dFdGt          t          dH           |                    dIdJdKdL           |                    dMdNdOdddP	           |                    dQddRdST           |                    dUdVddWdX	           |                    dYdVddZd[	           |                    d\dVdd]d^	           |                    d_t          d d`4           |                    dadbdKdc           |                    dddedKdf           |                    dgdhdidKdj           |                    dkdlt          d dm4           |                    dndodpdqt          t          drs           |                    dtdudpdvt          t          dws           |                    dxdyt          ddz{           |                    d|d}dKd~           |                    ddg            |                    ddddt          t                     |                    dddKt                     |                    ddd;t                     |                    dddKt                     |                    dddKt                     ddlm} t          |          D ]M}|                    d          r6|                    dd          }|                    d|z   dKt                     N|S )Nz|Cython (https://cython.org/) is a compiler for code written in the Cython language.  Cython is based on Pyrex by Greg Ewing.)descriptionargument_defaultz-Vz	--versionshow_versionstore_constr   z)Display version number of cython compiler)r   actionconsthelpz-lz--create-listinguse_listing_filez&Write error messages to a listing filez-Iz--include-dirinclude_pathappendzWSearch for include files in named directory (multiple include directories are allowed).)r   r\   r^   z-oz--output-fileoutput_filestorez Specify name of generated C file)r   r\   typer^   z-tz--timestamps
timestampszOnly compile newer source filesz-fz--forcer   z/Compile all source files (overrides implied -t)z-vz	--verboseverbosecountz4Be verbose, print file names on multiple compilationz-pz--embed-positionsembed_pos_in_docstringzeIf specified, the positions in Cython files of each function definition is embedded in its docstring.z	--cleanupgenerate_cleanup_codezzRelease interned objects on python exit, for memory debugging. Level indicates aggressiveness, default 0 releases nothing.z-wz	--workingworking_pathzOSets the working directory for Cython (the directory modules are searched from)z--gdbz"Output debug information for cygdb)r\   nargsr^   z--gdb-outdirz>Specify gdb debug information output directory. Implies --gdb.)r\   rd   r^   z-Dz--no-docstrings
docstringsstore_falsez*Strip docstrings from the compiled module.z-az
--annotatedefaultrU   z/Produce a colorized HTML version of the source.)r\   r]   r   r^   z--annotate-fullcfullczZProduce a colorized HTML version of the source which includes entire generated C/C++-code.z--annotate-coveragerV   z7Annotate and include coverage information from cov.xml.z--line-directivesemit_linenums
store_truez4Produce #line directives pointing to the .pyx sourcez-+z--cpluscplusz Output a C++ rather than C file.--embedmainzwGenerate a main() function that embeds the Python interpreter. Pass --embed=<method_name> for a name other than main().)r\   r]   r^   z-2language_level   z4Compile based on Python-2 syntax and code semantics.z-3r	   z4Compile based on Python-3 syntax and code semantics.z--3str3strz{Compile based on Python-3 syntax and code semantics without assuming unicode by default for string literals under Python 2.z	--lenientzQChange some compile time errors to runtime errors to improve Python compatibilityz--capi-reexport-cincludescapi_reexport_cincludesz9Add cincluded headers to any auto-generated header files.z--fast-fail	fast_failz(Abort the compilation on the first errorz-Werrorz--warning-errorswarning_errorszMake all warnings into errorsz-Wextraz--warning-extrazEnable extra warningsz-Xz--directivezNAME=VALUE,...r=   zOverrides a compiler directive)metavarr   rd   r\   r^   z-Ez--compile-time-envcompile_time_envz,Provides compile time env like DEF would do.z--module-namemodule_namezFully qualified module name. If not given, is deduced from the import path if source file is in a package, or equals the filename otherwise.)r   rd   r\   r^   z-Mz	--depfilez produce depfiles for the sources)r\   r^   sources*)rk   rn   z-zz--pre-import
pre_importz--convert-rangeconvert_rangez--no-c-in-tracebackc_line_in_tracebackz--cimport-from-pyxcimport_from_pyxz--old-style-globalsold_style_globals
DebugFlagsdebug_-z--)r   r   add_argumentstrintrH   rP   rS   rA   r;   r   r5    r   vars
startswithreplace)rX   r   r   nameoption_names        r   create_cython_argparserr   N   s   NK hOOOF
k}\]F  H H H
07IR_ghC  E E E
oN8I  J J J oM'X[=  ? ? ?
n<]^<  > > >
il=XYL  N N N
k	'Q  S S S
18PYfnoO  P P P *A'X[Y  Z Z Z kwUXl  n n n
(9?  A A A
/FS[  ] ] ]
/l=G  I I I
l=	XbL  N N N
*=V`I  J J J -4KTmtwT  V V V
+/,Q  S S S
igmST=  ? ? ?
	-vV  W W W #3MQRQ  S S S
#3MQRQ  S S S
'7U[]  ^ ^ ^ ,<A:  ; ; ; 3:S\hV  X X X
KE  G G G
	#5<LUa:  < < <
	#4=V^_2  4 4 4 m5E0s2;  = = = 2<L-C6I  K K K (s7J  K K K
 k,Eghhh
	b999 n<VY`hiii
)[cddd
-4IR_fnooo
,3Elaijjj
-4GP\cklll Z   X X??7## 	X,,sC00K{ 2<hWWWMr   c                 j   d } ||          \  }}|                      |          \  }}|j        }|`|D ]E}|                    d          r|                     d|z              0|                    |           F|D ]3}	|	dk    rd}
n|	t          d          d          }
t          |d|
           4||fS )Nc                     g g }}| D ]H}|dk    s|                     d          r|                    |           3|                    |           I||fS )Nrs   --embed=)r   ra   )args
with_embedwithout_embedxs       r   filter_out_embed_optionsz8parse_command_line_raw.<locals>.filter_out_embed_options   sl    $&M
 	( 	(AI~~j!9!9~!!!$$$$$$Q''''=((r   r   zunknown option rs   rt   r   embed)parse_known_argsr~   r   errorra   lenr   )r   r   r   r   args_without_embed	argumentsunknownr~   optionr   r   s              r   parse_command_line_rawr      s    ) ) ) &>%=d%C%C"J"001CDDIwG  # #S!! 	#LL*V34444NN6""""  * *	>>DDS__%%&D	7D))))gr   c                    t                      }t          ||           \  }}t          |dd          }|D ]}|r?t          j                            |          s t          j                            ||          }t          j                            |          s1dd l}t          |j
        t          j        |j
                  |          t          j        t          j                  }t          |                                          D ]\  }}	|                    d          rBddlm}
 |t)          |
          v rt+          |
||	           C|                    d|z             \t/          t          |          rt+          t          ||	           t+          |||	           |j        r(t3          |          dk    r|                    d           t3          |          dk    r|j        s|                    d	           t          j        r(t3          |          dk    r|                    d
           |j        rD|j        r|                    d           t3          |          dk    r|                    d           ||fS )Nrj   r   r   r   r   r   zUnknown debug flag: %s
z3cython: Only one source file allowed when using -o
z&cython: Need at least one source file
z8cython: Only one source file allowed when using --embed
z3cython: Cannot use --module-name with --timestamps
z>cython: Only one source file allowed when using --module-name
)r   r   r   rL   pathisabsjoinexistserrnoFileNotFoundErrorENOENTstrerrorr   CompilationOptionsdefault_optionsr   itemsr   r   r   dirr   r   hasattrr_   r   rZ   r   r}   re   )r   r   r   r~   work_dirsourcer   r0   r   valuer   s              r   parse_command_liner      s{   $&&F/==Iwy."55H U U 	4BGMM&11 	4W\\(F33Fw~~f%% 	ULLL#EL"+el2K2KVTTT	U ()@AAGI,,.. 
* 
*e??7## 		*$$$$$$s:&&
D%00007$>????Wd## 	*GT5))))GT5)))) MCLL1$4$4KLLL
7||q!5>???} RW))PQQQ \ 	QLLOPPPw<<!LLZ[[[Gr   )
__future__r   sysrL   argparser   r   r   r   r   version_infoIOErrorr   r   r&   r5   r;   rA   rH   rP   rS   r   r   r   r$   r   r   <module>r      s  
 ' & & & & & 



 				 5 5 5 5 5 5 5 5 5 5       f2 2 2 2 2F 2 2 2
/ 
/ 
/ 
/ 
/ 
/ 
/ 
// / / / / / / /3 3 3 3 3 3 3 31 1 1 1 1v 1 1 1) ) ) ) ) ) ) )& & & & &f & & &1 1 1 1 1 1 1 1b b bJ! ! !H$ $ $ $ $r   