
    -Ph{                        d dl Z ddlmZ  G d 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dZ ed          Z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d0dd1di d2dd3dd4dd5dd6d7d8d$d9dd:dddd;dd<dd=dd>dd?d$d@ddAddBdi dCddDddEddFddGddHddIddJddKddLddMddNddOddPddQd$dRddSg g g g ddTZddddUZddVdWZdXdXdXdYdYdZj        Zd[ Z  G d\ d]          Z! e!            Z!i d1e"de#d^e$d_e#d` eda          d%e!d&e!dbe!d'ddce#d,e#de#ddddeddfdde#dgdi dhddiddje#dke#dle%dme%d@e"dne&d6 ed7dodpdqdqdpiV          d8e dre#dsddte!due!d eddvdw          d eddxdy          Z'e(                                D ]\  Z)Z*e)e'vr e%e*          e'e)<   i ddzd_d{d"d|d`d}d%d~d&dd'ddbd~dgdddd~ded~dlddmdd^ddhddjd}dkd}i dcd}didd.d|d0d|d/d|d@d|dSddddd|dd|dnd}dd|d*d|d6d|d8d|d9dzd1d|i dd|d;d|d4d|d<d|d5ddrd}dsddtdd=ddfdd>d|d?ddQd|dRd|dd|dd|Z+h dZ,ddZ-	 	 ddZ.d Z/ddZ0 G d d          Z1 e$di dd dd dddd dddddddddd dd dd$dddd dd di di ddddddddd1dddddddddddddddddddd;dd>dddddZ2dS )    N   )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       W/var/www/html/test/jupyter/venv/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critical_section)dictpopupdate)outer_directivesnew_directivesnew_directives_outnames       r   copy_inherited_directivesr<      sW     .//% + +tT****n---r   c                 (    t          | ddd          S )NF)bindingprofile	linetrace)r<   )r8   s    r   copy_for_internalrA      s%    $	   r   r>   boundscheck	nonecheckinitializedcheckfreethreading_compatiblesubinterpreters_compatiblenoembedsignaturez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_gilr?   r@   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c_compile_guardset_initial_pathwarnzwarn.undeclaredwarn.unreachablewarn.maybe_uninitializedwarn.unusedzwarn.unused_argzwarn.unused_resultzwarn.multiple_declaratorszwarn.deprecated.DEFzwarn.deprecated.IF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_defsr0   )r1   r2   r3   formal_grammar)rp   ro   rq   )mapc                       fd}|S )Nc                 p                         ||          }|vrt          | dd|d          |S )Nz directive must be one of z, got 'r   )r(   
ValueError)r;   r-   argsru   s     r   validatezone_of.<locals>.validate   sU    ?GGE5))EdddEEE# $ $ $r   r#   )ru   ry   rz   s   `` r   one_ofr{     s)          Or   utf8ascii)r|   zutf-8defaultr}   zus-asciic                     |sdS t          |                                          }||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')
    'utf8'
    >>> normalise_encoding_name('c_string_encoding', 'default')
    'utf8'
    >>> normalise_encoding_name('c_string_encoding', 'SeriousLyNoSuch--Encoding')
    'SeriousLyNoSuch--Encoding'
    rV   Nr   )r}   r|   )_normalise_common_encoding_namelowercodecs
getdecoderLookupError)r+   encodingencoding_namer   decoderr;   s         r   normalise_encoding_namer   3  s    &  r3HNN4D4DEEM 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   Y  s        Dr   r   localsfinalcollection_typesequencer4   internalcfuncccallufuncinlinestaticmethodcclassno_gc_clearno_gcreturns	exceptvalfreelist	bytearraystrunicodetrashcantotal_orderingdataclasses.dataclasszdataclasses.fieldclinicpython
shared_gilown_gil)moduler   )r   function)r   )r   )r   with statementr   )r   )classr   r   )r   r   r   r1   r2   r3   rt   )r   r   )r   r   )r   r   r   >   r   r   r   r   r   r   r   r   r   r   rY   r   rK   r   r   r   rf   r0   r1   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')
    'str'
    >>> 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)falserG   z. directive must be set to True or False, got 'r   z+ directive must be set to an integer, got ')directive_typesr(   boolr   r   rx   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>1  s     EEEQqwwyyEEEr      Fz.allT)r   zUnknown option: "%s")splitr   rx   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   H  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>  s     ===Qqwwyy===r   r   )r   r   rx   r   )r   r   r   r   r;   r-   s         r   parse_compile_time_envr   l  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<   | j                            |           d S )Ninclude_pathzgot unknown compilation optionr   r   rV   z, please remove: z, compiler_directiveszgot unknown compiler directivez: rh   Fcplusr   z%C++ mode forced when in Pythran mode!Tr^   rt   )r   r*   r   __dict__default_optionsr5   r7   setdifference_updatelenjoinrx   r.   r(   warningsrn   )
r   defaultskwoptionsunknown_optionsmessagedirective_defaults
directivesunknown_directivesr   s
             r   r   zCompilationOptions.__init__  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$%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                 V   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v r|rt          | d          x|||<   ~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)cache)r   )r   )working_path)create_extension)	build_dir)use_listing_filegenerate_pxiannotateannotate_coverage_xml)rt   evaluate_tree_assertions)embedded_metadataemit_linenumsc_line_in_traceback	gdb_debug'relative_path_in_code_position_comments)r   r^   compile_time_envrh   )capi_reexport_cincludescommon_utility_include_dirz& is not compatible with Cython cachingc                     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  NotImplementedError)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		QQQ ^-.\.\.\]]]^ "S			 	 	 	 	 ~d###r   r   )r    r!   r"   __doc__r   r   r  r#   r   r   r   r     sV         
+& +& +& +&Z; ; ;
M$ M$ M$ M$ M$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   shared_c_file_pathshared_utility_qualified_name)F)FFNr   r#   )3osrV   r   r   
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<   rA   r)   extra_warningsr{   r(   r   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>r0     s   
			      4 4 4 4 4 4 4 40 
   
       	            	 *)*=>>   
     "	 	 	  WtWDW %W 	W
 W !$W eW SW %W 4W W %W DW 5W  U!W" $#W$ T%W W& $T'W( 4)W* +W, -W. e/W0 
E1W2 3W4 u5W6 7W8 $9W: ;W< 4=W> 5?W@ DAWB CWD EWF dGW W WH EIWJ %KWL %eMWN %OWP WQWR SWT UWV TWWX YWZ %[W\ ]W^ %_W` aWb rcWh iWl DmWn uoW W Wp qWr sWt 5uWv uwWx %yWz  {W| 5}W~ $W@ dAWF $TGWH #DIWJ -eKWL 4MWR $SWX rYWZ %e[W` aW Wb "$! " mW W W v !%        # #   ! ! !L	 	 	 	 	 	 	 	99;; "c"4" d" d	"
 vvj))" )" 
'" 4" " " D" " d" d" T"  T!"" t#" "$ T%"& t'"( D)"* d+", -". /"0 1"2 3"4 VVG[%TYHZ[[[5"6 07"8 9": d;"< 8="> 4?"@ VVC8<<A"B !&&|Y"G"GC" "H $))++ ) )HC
/!!#tCyy7'7 $7 	7
 {7 ,7 
7 7 67 }7 ,7 ,7 7 -7 }7  ]!7" K#7$ k%7 7& '7( 4)7* [+7, -7. +/70 172  ?374 !@576 {778 97: ;7< k=7> +?7B [C7D E7F ,G7H kI7 7 7N O7P +Q7R %kS7T U7V 0W7X Y7Z )[7\ 1]7^ 2_7` ]a7b c7d }e7f {g7h %ki7j k7l !+m7 7 x	" 	" 	" 9 9 9 9x @E*.; ; ; ;|! ! !H   LE$ E$ E$ E$ E$ E$ E$ E$\ $ # # ##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#B tC#D %)DE#r   