ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyc

�
�2{Yc@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	dgZ
defd��YZdd	�ZdS(
sEParser for the environment markers micro-language defined in PEP 345.i����Ni(tpython_implementationtstring_types(tin_venvt	interprett	EvaluatorcBs^eZdZi	d�d6d�d6d�d6d�d6d	�d
6d�d6d
�d6d�d6d�d6Zi	ejd6dejd d6ejjdd�dd6e	j
d6ee��d6ej
�d6ej�d6ej�d6e�d 6Zd,d!�Zd"�Zd#�Zd,d$�Zd%�Zd&�Zd'�Zd(�Zd)�Zd*�Zd+�ZRS(-s5
    A limited evaluator for Python expressions.
    cCs
||kS(N((txty((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt<lambda>steqcCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRstgtcCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRstgtecCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRstincCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRstltcCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRstltecCs|S(N((R((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyR stnotcCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyR!stnoteqcCs
||kS(N((RR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyR"stnotintsys_platforms%s.%sitpython_versiont iitpython_full_versiontos_nametplatform_in_venvtplatform_releasetplatform_versiontplatform_machinetplatform_python_implementationcCs|p	i|_d|_dS(su
        Initialise an instance.

        :param context: If specified, names are looked up in this mapping.
        N(tcontexttNonetsource(tselfR((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt__init__3scCsHd}d|j|||!}||t|j�krD|d7}n|S(sH
        Get the part of the source which is causing a problem.
        i
s%rs...(Rtlen(Rtoffsettfragment_lents((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytget_fragment<s

cCst|d|d�S(s@
        Get a handler for the specified AST node type.
        sdo_%sN(tgetattrR(Rt	node_type((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytget_handlerFscCst|t�r�||_idd6}|r8||d<nytj||�}Wq�tk
r�}|j|j�}td|��q�Xn|jj	j
�}|j|�}|dkr�|jdkr�d}n|j|j
�}td||f��n||�S(sf
        Evaluate a source string or node, using ``filename`` when
        displaying errors.
        tevaltmodetfilenamessyntax error %ss(source not available)s don't know how to evaluate %r %sN(t
isinstanceRRtasttparsetSyntaxErrorR$R!t	__class__t__name__tlowerR'Rt
col_offset(RtnodeR*tkwargsteR#R&thandler((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytevaluateLs&	

	cCs5t|tj�std��d|jj|jfS(Nsattribute node expecteds%s.%s(R+R,t	AttributetAssertionErrortvaluetidtattr(RR3((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytget_attr_keyfscCs�t|jtj�st}n-|j|�}||jkpH||jk}|sdtd|��n||jkr�|j|}n
|j|}|S(Nsinvalid expression: %s(	R+R:R,tNametFalseR=Rtallowed_valuesR.(RR3tvalidtkeytresult((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytdo_attributejs	
c	Cs�|j|jd�}|jjtjk}|jjtjk}|sR|sRt�|r^|sk|r�|r�xD|jdD]2}|j|�}|r�|s�|ry|ryPqyqyWn|S(Nii(R7tvaluestopR/R,tOrtAndR9(RR3RCtis_ortis_andtn((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt	do_boolopxsc	s���fd�}�j}�j|�}t}x�t�j�j�D]�\}}|||�|jjj�}|�j	kr�t
d|��n�j|�}�j	|||�}|s�Pn|}|}qFW|S(Ncsbt}t|tj�r3t|tj�r3t}n|s^�j�j�}td|��ndS(NsInvalid comparison: %s(tTrueR+R,tStrR?R$R2R.(tlhsnodetrhsnodeRAR#(R3R(sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytsanity_check�s$	sunsupported operation: %r(tleftR7RMtziptopstcomparatorsR/R0R1t	operatorsR.(	RR3RQROtlhsRCRFRPtrhs((R3RsL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt
do_compare�s 
	"

cCs|j|j�S(N(R7tbody(RR3((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt
do_expression�scCs|t}|j|jkr1t}|j|j}n+|j|jkr\t}|j|j}n|sxtd|j��n|S(Nsinvalid expression: %s(R?R;RRMR@R.(RR3RARC((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytdo_name�scCs|jS(N(R#(RR3((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pytdo_str�sN(R0t
__module__t__doc__RVtsystplatformtversion_infotversiontsplittostnametstrRtreleasetmachineRR@RRR$R'R7R=RDRLRYR[R\R](((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyRs@














		
							cCst|�j|j��S(s�
    Interpret a marker and return a result depending on environment.

    :param marker: The marker to interpret.
    :type marker: str
    :param execution_context: The context used for name lookup.
    :type execution_context: mapping
    (RR7tstrip(tmarkertexecution_context((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyR�s	(R_R,ReR`RatcompatRRtutilRt__all__tobjectRRR(((sL/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/distlib/markers.pyt<module>s	�

Zerion Mini Shell 1.0