usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyc000064400000017757147205636030020501 0ustar00 abc@sdZddlZddlZddlZddlZddlmZmZddlm Z dgZ de fdYZ dd ZdS( sEParser for the environment markers micro-language defined in PEP 345.iNi(tpython_implementationt string_types(tin_venvt interprett EvaluatorcBs^eZdZi dd6dd6dd6dd6d d 6d d 6d d6dd6dd6Zi ejd6dejd d6ejjdddd6e j d6e e d6ej d6ejd6ejd6ed 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((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyttteqcCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRRtgtcCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRRtgtecCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRRtincCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRRtltcCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRRtltecCs| S(N((R((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyR RtnotcCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyR!RtnoteqcCs ||kS(N((RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyR"Rtnotint 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((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt__init__3scCsHd}d|j|||!}||t|jkrD|d7}n|S(sH Get the part of the source which is causing a problem. i s%rs...(Rtlen(Rtoffsett fragment_lents((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt get_fragment<s  cCst|d|dS(s@ Get a handler for the specified AST node type. sdo_%sN(tgetattrR(Rt node_type((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt get_handlerFscCst|tr||_idd6}|r8||dRtallowed_valuesR/(RR4tvalidtkeytresult((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt do_attributejs  cCs|j|jd}|jjtjk}|jjtjk}|sR|sRt|r^|sk|r| rxD|jdD]2}|j|}|r|s|ry| ryPqyqyWn|S(Nii(R8tvaluestopR0R-tOrtAndR:(RR4RDtis_ortis_andtn((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt do_boolopxs c sfd}j}j|}t}xtjjD]\}}||||jjj}|j krt d|nj|}j |||}|sPn|}|}qFW|S(Ncsbt}t|tjr3t|tjr3t}n|s^jj}td|ndS(NsInvalid comparison: %s(tTrueR,R-tStrR@R%R3R/(tlhsnodetrhsnodeRBR$(R4R(s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt sanity_checks $ sunsupported operation: %r( tleftR8RNtziptopst comparatorsR0R1R2t operatorsR/( RR4RRRPtlhsRDRGRQtrhs((R4Rs?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt do_compares  "  cCs|j|jS(N(R8tbody(RR4((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyt do_expressionscCs|t}|j|jkr1t}|j|j}n+|j|jkr\t}|j|j}n|sxtd|jn|S(Nsinvalid expression: %s(R@R<RRNRAR/(RR4RBRD((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pytdo_namescCs|jS(N(R$(RR4((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pytdo_strsN(R1t __module__t__doc__RWtsystplatformt version_infotversiontsplittostnametstrRtreleasetmachineRRARR R%R(R8R>RERMRZR\R]R^(((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRs@                      cCst|j|jS(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 (RR8tstrip(tmarkertexecution_context((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyRs (R`R-RfRaRbtcompatRRtutilRt__all__tobjectRRR(((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyts     usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyc000064400000026674147205665430020777 0ustar00 abc@`suddlmZmZmZddlZddlZddlZddlZddlm Z m Z m Z m Z ddlm Z mZmZmZddlmZddlmZddlmZmZd d d d d gZd efdYZd efdYZd efdYZdefdYZdefdYZdefdYZ defdYZ!ededBedBedBedBedBedBed Bed!Bed"Bed#Bed$Bed%Bed&Bed'Bed(Bed)Bed*BZ"id#d$6d"d%6dd&6dd'6dd(6dd)6Z#e"j$d+ed,ed-Bed.Bed/Bed0Bed1Bed2Bed3BZ%e%ed4Bed5BZ&e&j$d6ed7ed8BZ'e'j$d9ed:ed;BZ(e"e'BZ)ee)e&e)Z*e*j$d<ed=j+Z,ed>j+Z-eZ.e*ee,e.e-BZ/e.e/e e(e.>e e.e Z0d?Z1e2d@Z3idAd56dBd46ej4d36ej5d/6ej6d-6ej7d06ej8d.6ej9d26Z:dCZ;eZ<dDZ=dEZ>dFZ?dGZ@d efdHYZAdS(Ii(tabsolute_importtdivisiontprint_functionN(tParseExceptiont ParseResultst stringStartt stringEnd(t ZeroOrMoretGrouptForwardt QuotedString(tLiterali(t string_types(t SpecifiertInvalidSpecifiert InvalidMarkertUndefinedComparisontUndefinedEnvironmentNametMarkertdefault_environmentcB`seZdZRS(sE An invalid marker was found, users should refer to PEP 508. (t__name__t __module__t__doc__(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRscB`seZdZRS(sP An invalid operation was attempted on a value that doesn't support it. (RRR(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR!scB`seZdZRS(s\ A name was attempted to be used that does not exist inside of the environment. (RRR(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR'stNodecB`s,eZdZdZdZdZRS(cC`s ||_dS(N(tvalue(tselfR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt__init__0scC`s t|jS(N(tstrR(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt__str__3scC`sdj|jjt|S(Ns <{0}({1!r})>(tformatt __class__RR(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt__repr__6scC`s tdS(N(tNotImplementedError(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt serialize9s(RRRRRR!(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR.s   tVariablecB`seZdZRS(cC`s t|S(N(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR!?s(RRR!(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR"=stValuecB`seZdZRS(cC`s dj|S(Ns"{0}"(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR!Es(RRR!(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR#CstOpcB`seZdZRS(cC`s t|S(N(R(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR!Ks(RRR!(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR$Istimplementation_versiontplatform_python_implementationtimplementation_nametpython_full_versiontplatform_releasetplatform_versiontplatform_machinetplatform_systemtpython_versiont sys_platformtos_namesos.names sys.platformsplatform.versionsplatform.machinesplatform.python_implementationtpython_implementationtextracC`sttj|d|dS(Ni(R"tALIASEStget(tstltt((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pytkts===s==s>=s<=s!=s~=t>tst RARB( RCtlistR@R tAssertionErrortlenRHtjoinR!(tmarkerRGtinnerRK((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRHs! &cC`s ||kS(N((tlhstrhs((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR7R8cC`s ||kS(N((RSRT((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyR7R8cC`sy%tdj|j|g}Wntk r8nX|j|Stj|j}|dkrtdj |||n|||S(NR8s#Undefined {0!r} on {1!r} and {2!r}.( R RPR!Rtcontainst _operatorsR3tNoneRR(RStopRTtspectoper((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt_eval_ops%   cC`s:|j|t}|tkr6tdj|n|S(Ns/{0!r} does not exist in evaluation environment.(R3t _undefinedRR(t environmenttnameR((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyt_get_envs  c C`s,gg}x |D]}t|tttfs4tt|tr`|djt||qt|tr|\}}}t|trt||j }|j }n|j }t||j }|djt |||q|dkst|dkr|jgqqWt d|DS(NiR>R?cs`s|]}t|VqdS(N(tall(RJtitem((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pys s(R>R?( RCRMR@R RNtappendt_evaluate_markersR"R_RR[tany( tmarkersR]tgroupsRQRSRXRTt lhs_valuet rhs_value((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRcs"      cC`sFdj|}|j}|dkrB||dt|j7}n|S(Ns{0.major}.{0.minor}.{0.micro}tfinali(Rt releaselevelRtserial(tinfotversiontkind((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pytformat_full_versions   cC`sttdr0ttjj}tjj}n d}d}i |d6|d6tjd6tjd6tj d6tj d 6tjd 6tj d 6tj d 6tj d d6tjd6S(Ntimplementationt0R8R'R%R/R+R)R,R*R(R&iR-R.( thasattrtsysRoRpRmR^tostplatformtmachinetreleasetsystemR-R0(tiverR'((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRs"       cB`s/eZdZdZdZddZRS(cC`seyttj||_WnBtk r`}dj|||j|jd!}t|nXdS(Ns+Invalid marker: {0!r}, parse error at {1!r}i(RDtMARKERt parseStringt_markersRRtlocR(RRQteterr_str((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRs cC`s t|jS(N(RHR|(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRscC`sdjt|S(Ns(RR(R((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRscC`s5t}|dk r%|j|nt|j|S(s$Evaluate a marker. Return the boolean from evaluating the given marker against the environment. environment is an optional argument to override all or part of the determined environment. The environment is determined from the current Python process. N(RRWtupdateRcR|(RR]tcurrent_environment((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pytevaluate"s  N(RRRRRRWR(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyRs   (Bt __future__RRRtoperatorRtRuRstpip._vendor.pyparsingRRRRRRR R R tLt_compatR t specifiersR Rt__all__t ValueErrorRRRtobjectRR"R#R$tVARIABLER2tsetParseActiont VERSION_CMPt MARKER_OPt MARKER_VALUEtBOOLOPt MARKER_VARt MARKER_ITEMtsuppresstLPARENtRPARENt MARKER_EXPRt MARKER_ATOMRzRDtTrueRHtlttleteqtnetgetgtRVR[R\R_RcRoRR(((sA/usr/lib/python2.7/site-packages/pip/_vendor/packaging/markers.pyts|    ""     E