hf pUddlZddlZddlZddlZddlmZmZmZmZm Z m Z m Z ddl m Z mZmZmZmZmZddlmZddlmZmZddlmZgdZeeegefZGd d eZ Gd d eZ!Gd deZ"dedefdZ# d+de eee efde edefdZ$ddej%ej&ej'ej(ej)ej*dZ+eeefe,d<dedededefdZ-dedede ed ffd!Z.d"ed#eeefdefd$Z/d%d&defd'Z0deeeffd(Z1Gd)d*Z2dS),N)AnyCallableDictListOptionalTupleUnion) MarkerAtom MarkerListOpValueVariable parse_marker)ParserSyntaxError)InvalidSpecifier Specifiercanonicalize_name) InvalidMarkerUndefinedComparisonUndefinedEnvironmentNameMarkerdefault_environmentceZdZdZdS)rzE An invalid marker was found, users should refer to PEP 508. N__name__ __module__ __qualname____doc__q/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/packaging/markers.pyrr"r"rceZdZdZdS)rzP An invalid operation was attempted on a value that doesn't support it. Nrr!r"r#rr(r$r"rceZdZdZdS)rz\ A name was attempted to be used that does not exist inside of the environment. Nrr!r"r#rr.sr"rresultsreturncrt|dtr|d\}}}t|tr/|jdkr$t |j}t |}nCt|tr.|jdkr#t |j}t |}|||f|d<|S)z! Normalize extra values. rextra) isinstancetuplervaluerr)r'lhsoprhsnormalized_extras r#_normalize_extra_valuesr25s'!*e$$"qz R c8 $ $ *g)=)=0;; ())CC X & & *39+?+?0;; ())C"c\ Nr"Tmarkerfirstct|tttfsJt|trJt |dkr7t|dttfrt |dSt|tr>d|D}|rd|Sdd|zdzSt|trdd|DS|S)Nr rc38K|]}t|dVdS)F)r4N)_format_marker.0ms r# z!_format_marker..Ws/@@A///@@@@@@r" ()c6g|]}|Sr!) serializer8s r# z"_format_marker..]s 7771777r")r+listr,strlenr7join)r3r4inners r#r7r7Es ftUC0 1 111 1 64  ) KK1   vay4- 0 0 fQi(((&$ @@@@@  /88E?? "%(3. . FE " "xx77777888 r"c ||vSNr!r.r0s r#rJcs 3#:r"c ||vSrHr!rIs r#rJrJds s#~r")inznot in=> _operatorsr.r/r0c d td||g}||dS#t$rYnwxYwt |}|td|d|d|d|||S)NT) prereleasesz Undefined z on z and .)rrEr@containsrrOgetr)r.r/r0specopers r#_eval_oprXns4",,..#!67788}}Sd}333      *~~bllnn==D |!"Mr"M"M"M"MS"M"M"MNNN 4S>>s6A AAvalueskey.cD|dkrtd|DS|S)Nr*c34K|]}t|VdSrHr)r9vs r#r;z_normalize..s+::a&q))::::::r")r,)rZrYs r# _normalizer^}s1  g~~::6:::::: Mr"markers environmentcgg}|D]%}t|tttfsJt|tr*|dt ||ft|tr|\}}}t|t r|j}||}|j} n|j}|j}||} t|| |\}} |dt||| |dvsJ|dkr|g'td|DS)N)rZ)andorrdc34K|]}t|VdSrH)all)r9items r#r;z$_evaluate_markers..s(,,Ts4yy,,,,,,r") r+rBr,rCappend_evaluate_markersrr-r^rXany) r_r`groupsr3r.r/r0environment_key lhs_value rhs_values r#ririsX "tF""&4"455555 fd # # " 2J  / DD E E E E  & & "!LCS#x(( 9"%)'8 I I "%)'8 #-i#X#X#X Iy 2J  hy"i@@ A A A A]****~~ b!!! ,,V,,, , ,,r"infozsys._version_infocd|}|j}|dkr ||dt|jzz }|S)Nz{0.major}.{0.minor}.{0.micro}finalr)format releaselevelrCserial)roversionkinds r#format_full_versionrwsH-44T::G  D w47S---- Nr"cttjj}tjj}||t jt jt jt j t jt j t j d t j ddtjd S)NrS) implementation_nameimplementation_versionos_nameplatform_machineplatform_releaseplatform_systemplatform_versionpython_full_versionplatform_python_implementationpython_version sys_platform)rwsysimplementationrunameosplatformmachinereleasesystemrpython_implementationrEpython_version_tuple)iverrzs r#rrs s19 : :D,12"&7$,..$,..#?,,$,..'688*2*H*J*J((8#@#B#B2A2#FGG    r"ceZdZdeddfdZdefdZdefdZdefdZde de fd Z d d e e eefde fd ZdS) rr3r(Nc tt||_dS#t$r"}t t ||d}~wwxYwrH)r2 _parse_marker_markersrrrC)selfr3es r#__init__zMarker.__init__sY /3M&4I4IJJDMMM"! / / /A''Q . /s!% AA  Ac*t|jSrH)r7rrs r#__str__zMarker.__str__sdm,,,r"cd|dS)Nz r!rs r#__repr__zMarker.__repr__s$4$$$$r"cRt|jjt|fSrH)hash __class__rrCrs r#__hash__zMarker.__hash__s T^,c$ii8999r"otherczt|tstSt|t|kSrH)r+rNotImplementedrC)rrs r#__eq__z Marker.__eq__s1%(( "! !4yyCJJ&&r"r`ct}d|d<|"|||dd|d<t|j|S)a$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. rQr*)rupdaterir)rr`current_environments r#evaluatezMarker.evaluates`233')G$  "  & &{ 3 3 3#7+3/1#G, 0CDDDr"rH)rrrrCrrrintrrboolrrrrr!r"r#rrs/s/t////2-----%#%%%%:#::::'C'D'''' EEHT#s(^$<EEEEEEEr"r)T)3operatorrrrtypingrrrrrrr _parserr r r rrrr _tokenizerr specifiersrrutilsr__all__rCrOperator ValueErrorrrrr2r7ltleeqnegegtrO__annotations__rXr^rirwrrr!r"r#rsi   DDDDDDDDDDDDDDDDDD*)))))33333333$$$$$$    S#J$ %J * z S S    "HL $s)Z, -6>tn< & %--  + + + +  # # Dh     # 2 C D      # %S/    -z-S#X-4----<1cT#s(^$;E;E;E;E;E;E;E;E;E;Er"