Viewing File: /opt/alt/python33/lib/python3.3/site-packages/_markerlib/__pycache__/markers.cpython-33.pyc

�
�Re�c@s�dZdddgZddlZddlZddlZddlZddlZeZyddlm	Z	Wn3e
k
r�ejdkr�dd	�Z	n�YnXiejd
6dejdd�d
6ej
jdd�dd6ejd6ej
�d6ej�d6e	�d6dd6ZxCeej��D]/Zdekr+eeeejdd�<q+q+Wdd�ZGdd�dej�Zdd�Zdd�Zej�Zdd�Zdd d�ZdS(!u�Interpret PEP 345 environment markers.

EXPR [in|==|!=|not in] EXPR [or|and] ...

where EXPR belongs to any of those:

    python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1])
    python_full_version = sys.version.split()[0]
    os.name = os.name
    sys.platform = sys.platform
    platform.version = platform.version()
    platform.machine = platform.machine()
    platform.python_implementation = platform.python_implementation()
    a free string, like '2.6', or 'win32'
udefault_environmentucompileu	interpretiN(upython_implementationujavacCsdS(NuJython((((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyupython_implementation!supython_implementationusys.platformu%s.%siupython_versionu iupython_full_versionuos.nameuplatform.versionuplatform.machineuplatform.python_implementationuextrau.u_cCs
tt�S(u2Return copy of default PEP 385 globals dictionary.(udictu_VARS(((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyudefault_environment8scBs�|EeZdZdd�Zejejejejej	ej
fZeejej
f7Zeejejejejejejejejejejf
7Zdd�Zdd�ZdS(uASTWhitelistcCs
||_dS(N(u	statement(uselfu	statement((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu__init__=suASTWhitelist.__init__cCsLt||j�s9td|jd|jdf��ntjj||�S(u-Ensure statement only contains allowed nodes.u)Not allowed in environment markers.
%s
%su u^(u
isinstanceuALLOWEDuSyntaxErroru	statementu
col_offsetuastuNodeTransformeruvisit(uselfunode((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuvisitFs
uASTWhitelist.visitcCs8tjd|jj|jf|j�}tj||�S(u&Flatten one level of attribute access.u%s.%s(uastuNameuvalueuiduattructxu
copy_location(uselfunodeunew_node((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuvisit_AttributeNs(uASTWhitelist.visit_AttributeN(u__name__u
__module__u__qualname__u__init__uastuCompareuBoolOpu	AttributeuNameuLoaduStruALLOWEDuAnduOruEquGtuGtEuInuIsuIsNotuLtuLtEuNotEquNotInuvisituvisit_Attribute(u
__locals__((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuASTWhitelist<s*FuASTWhitelistcCs.tj|dd�}t|�j|�}|S(Numodeueval(uastuparseuASTWhitelistu
generic_visit(umarkerutreeunew_tree((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyuparse_markerSsuparse_markercCst|dddd�S(Nu<environment marker>uevaludont_inheritT(u_builtin_compileuTrue(u
parsed_marker((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyucompile_markerXsucompile_markerc
s�yt|SWntk
r YnX|j�sBdddd�}n*tt|���dd�fdd�}||_|t|<t|S(uCReturn compiled marker as a function accepting an environment dict.cSsdS(uT(uTrue(uenvironmentuoverride((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	marker_fnesucompile.<locals>.marker_fncsG|dkri}n|dkr-t�}n|j|�t�|�S(uoverride updates environmentN(uNoneudefault_environmentuupdateueval(uenvironmentuoverride(ucompiled_marker(u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	marker_fnjs	
N(u_cacheuKeyErrorustripuNoneucompile_markeruparse_markeru__doc__(umarkeru	marker_fn((ucompiled_markeru+/tmp/pip-k8wh6o-build/_markerlib/markers.pyucompile^s
	
cCst|�|�S(N(ucompile(umarkeruenvironment((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu	interpretvs(u__doc__u__all__uastuosuplatformusysuweakrefucompileu_builtin_compileupython_implementationuImportErrorunameuversion_infouversionusplitumachineuNoneu_VARSulistukeysuvarureplaceudefault_environmentuNodeTransformeruASTWhitelistuparse_markerucompile_markeruWeakValueDictionaryu_cacheu	interpret(((u+/tmp/pip-k8wh6o-build/_markerlib/markers.pyu<module>s>






!
Back to Directory File Manager