Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/__pycache__/Options.cpython-37.pyc

B

Z��Z�=�@@s�ddlmZGdd�de�ZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZed�ZdZdZdZd	d
�Zddddiddddddddddddddddddddddddddddddd
ddddddddddddddddddddddggdddd�?Zdddd�Zdd�Zdd�Zeeeeedddddee e!ed
ddd�ed�Z"x,e�#�D] \Z$Z%e$e"k�rTee%�e"e$<�qTWdddddddddddddddddddddddddddd�Z&d$d d!�Z'd%d"d#�Z(dS)&�)�absolute_importc@s:eZdZgZd
dd�Zdd�Zdd�Zd	d
�Zdd�ZdS)�ShouldBeFromDirectiveNFcCs&||_|p||_||_|j�|�dS)N)�options_name�directive_name�disallow�known_directives�append)�selfrrr�r
�J/opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/Options.py�__init__s
zShouldBeFromDirective.__init__cCs|��dS)N)�_bad_access)r	r
r
r�__nonzero__sz!ShouldBeFromDirective.__nonzero__cCs|��dS)N)r
)r	r
r
r�__int__szShouldBeFromDirective.__int__cCstt|���dS)N)�RuntimeError�repr)r	r
r
rr
sz!ShouldBeFromDirective._bad_accesscCsd|j|jfS)NzEIllegal access of '%s' from Options module rather than directive '%s')rr)r	r
r
r�__repr__szShouldBeFromDirective.__repr__)NF)	�__name__�
__module__�__qualname__rrrrr
rr
r
r
rrs
rTFN�old_style_globals�cCs`xZtjD]P}t��|j�}|jtks(t�t|t�s|j	rNt
d|j|jf��q|t|j<qWtS)Nz+Option '%s' must be set from directive '%s')rr�globals�getrr�_directive_defaults�AssertionError�
isinstancerr�option_name)Z
old_option�valuer
r
r�get_directive_defaultszs
r���bytes)?�boundscheck�	nonecheck�initializedcheck�embedsignature�locals�	exceptvalZ
auto_cpdef�auto_pickle�	cdivision�cdivision_warnings�
overflowcheckzoverflowcheck.foldZalways_allow_keywordsZallow_none_for_extension_args�
wraparoundZccomplexZcallspec�final�internal�profile�no_gc_clear�no_gc�	linetrace�emit_code_comments�annotation_typing�infer_typeszinfer_types.verbose�autotestdictzautotestdict.cdefzautotestdict.all�language_levelZfast_getattrZ
py2_importZpreliminary_late_includes_cy28�iterable_coroutine�
c_string_type�c_string_encoding�type_version_tag�unraisable_tracebacksr�
np_pythran�fast_gil�set_initial_path�warnzwarn.undeclaredzwarn.unreachablezwarn.maybe_uninitializedzwarn.unusedzwarn.unused_argzwarn.unused_resultzwarn.multiple_declaratorszoptimize.inline_defnode_callszoptimize.unpack_method_callsz&optimize.unpack_method_calls_in_pyinitzoptimize.use_switchZremove_unreachablezcontrol_flow.dot_outputzcontrol_flow.dot_annotate_defs�test_assert_path_exists�test_fail_if_path_exists�binding�freelistZformal_grammar)zwarn.maybe_uninitializedzwarn.unreachablezwarn.unusedcs�fdd�}|S)Ncs$|�krtd|�|f��n|SdS)Nz(%s directive must be one of %s, got '%s')�
ValueError)�namer)�argsr
r�validate�szone_of.<locals>.validater
)rHrIr
)rHr�one_of�srJcCsl|sdS|��dkr|��Sddl}y|�|�}Wntk
rF|SXxdD]}|�|�|krN|SqNW|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'
    r )�default�ascii�utf8rN)rLrM)�lower�codecs�
getdecoder�LookupError)r�encodingrO�decoderrGr
r
r�normalise_encoding_name�s
rT�	bytearray�str�unicode)r)r.r/r6rD�cfunc�ccall�inline�staticmethod�cclass�returnsr@rEr:r;)�moduler\)r\�function)r_)r\)r^)r_�classr\)r^r_)r)r.rZr]r(r'r[r1r2r/r7zautotestdict.allzautotestdict.cdefr@rBrCrEr4r5r:r;r<r8rr>r?r9cCs�t�|�}|sdS|}|tkrtt|�}|dkr2dS|dkr>dS|rb|��}|dkrVdS|dkrbdStd||f��nb|tkr�yt|�Stk
r�td	||f��Yq�Xn*|tkr�t|�St|�r�|||�Sds�t�dS)
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�noz3%s directive must be set to True or False, got '%s'z0%s directive must be set to an integer, got '%s')	�directive_typesr�boolrVrNrF�int�callabler)rGr�relaxed_bool�typeZ
orig_valuer
r
r�parse_directive_valueIs:

rmcCs�|dkri}n|}x�|�d�D]�}|��}|s0qd|krDtd|��dd�|���dd�D�\}}|tkr�d}|�d	�r�|dd
�}	x0tD](}
|
�|	�r�d}t|
||d�}|||
<q�W|s�|s�td
|��qt|||d�}|||<qW|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�,�=zExpected "=" in option "%s"cSsg|]}|���qSr
)�strip)�.0�sr
r
r�
<listcomp>�sz(parse_directive_list.<locals>.<listcomp>�Fz.all���T)rkzUnknown option: "%s")�splitrprFr�endswith�
startswithrm)rrrkZignore_unknownZcurrent_settings�result�itemrGr�found�prefixZ	directiveZparsed_valuer
r
r�parse_directive_list�s0


r})F)FFN))�
__future__r�objectrZ
docstringsZembed_pos_in_docstringr4Z
pre_importZgenerate_cleanup_codeZ
clear_to_noneZannotateZannotate_coverage_xmlZ	fast_failZwarning_errorsZerror_on_unknown_namesZerror_on_uninitializedZ
convert_rangeZcache_builtinsZgcc_branch_hintsZlookup_module_cpdefZembedrZcimport_from_pyxZbuffer_max_dimsZclosure_freelist_sizerrZextra_warningsrJrTrhrlrVrirg�items�key�valZdirective_scopesrmr}r
r
r
r�<module>s	
$

<