Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/Cython/Compiler/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/Cython/Compiler/__pycache__/Options.cpython-35.pyc



Z��Z�=�~@s�ddlmZGdd�de�ZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZed�ZdZdZdZd	d
�Zddddd
ddddiddddddddddddddddddddddddddddddd dd!dd"dd#dd$dd%dd&dd'dd(dd)dd*d+d,dd-dd.dd/dd0d1d2dd3dd4dddd5dd6dd7dd8dd9dd:dd;dd<dd=dd>dd?dd@ddAddBddCddDddEddFddGgdHgdIddJddKdi?Zd;dd:dd<diZdLdM�ZdNdO�Zdededed%edIedPddQddRddSddTddUed7e dJe!d0ed1dVdWdX�d2eiZ"x6ej#�D](\Z$Z%e$e"kr�ee%�e"e$<q�Wdd`ddadRdbdUdcdddddedSdfd dgd!dhddid'djd)dkd(dld7dmdGdndHdodJdpd#dqd$drd0dsd2dtd3dud*dvddwd5dxd6dyd/dziZ&dd\d]�Z'dddd^d_�Z(dS){�)�absolute_importc@sXeZdZgZdddd�Zdd�Zdd�Zd	d
�Zdd�ZdS)
�ShouldBeFromDirectiveNFcCs5||_|p||_||_|jj|�dS)N)�options_name�directive_name�disallow�known_directives�append)�selfrrr�r
�J/opt/alt/python35/lib64/python3.5/site-packages/Cython/Compiler/Options.py�__init__s		zShouldBeFromDirective.__init__cCs|j�dS)N)�_bad_access)r	r
r
r�__nonzero__sz!ShouldBeFromDirective.__nonzero__cCs|j�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__)	�__name__�
__module__�__qualname__rrrrr
rr
r
r
rrsrTFN�old_style_globals�cCs�xtjD]t}t�j|j�}|jtks:t�t|t�s
|j	rqt
d|j|jf��q
|t|j<q
WtS)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�boundscheck�	nonecheck�initializedcheck�embedsignature�locals�	exceptvalZ
auto_cpdefZauto_pickle�	cdivision�cdivision_warnings�
overflowcheckzoverflowcheck.foldZalways_allow_keywordsZallow_none_for_extension_args�
wraparoundZccomplexZcallspec��final�internal�profile�no_gc_clear�no_gc�	linetrace�emit_code_commentsZannotation_typing�infer_typeszinfer_types.verboseZautotestdictzautotestdict.cdefzautotestdict.allZlanguage_level�Zfast_getattrZ
py2_importZpreliminary_late_includes_cy28Ziterable_coroutineZ
c_string_type�bytesZc_string_encoding�type_version_tag�unraisable_tracebacksZ
np_pythranZfast_gilZset_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_existsZbinding�freelistZformal_grammarcs�fdd�}|S)Ncs0|�kr(td|�|f��n|SdS)Nz(%s directive must be one of %s, got '%s')�
ValueError)�namer)�argsr
r�validate�szone_of.<locals>.validater
)r=r>r
)r=r�one_of�sr?cCs�|s
dS|j�dkr&|j�Sddl}y|j|�}Wntk
r]|SYnXx'dD]}|j|�|kre|SqeW|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)r@rArB)rArB)�lower�codecs�
getdecoder�LookupError)r�encodingrD�decoderr<r
r
r�normalise_encoding_name�s

	
rI�cfunc�ccall�inline�staticmethod�cclass�returns�	bytearray�str�unicode�module�function�classcCs)tj|�}|sdS|}|tkr�t|�}|dkrGdS|dkrWdS|r�|j�}|dkrydS|d
kr�dStd
||f��n�|tkr�yt|�SWq%tk
r�td||f��Yq%Xn;|tkrt|�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')rXrY)rZr[)	�directive_typesr�boolrQrCr;�int�callabler)r<r�relaxed_bool�typeZ
orig_valuer
r
r�parse_directive_valueIs:


rbcCsK|dkri}n|}x)|jd�D]}|j�}|sFq+d|krbtd|��dd�|j�jdd�D�\}}|tkr$d}|jd	�r|dd�}	xBtD]:}
|
j|	�r�d}t|
|d|�}|||
<q�W|rC|rCtd
|��q+t||d|�}|||<q+W|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|]}|j��qSr
)�strip)�.0�sr
r
r�
<listcomp>�s	z(parse_directive_list.<locals>.<listcomp>�Fz.all�Tr`zUnknown option: "%s"���)�splitrer;r�endswith�
startswithrb)rgr`Zignore_unknownZcurrent_settings�result�itemr<r�found�prefixZ	directiveZparsed_valuer
r
r�parse_directive_list�s0	+
rs)rSrN)rNrT)rT)rT)rT)rT)rT)rN)rN)rN)rS)rS)rS)rS)rTrUrN)rTrUrN)rN)rS)rS)rS)rS)rSrN)rS)rS)rS)rS)rSrT))�
__future__r�objectrZ
docstringsZembed_pos_in_docstringr1Z
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_warningsr?rIr]rarQr^r\�items�key�valZdirective_scopesrbrsr
r
r
r�<module>s	
$<