
    -Ph{3                     $   d dl Z d dlmZmZmZmZ ddlm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 )    N)ArgumentParserActionSUPPRESSRawDescriptionHelpFormatter   )Optionsc                       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          W/var/www/html/test/jupyter/venv/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   r4   r4   !   s(        / / / / / /r   r4   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__)   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__0   s    +0	(+0	(((r   r   r   r#   r   r   r@   r@   /   (        1 1 1 1 1 1r   r@   c                       e Zd ZddZdS )SetGDBDebugActionNc                 6    d|_         t          j        |_        d S NT)	gdb_debugoscurdir
output_dirrD   s        r   r   zSetGDBDebugAction.__call__6   s    "	!y	r   r   r   r#   r   r   rG   rG   5   s(        ) ) ) ) ) )r   rG   c                       e Zd ZddZdS )SetGDBDebugOutputActionNc                 "    d|_         ||_        d S rI   )rJ   rM   rD   s        r   r   z SetGDBDebugOutputAction.__call__<   s    "	%	r   r   r   r#   r   r   rO   rO   ;   s(        & & & & & &r   rO   c                       e Zd ZddZdS )SetAnnotateCoverageActionNc                 "    d|_         ||_        d S rI   )annotateannotate_coverage_xmlrD   s        r   r   z"SetAnnotateCoverageAction.__call__B   s    !	*0	'''r   r   r   r#   r   r   rR   rR   A   rE   r   rR   c            	      
   d} t          | t          t          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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/d0d1d2           |                    d3d4d5dt          d6           |                    d7t          d!d89           |                    d:t          t          d;<           |                    d=d>d?d@dA           |                    dBdCddDdEdFG           |                    dHddIdEdJG           |                    dKdLt          t          dM           |                    dNdOd1dP           |                    dQdRdSdddT
           |                    dUddVdWX           |                    dYdZdd[d\
           |                    d]dZdd^d_
           |                    d`dZddadb
           |                    dct          d!dd9           |                    dedfd1dg           |                    dhdid1dj           |                    dkdldmd1dn           |                    dodpt          d!dq9           |                    drdsdtdut          t          dvw           |                    dxdydtdzt          t          d{w           |                    d|d}t          dd~           |                    ddd1d           |                    dddt          d           |                    dddt          d           |                    ddg            |                    ddddt          t                     |                    ddd1t                     |                    ddd@t                     |                    ddd1t                     |                    ddd1t                     ddlm} t          |          D ]M}|                    d          r6|                    dd          }|                    d|z   d1t                     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.zYEnvironment variables:
  CYTHON_CACHE_DIR: the base directory containing Cython's caches.)descriptionargument_defaultformatter_classepilogz-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--cachecache
store_truez!Enables Cython compilation cache.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]   re   r_   z-Dz--no-docstrings
docstringsstore_falsez*Strip docstrings from the compiled module.z-az
--annotatedefaultrT   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-coveragerU   z7Annotate and include coverage information from cov.xml.z--line-directivesemit_linenumsz4Produce #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-3   z4Compile based on Python-3 syntax and code semantics.z--3str3zRCompile based on Python-3 syntax and code semantics (same as -3 since Cython 3.1).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   re   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   re   r]   r_   z-Mz	--depfilez produce depfiles for the sources)r]   r_   z--generate-sharedshared_c_file_pathz,Generates shared module with specified name.z--sharedshared_utility_qualified_namezQImports utility code from shared module specified by fully qualified module name.sources*)rn   rq   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   r   add_argumentstrintrG   rO   rR   r@   r:   r
   r4    r   vars
startswithreplace)rW   r   r   nameoption_names        r   create_cython_argparserr   F   sn   NK !3F	  F 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UXo  q q q
,<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
+2Fw]`K  M M M

)HQX_bp  r r r 	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 )Nru   --embed=)r   rb   )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 ru   rv   r   embed)parse_known_argsr   r   errorrb   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                 f   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           |j        r)t3          |          dk    r|                    d	           n/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 )Nrm   r   r   r   r   r   zUnknown debug flag: %s
z3cython: Only one source file allowed when using -o
z=cython: Source file not allowed when using --generate-shared
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   rK   pathisabsjoinexistserrnoFileNotFoundErrorENOENTstrerrorr   CompilationOptionsdefault_optionsr   itemsr   r   r   dirr   r   hasattrr`   r   r   r[   r   r   rf   )r   r   r   r   work_dirsourcer   r/   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! @w<<!LLYZZZ	W		7#7	>???} RW))PQQQ \ 	QLLOPPPw<<!LLZ[[[Gr   )rK   argparser   r   r   r   r   r   r
   r%   r4   r:   r@   rG   rO   rR   r   r   r   r#   r   r   <module>r      s   
			 R R R R R R R R R R R R      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
o o od! ! !H' ' ' ' 'r   