
    Ngw                        d dl mZ d dlZddlmZ  G d de          Z	 dZdZdZ	dZ
dZdZdZdZdZdZdZdZdZdZdZdZ ed	          ZdZd
Zd
Zd Zd Zi 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dddddddi 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-dd.dd/dd0di d1dd2dd3d4d5d!d6dd7dd	dd8dd9dd:dd;dd<dd=dd>dd?dd@ddAdi dBddCddDddEddFddGddHddIddJddKd!dLddMg dNg dOg dPg dQdZddddRZdS ZdT Z  G dU dV          Z! e!            Z!i d.e"de#dWe$dXe#dY edZ          d"e!d#e!d$dd[e#d)e#de#d\dd]dd^dde#d_dd`dde#e#e%e%e"e& ed4dadbdc          e e#de!e! edddde          dfZ'e(                                D ]\  Z)Z*e)e'vr e%e*          e'e)<   i ddgdXdhdYdid"djd#dkd$dld_dld\djd]djdmdldndldWdld`dldodidpdid[didqdri d+dsd-dsd,dsd<dsdMdtdNdtdOdsdPdsdudid'dsd3dsd5dsd6dgd.dsd	dsd8dsd9dsdvdidwdwdxdldsdyZ+h dzZ,dd{Z-	 	 dd|Z.d} Z/dd~Z0 G d de          Z1 e$di dd dd dddd dddddddddd dd dd!dddd dd di di ddddddddd.ddQdddddddddddddddddd8dd;dZ2dS )    )absolute_importN   )Utilsc                   2    e Zd Zg ZddZd Zd Zd Zd ZdS )	ShouldBeFromDirectiveNFc                 h    || _         |p|| _        || _        | j                            |            d S N)options_namedirective_namedisallowknown_directivesappend)selfr
   r   r   s       S/var/www/html/ai-engine/env/lib/python3.11/site-packages/Cython/Compiler/Options.py__init__zShouldBeFromDirective.__init__   s;    (,< $$T*****    c                 .    |                                   d S r	   _bad_accessr   s    r   __nonzero__z!ShouldBeFromDirective.__nonzero__       r   c                 .    |                                   d S r	   r   r   s    r   __int__zShouldBeFromDirective.__int__   r   r   c                 :    t          t          |                     r	   )RuntimeErrorreprr   s    r   r   z!ShouldBeFromDirective._bad_access   s    4::&&&r   c                 (    d| j         d| j        dS )NzIllegal access of 'z-' from Options module rather than directive '')r
   r   r   s    r   __repr__zShouldBeFromDirective.__repr__   s%     t2224 	4r   )NF)	__name__
__module____qualname__r   r   r   r   r   r     r   r   r   r      sj        + + + +    ' ' '4 4 4 4 4r   r   TFold_style_globals   c                  0   t           j        D ]} t                                          | j                  }| j        t          v sJ t          |t                     s6| j        r t          d| j
        d| j        d          |t          | j        <   t          S )NzOption 'z' must be set from directive 'r   )r   r   globalsgetr
   r   _directive_defaults
isinstancer   r   option_name)
old_optionvalues     r   get_directive_defaultsr/      s     ,< 
G 
G
		j566(,?????%!677 	G" G"l***J,E,E,EGH H H
 BG#J$=>r   c                     t          |           }dD ]}|                    |d            |                    |           |S )N)test_assert_path_existstest_fail_if_path_existstest_assert_c_code_hastest_fail_if_c_code_has)dictpopupdate)outer_directivesnew_directivesnew_directives_outnames       r   copy_inherited_directivesr<      sU     .//| + +tT****n---r   bindingboundscheck	nonecheckinitializedcheckembedsignatureembedsignature.formatc
auto_cpdefauto_pickle	cdivisioncdivision_warningscpowc_api_binop_methodsoverflowcheckzoverflowcheck.foldalways_allow_keywordsallow_none_for_extension_args
wraparoundccomplexcallspec nogilgilwith_gilprofile	linetraceemit_code_commentsannotation_typinginfer_typeszinfer_types.verboseautotestdictzautotestdict.cdefzautotestdict.alllanguage_levelfast_getattr
py2_importpreliminary_late_includes_cy28iterable_coroutinec_string_typebytesc_string_encodingtype_version_tagunraisable_tracebacks
np_pythranfast_gil
cpp_localslegacy_implicit_noexceptset_initial_pathwarnzwarn.undeclaredwarn.unreachablewarn.maybe_uninitializedwarn.unusedzwarn.unused_argzwarn.unused_resultzwarn.multiple_declaratorsshow_performance_hintszoptimize.inline_defnode_callszoptimize.unpack_method_callsz&optimize.unpack_method_calls_in_pyinitzoptimize.use_switchremove_unreachablezcontrol_flow.dot_outputzcontrol_flow.dot_annotate_defsr1   r2   r3   r4   formal_grammar)rk   rj   rl   c                        fd}|S )Nc                 @    |vrt          | dd|d          |S )Nz directive must be one of z, got 'r   )
ValueError)r;   r.   argss     r   validatezone_of.<locals>.validate  s?    dddEEE# $ $ $ Lr   r$   )rs   rt   s   ` r   one_ofru     s#         Or   c                     |sdS |                                 dv r|                                 S ddl}	 |                    |          }n# t          $ r |cY S w xY wdD ]}|                    |          |k    r|c S  |S )a  
    >>> normalise_encoding_name('c_string_encoding', 'ascii')
    'ascii'
    >>> normalise_encoding_name('c_string_encoding', 'AsCIi')
    'ascii'
    >>> normalise_encoding_name('c_string_encoding', 'us-ascii')
    'ascii'
    >>> normalise_encoding_name('c_string_encoding', 'utF8')
    'utf8'
    >>> normalise_encoding_name('c_string_encoding', 'utF-8')
    'utf8'
    >>> normalise_encoding_name('c_string_encoding', 'deFAuLT')
    'default'
    >>> normalise_encoding_name('c_string_encoding', 'default')
    'default'
    >>> normalise_encoding_name('c_string_encoding', 'SeriousLyNoSuch--Encoding')
    'SeriousLyNoSuch--Encoding'
    rP   )defaultasciiutf8r   N)rx   ry   )lowercodecs
getdecoderLookupError)r,   encodingr{   decoderr;   s        r   normalise_encoding_namer     s    &  r~~777~~MMM##H--   !  T""g--KKK .Os   A
 
AAc                       e Zd ZdS )DEFER_ANALYSIS_OF_ARGUMENTSN)r!   r"   r#   r$   r   r   r   r   =  s        Dr   r   localsfinalcollection_typesequenceinternalcfuncccallufuncinlinestaticmethod	bytearraystrunicodeclinicpython)cclassno_gc_clearno_gcreturns	exceptvalrh   freelistr_   ra   trashcantotal_orderingdataclasses.dataclasszdataclasses.fieldrB   )moduler   )r   function)r   )r   with statementr   )r   r   r   r   r   r   )classr   r   )r   )r   r   r   r   )r   r   )r   r   )r   r   r   )r^   r   r   r   rf   r   rg   >   r   r   r   r   r   r   r   r   r   r   rS   r   rE   r   r   r   rb   r1   r2   r   c                    t                               |           }|sdS |}|t          u rVt          |          }|dk    rdS |dk    rdS |r |                                }|dv rdS |dv rdS t          | d|d	          |t          u r3	 t          |          S # t
          $ r t          | d
|d	          w xY w|t          u rt          |          S t          |          r || |          S J )a  
    Parses value as an option value for the given name and returns
    the interpreted value. None is returned if the option does not exist.

    >>> print(parse_directive_value('nonexisting', 'asdf asdfd'))
    None
    >>> parse_directive_value('boundscheck', 'True')
    True
    >>> parse_directive_value('boundscheck', 'true')
    Traceback (most recent call last):
       ...
    ValueError: boundscheck directive must be set to True or False, got 'true'

    >>> parse_directive_value('c_string_encoding', 'us-ascii')
    'ascii'
    >>> parse_directive_value('c_string_type', 'str')
    'str'
    >>> parse_directive_value('c_string_type', 'bytes')
    'bytes'
    >>> parse_directive_value('c_string_type', 'bytearray')
    'bytearray'
    >>> parse_directive_value('c_string_type', 'unicode')
    'unicode'
    >>> parse_directive_value('c_string_type', 'unnicode')
    Traceback (most recent call last):
    ValueError: c_string_type directive must be one of ('bytes', 'bytearray', 'str', 'unicode'), got 'unnicode'
    NTrueTFalseF)trueyes)falsenoz. directive must be set to True or False, got 'r   z+ directive must be set to an integer, got ')directive_typesr)   boolr   rz   rr   intcallable)r;   r.   relaxed_booltype
orig_values        r   parse_directive_valuer     sI   8 t$$D tJt||E

F??4G5 	KKMME''t/))uDD***   			#u:: 	# 	# 	#jjj" # # #	# 
5zz	$ tD%   s   
B  B9c                    |i }n|}|                      d          D ]?}|                                }|sd|vrt          d|z            d |                                                     dd          D             \  }}|t          vrpd}|                    d          rB|dd	         }	t          D ]0}
|
                    |	          rd
}t          |
||          }|||
<   1|s|st          d|z            t                              |          t          u r)||v r||         
                    |            |g||<   (t          |||          }|||<   A|S )aJ  
    Parses a comma-separated list of pragma options. Whitespace
    is not considered.

    >>> parse_directive_list('      ')
    {}
    >>> (parse_directive_list('boundscheck=True') ==
    ... {'boundscheck': True})
    True
    >>> parse_directive_list('  asdf')
    Traceback (most recent call last):
       ...
    ValueError: Expected "=" in option "asdf"
    >>> parse_directive_list('boundscheck=hey')
    Traceback (most recent call last):
       ...
    ValueError: boundscheck directive must be set to True or False, got 'hey'
    >>> parse_directive_list('unknown=True')
    Traceback (most recent call last):
       ...
    ValueError: Unknown option: "unknown"
    >>> warnings = parse_directive_list('warn.all=True')
    >>> len(warnings) > 1
    True
    >>> sum(warnings.values()) == len(warnings)  # all true.
    True
    N,=Expected "=" in option "%s"c                 6    g | ]}|                                 S r$   strip.0ss     r   
<listcomp>z(parse_directive_list.<locals>.<listcomp>
  s     EEEQqwwyyEEEr      Fz.allT)r   zUnknown option: "%s")splitr   rr   r*   endswith
startswithr   r   r)   listr   )r   r   ignore_unknowncurrent_settingsresultitemr;   r.   foundprefix	directiveparsed_values               r   parse_directive_listr     s   : ! ( (zz|| 	d??:TABBBEE$**,,*<*<S!*D*DEEEe***E}}V$$ 9crc!4 9 9I ++F33 9 $'<Y\h'i'i'i,8y) @ @ !7$!>???  &&$..v~~t##E**** %wt0u<XXXL'F4LLMr   c                     | dk    rdS | dk    rdS | dk    rdS |                                  rt          |           S 	 t          |           } n# t          $ r Y nw xY w| S )a  
    Parses value as an option value for the given name and returns
    the interpreted value.

    >>> parse_variable_value('True')
    True
    >>> parse_variable_value('true')
    'true'
    >>> parse_variable_value('us-ascii')
    'us-ascii'
    >>> parse_variable_value('str')
    'str'
    >>> parse_variable_value('123')
    123
    >>> parse_variable_value('1.23')
    1.23

    r   Tr   FNoneN)isdigitr   float	Exception)r.   s    r   parse_variable_valuer   !  s    & t	'		u	&t	 5zz	%LLEE 	 	 	D	 s   A 
AAc                    |i }n|}|                      d          D ]d}|                                }|sd|vrt          d|z            d |                     dd          D             \  }}t          |          ||<   e|S )a  
    Parses a comma-separated list of pragma options. Whitespace
    is not considered.

    >>> parse_compile_time_env('      ')
    {}
    >>> (parse_compile_time_env('HAVE_OPENMP=True') ==
    ... {'HAVE_OPENMP': True})
    True
    >>> parse_compile_time_env('  asdf')
    Traceback (most recent call last):
       ...
    ValueError: Expected "=" in option "asdf"
    >>> parse_compile_time_env('NUM_THREADS=4') == {'NUM_THREADS': 4}
    True
    >>> parse_compile_time_env('unknown=anything') == {'unknown': 'anything'}
    True
    Nr   r   r   c                 6    g | ]}|                                 S r$   r   r   s     r   r   z*parse_compile_time_env.<locals>.<listcomp>b  s     ===Qqwwyy===r   r   )r   r   rr   r   )r   r   r   r   r;   r.   s         r   parse_compile_time_envr   E  s    & ! 3 3zz|| 	d??:TABBB==$**S!*<*<===e+E22tMr   c                   &    e Zd ZdZddZd Zd ZdS )CompilationOptionsz
    See default_options at the end of this module for a list of all possible
    options and CmdLine.usage and CmdLine.parse_command_line() for their
    meaning.
    Nc                    g | _         |rt          |t                    r|j        }nt          }t          |          }|                    |           t          |          t          t                    z
  }|                    dg           |r?dt          |          dk    rdnddd
                    |          }t          |          t                      }t          |d                   }t          |          t          |          z
  }|r?d	t          |          dk    rdndd
d
                    |          }t          |          ||d<   |                    dd          r&|d         sdd l}	|	                    d           d|d<   d|vr!|                    d          r|d         |d<   n-|                    d          s|                    d          |d<   d|v rd|vr|d         |d<   |d         du r4t           j        
                    t%          j                    d          |d<   | j                            |           d S )Ninclude_pathzgot unknown compilation optionr   r   rP   z, please remove: z, compiler_directiveszgot unknown compiler directivez: rd   Fcplusr   z%C++ mode forced when in Pythran mode!TrZ   ro   cachecompiler)r   r+   r   __dict__default_optionsr5   r7   setdifference_updatelenjoinrr   r/   r)   warningsri   ospathr   get_cython_cache_dir)
r   defaultskwoptionsunknown_optionsmessagedirective_defaults
directivesunknown_directivesr   s
             r   r   zCompilationOptions.__init__q  s    	'($677 -#,&Hx..r g,,_)=)==))>*:;;; 	& 	&?++a//R77		/***,G W%%%355'"7899
 __s3E/F/FF 	& 	&-..22::		,---/G W%%%)3%&>>,.. 	$ww7G 	$OOOMMABBB#GG2%%*..9I*J*J%(23C(DG$%%-.. 	Q(:(>(>?O(P(PG$%z)).>b.H.H(23C(DG$%7t##!w||E,F,H,H*UUGGW%%%%%r   c                 b    |dk    r&| j                             d          d| j         d<   d S d S d S )Npyr=   T)r   r)   )r   source_extensions     r   configure_language_defaultsz.CompilationOptions.configure_language_defaults  sE    t##'++I66>6:(333 $#>>r   c                    i }| j                                         D ]\  }}|dv r
|dv r|dv r|dv r|dv r|dv r#|dv r(|dv r-|d	v r2|d
v r7|dv r|||<   A|dv r|||<   K|dv r|||<   U|dv r|||<   _|dgk    r| j        rt          d          }|dgk    r| j        rt          d          |||<   fd |          S )zi
        Return a string that contains all the options that are relevant for cache invalidation.
        )show_versionerrors_to_stderrverbosequiet)output_file
output_dir)depfile)
timestamps)r   )r   )r   )working_path)create_extension)	build_dir)use_listing_filegenerate_pxiannotateannotate_coverage_xml)ro   evaluate_tree_assertions)embedded_metadataemit_linenumsc_line_in_traceback	gdb_debug'relative_path_in_code_position_comments)r   rZ   compile_time_envrd   capi_reexport_cincludesz=capi_reexport_cincludes is not compatible with Cython cachingcommon_utility_include_dirzDcommon_utility_include_dir is not compatible with Cython caching yetc                     t          | t                    r-t          fd|                                 D                       } t	          |           S )z
            Recursively turn item into a string, turning dicts into lists with
            deterministic ordering.
            c                 J    g | ]\  }}t          |           |          f S r$   )r   )r   keyr.   to_fingerprints      r   r   zNCompilationOptions.get_fingerprint.<locals>.to_fingerprint.<locals>.<listcomp>  s2    aaajc5S		>>%+@+@Aaaar   )r+   r5   sorteditemsr   )r   r  s    r   r  z:CompilationOptions.get_fingerprint.<locals>.to_fingerprint  sS    
 $%% caaaaTXT^T^T`T`aaabb::r   )r   r  r  NotImplementedErrorr  )r   datar
  r.   r  s       @r   get_fingerprintz"CompilationOptions.get_fingerprint  s   
 ---// >	" >	"JCNNN555##&&	!!///((( ((( ,,, %% aaa "S		FFF!S		 D D D "S		UUU!S		2333/ o-.mnnno 56662 v-.tuuuv
 "S			 	 	 	 	 ~d###r   r	   )r!   r"   r#   __doc__r   r   r  r$   r   r   r   r   k  sV         
-& -& -& -&^; ; ;
P$ P$ P$ P$ P$r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r   r   r   r   r   r  r  r  r  r  module_namer  r   r   r   r   )F)FFNr	   r$   )3
__future__r   r   rP   r   objectr   
docstringsembed_pos_in_docstring
pre_importgenerate_cleanup_codeclear_to_noner   r   	fast_failwarning_errorserror_on_unknown_nameserror_on_uninitializedconvert_rangecache_builtinsgcc_branch_hintslookup_module_cpdefembedr%   cimport_from_pyxbuffer_max_dimsclosure_freelist_sizer/   r<   r*   extra_warningsru   r   r   r   r   r5   r   r   r   r  r
  valdirective_scopesimmediate_decorator_directivesr   r   r   r   r   r   r$   r   r   <module>r*     s
  
 ' & & & & & 				      4 4 4 4 4F 4 4 40 
   
       	            	 *)*=>>   
     "  RtRDR %R 	R
 eR SR %R 4R R %R DR 5R UR $R  T!R" $T#R$ 4%R R& 'R( )R* e+R, 
E-R. /R0 u1R2 3R4 $5R6 7R8 49R: 5;R< D=R> ?R@ ARB dCRD EERF %GR R RH %eIRJ %KRL WMRN ORP QRR TSRT URV %WRX YRZ %[R\ ]Rb cRf DgRh uiRj kRl mRn 5oR R Rp uqRr %sRt  uRv dwR| $T}R~ #DR@ -eARB 4CRH $IRN rORP %eQRV WRX YRZ r[R\ ]Rb ecR R l !%     H	 	 	 	 	 	 	 	99;;  c 4  d  d	 
 vvj))  )  
'      D    d  d  T  T   t! " T# $ VG[%CC084#VC8<<?     D $))++ ) )HC
/!!#tCyy.'. $. {	.
 ,. 
. . }. ,. ,. . -. }. ]. K.  k!." #.$ 4%. .& ['.( ).* ++., -..  ?/.0 !@1.2 {3.4 5.6 7.8 +9.< [=.> ?.@ ,A.B kC.H I.J +K.L M. .N 1)12 ,[. . . f	" 	" 	" 9 9 9 9x @E*.; ; ; ;|! ! !H   LJ$ J$ J$ J$ J$ J$ J$ J$f $ ! ! !!Q! Q! !	!
 ! D! T! $! ! A! ! t! A! !! !  b!!" #U#!$ %%!& -1D'!( )!* 4+!, 5-!. e/!0 T1!2 3!4  $t5!6 t7!8 d9!: $;!< T=!> u?!@ "TA!r   