+
    WGj1                    <   R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H	t	 ^ RI
Ht ^ RIt^ RIHtHt ^ RIHt ^ RIHtHtHtHt ^ RIHtHt ^ R	IHt ^ R
IHt ^ RIH t  ^ RI!H"t"H#t#H$t$H%t% ]PL                  ! ]'4      t(R R lt)R R lt* ! R R]+4      t,]PZ                   ! R R4      4       t.]PZ                  ! RR7       ! R R4      4       t/]PZ                  ! RR7       ! R R4      4       t0]PZ                   ! R R4      4       t1R#R R llt2R R  lt3R! R" lt4R# )$z2Evaluate the links based on the given environment.)annotationsN)datetime)Any)InvalidSpecifierSpecifierSet)Tag)InvalidWheelFilenameNormalizedNamecanonicalize_nameparse_wheel_filename)InvalidVersionVersion)Fetcher)Link)get_supported)ARCHIVE_EXTENSIONSfix_legacy_specifiersplitextstrip_extrasc                    V ^8  d   QhRRRR/# )   	specifierr   returnbool )formats   "1lib/python3.14/site-packages/unearth/evaluator.py__annotate__r   %   s     ? ?\ ?d ?    c                j    \         ;QJ d    R  V  4       F  '       g   K   R# 	  R# ! R  V  4       4      # )c              3  >   "   T F  qP                   R9   x  K  	  R# 5i)==N)r!   z===)operator).0ss   & r   	<genexpr>(is_equality_specifier.<locals>.<genexpr>&   s     >Iqzz]*Is   TF)any)r   s   &r   is_equality_specifierr(   %   s+    3>I>33>3>3>I>>>r   c               $    V ^8  d   QhRRRRRR/# )r   egg_infostrcanonical_namer   
str | Noner   )r   s   "r   r   r   )   s!      # s z r   c                    \        V 4       F.  w  r#\        V R V 4      V8X  g   K  VR9   g   K#  W^,           R  u # 	  R # )N>   -_)	enumerater
   )r*   r,   ics   &&  r   parse_version_from_egg_infor4   )   s@    (#Xbq\*n<jEG$$ $ r   c                      ] tR t^0tRtR# )LinkMismatchErrorr   N)__name__
__module____qualname____firstlineno____static_attributes__r   r   r   r6   r6   0   s    r   r6   c                  l    ] tR t^4t$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   R
 R lt
R R ltRtR# )TargetPythonzTarget Python to get the candidates.

Attributes:
    py_ver: Python version tuple, e.g. ``(3, 9)``.
    platforms: List of platforms, e.g. ``['linux_x86_64']``.
    impl: Implementation, e.g. ``'cp'``.
    abis: List of ABIs, e.g. ``['cp39']``.
Nztuple[int, ...] | Nonepy_verzlist[str] | Noneabisr-   impl	platformsc                   V ^8  d   QhRR/# r   r   Noner   )r   s   "r   r   TargetPython.__annotate__D   s     2 2t 2r   c                	    R V n         R # N_valid_tagsselfs   &r   __post_init__TargetPython.__post_init__D   s
    -1r   c                   V ^8  d   QhRR/# )r   r   z	list[Tag]r   )r   s   "r   r   rE   G   s     	  	 	 	 r   c                	   V P                   fr   V P                  f   R pM0RP                  \        \        V P                  R,          4      4      p\        WP                  V P                  V P                  4      V n         V P                   # )N Nr   N)	rI   r>   joinmapr+   r   rA   r@   r?   )rK   
py_versions   & r   supported_tagsTargetPython.supported_tagsG   sh    #{{"!
WWSdkk"o%>?
,NNDIItyy D r   rH   )r7   r8   r9   r:   __doc__r>   __annotations__r?   r@   rA   rL   rU   r;   r   r   r   r=   r=   4   sC     &*F")!D
!D*"&I&2	  	 r   r=   T)frozenc                  l    ] tR t^St$ RtR]R&   R]R&   ]P                  ! RR7      tR]R	&   R
 R lt	Rt
R# )PackagezA package instance has a name, version, and link that can be downloaded
or unpacked.

Attributes:
    name: The name of the package.
    version: The version of the package, or ``None`` if the requirement is a link.
    link: The link to the package.
r+   namer-   versionF)reprr   linkc                   V ^8  d   QhRR/# )r   r   zdict[str, Any]r   )r   s   "r   r   Package.__annotate__b   s     
 
 
r   c                j    RV P                   RV P                  RV P                  P                  4       /# )z9Return a JSON-serializable representation of the package.r\   r]   r_   )r\   r]   r_   as_jsonrJ   s   &r   rc   Package.as_jsonb   s2     DIIt||DII%%'
 	
r   r   N)r7   r8   r9   r:   rW   rX   dcfieldr_   rc   r;   r   r   r   r[   r[   S   s1     Iu%D$%
 
r   r[   c                      ] tR t^kt$ ]P
                  ! ]R7      tR]R&   ]P
                  ! ]R7      t	R]R&   R R lt
R R ltR	tR
# )FormatControldefault_factoryzset[NormalizedName]only_binary	no_binaryc                    V ^8  d   QhRRRR/# )r   r,   r	   r   zset[str]r   )r   s   "r   r   FormatControl.__annotate__p   s     
 
. 
X 
r   c                	&   R R0pWP                   9   d   VP                  R4       V# WP                  9   d   VP                  R 4       V# RV P                   9   d   VP                  R4       V# RV P                  9   d   VP                  R 4       V# )binarysourcez:all:)rk   discardrl   )rK   r,   allowed_formatss   && r   get_allowed_formats!FormatControl.get_allowed_formatsp   s    #X.---##H-  ~~-##H-
 	 (((##H-  &##H-r   c               $    V ^8  d   QhRRRRRR/# )r   r_   r   project_namer+   r   rD   r   )r   s   "r   r   rn   |   s!       S T r   c                	    V P                  \        V4      4      pVP                  '       d   R V9  d   \        RV 24      hVP                  '       g   RV9  d   \        RV 24      hR# R# )rp   z binary wheel is not allowed for rq   z'source distribution is not allowed for N)rt   r
   is_wheelr6   )rK   r_   rw   rs   s   &&& r   check_formatFormatControl.check_format|   sj    223D\3RS===X_<#&F|n$UVV}}}!@#9,H  "A}r   r   N)r7   r8   r9   r:   re   rf   setrk   rX   rl   rt   rz   r;   r   r   r   rh   rh   k   s9    ')xx'DK$D%'XXc%BI"B
 r   rh   c                     ] tR t^t$ RtR]R&   ]P                  ! ]R7      t	R]R&   Rt
R]R	&   RtR]R
&   ]P                  ! ]R7      tR]R&   RtR]R&   R R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )	Evaluatora  Evaluate the links based on the given environment.

Args:
    package_name: The links must match the package name
    target_python: The links must match the target Python
    ignore_compatibility: Whether to ignore the compatibility check
    allow_yanked: Whether to allow yanked candidates
    format_control: Format control flags
    exclude_newer_than: Exclude the candidates newer than this date
r+   package_nameri   r=   target_pythonFr   ignore_compatibilityallow_yankedrh   format_controlNzdatetime | Noneexclude_newer_thanc                   V ^8  d   QhRR/# rC   r   )r   s   "r   r   Evaluator.__annotate__   s     D Dt Dr   c                	:    \        V P                  4      V n        R # rG   )r
   r   _canonical_namerJ   s   &r   rL   Evaluator.__post_init__   s    01B1BCr   c                    V ^8  d   QhRRRR/# r   r_   r   r   rD   r   )r   s   "r   r   r      s     = = =$ =r   c                	    VP                   eF   V P                  '       g2   VP                   '       d   RVP                    2MRp\        RV 24      hR # R # )Nzdue to rP   zYanked )yank_reasonr   r6   )rK   r_   r   s   && r   check_yankedEvaluator.check_yanked   sU    '0A0A0A:>:J:J:JGD$4$4#56PRK#gk]$;<< 1B'r   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r      s     	 	d 	t 	r   c                	    V P                   eO   VP                  f   \        R4      hVP                  V P                   8  d   \        RV P                    24      hR # R # )Nz:Upload time is not available but exclude_newer_than is setzUpload time is newer than )r   upload_timer6   )rK   r_   s   &&r   check_upload_timeEvaluator.check_upload_time   sh    "".''P  $"9"99'01H1H0IJ  : /r   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r      s      $ 4 r   c                	   V P                   '       g   VP                  '       d   V P                  P                  ;'       g    \        P
                  R ,          pRP                  R V 4       4      p \        \        VP                  4      4      pTP                  TR4      '       g%   \        RP                  Y1P                  4      4      hR# R# R#   \         d   p\        RTP                   24      ThRp?ii ; i)rQ   .c              3  8   "   T F  p\        V4      x  K  	  R # 5irG   )r+   )r#   vs   & r   r%   2Evaluator.check_requires_python.<locals>.<genexpr>   s     !9&Q#a&&&s   zInvalid requires-python: NTzLThe target python version({}) doesn't match the requires-python specifier {})r   requires_pythonr   r>   sysversion_inforR   r   r   r   r6   containsr   )rK   r_   r>   rT   r   es   &&    r   check_requires_pythonEvaluator.check_requires_python   s    (((T-A-A-A''..FF#2B2B22FF!9&!99J".()=)=># #++J=='77=v"$8$88  > .B( $ '/0D0D/EFs   3C C<C77C<c                    V ^8  d   QhRRRR/# )r   tagszfrozenset[Tag]r   r   r   )r   s   "r   r   r      s     H H~ H$ Hr   c                    V P                   '       d   R# VP                  V P                  P                  4       4      '       * # )z(DEPRECATED) Check if the wheel tags are compatible with the target Python.

Args:
    tags (Iterable[Tag]): The wheel tags to check.
T)r   
isdisjointr   rU   )rK   r   s   &&r   validate_wheel_tagEvaluator.validate_wheel_tag   s4     $$$??4#5#5#D#D#FGGGr   c                   V ^8  d   QhRR/# )r   filenamer+   r   )r   s   "r   r   r      s     
X 
X 
Xr   c                    V P                   '       d   R# \        V4      R,          pV P                  V4      '       g   \        RV R24      hR# )znCheck if the wheel tags are compatible with the target Python.

Args:
    filename: The filename of the wheel
NzThe wheel tags in z are not compatible)r   r   r   r6   )rK   r   r   s   && r   check_wheel_tagsEvaluator.check_wheel_tags   sN     $$$#H-b1&&t,,#&8
BU$VWW -r   c                    V ^8  d   QhRRRR/# )r   r_   r   r   zPackage | Noner   )r   s   "r   r   r      s"     BK BK$ BK> BKr   c                    V P                   P                  WP                  4       V P                  V4       V P	                  V4       V P                  V4       RpVP                  '       ds    \        VP                  4      pT P                  T^ ,          8w  d   \        RT^ ,           24      hT P                  TP                  4       \        T^,          4      pEMOVP                  P!                  R4      '       d   \#        VP                  R,          4      pMZ\%        VP                  4      w  rVV'       g   \        RVP                   24      hV\&        9  d   \        RVP                   24      h\(        P*                  ! RR4      P-                  4       R9   pV'       d)   \/        WPP                  4      pVf   \        RV 24      hMSVP1                  R	4      w  rpV	'       g   \        RV 24      h\3        V4      V P                  8w  d   \        RV R
24      h \5        V4       \;        T P                  Y!R7      #   \        \        3 d   p\        \        T4      4      RhRp?ii ; i  \         d    \        RT RT 24      Rhi ; i  \         d"   p\6        P9                  RY4        Rp?R# Rp?ii ; i)zO
Evaluate the link and return the package if it matches or None if it doesn't.
NzThe package name doesn't match eggzNot a file: zUnsupported archive format: UNEARTH_LOOSE_FILENAMEfalsez!Missing version in the filename: r/   z@, set env var UNEARTH_LOOSE_FILENAME=1 to allow legacy filename.z Invalid version in the filename z: zSkipping link %s: %s)r\   r]   r_   )1true)r   rz   r   r   r   r   ry   r   r   r   r   r6   r+   r   r   _fragment_dictgetr   r   r   osgetenvlowerr4   
rpartitionr
   r   loggerdebugr[   )
rK   r_   r]   
wheel_infor   r*   extLOOSE_FILENAMEfilename_prefixhas_versions
   &&        r   evaluate_linkEvaluator.evaluate_link   s   =	,,T3D3DEd#""4(&&t,"&G}}}>!5dmm!DJ '':a=8+9*Q-I  %%dmm4jm,&&**511+D,?,?,FGH$,T]]$;MH/,t}}o0NOO"44/:4==/J  "$,g"%']"+ "9 "6"6G /?zJ  ' =E<O<OPS<T9O'&/?zJ  )9T=Q=QQ/=hZ HQ Q  G$ D--wJJk -n= >+CF3=>\ &  +:8*BwiP   ! 	LL/9	s\   A,J /I AJ   J D"J $I4 I1I,,I11J 4JJ K J<<K)r   )r7   r8   r9   r:   rW   rX   re   rf   r=   r   r   r   rh   r   r   rL   r   r   r   r   r   r   r;   r   r   r   r~   r~      s    	 "$((<"HM<H!&$&L$$&HH]$KNMK*..D=
	(H
XBK BKr   r~   c               (    V ^8  d   QhRRRRRRRR/# )	r   packager[   requirementz"packaging.requirements.Requirementallow_prereleaseszbool | Noner   r   r   )r   s   "r   r   r     s0      3 # 
	r   c                   VP                   '       dP   \        V P                   4      \        VP                   4      8w  d#   \        P                  RWP                   4       R# V P                  '       dQ   VP
                  P                  V P                  VR7      '       g$   \        P                  RV VP
                  4       R# R# )aW  Evaluate the package based on the requirement.

Args:
    package (Package): The package to evaluate
    requirement: The requirement to evaluate against
    allow_prerelease (bool|None): Whether to allow prereleases,
        or None to infer from the specifier.
Returns:
    bool: True if the package matches the requirement, False otherwise
z*Skipping package %s: name doesn't match %sF)prereleasesz-Skipping package %s: version doesn't match %sT)r\   r
   r   r   r]   r   r   )r   r   r   s   &&&r   evaluate_packager     s     W\\*.?@P@P.QQLL<gGWGW {44==%6  >     	;!!	

 r   c               (    V ^8  d   QhRRRRRRRR/# )r   r_   r   	hash_namer+   sessionr   r   r   )r   s   "r   r   r   >  s(     	 	D 	S 	7 	s 	r   c                r   \         P                  ! V4      pVP                  V P                  4      ;_uu_ 4       pVP	                  RR7       F  pVP                  V4       K  	  RRR4       VP                  4       pV P                  '       g   / V n        W`P                  V&   V#   + '       g   i     LI; i)i   )
chunk_sizeNi    )hashlibnew
get_stream
normalized
iter_bytesupdate	hexdigesthashes)r_   r   r   hasherrespchunkdigests   &&&    r   	_get_hashr   >  s    [[#F			DOO	,	,___9EMM%  : 
- F;;;#KK	M 
-	,s   +B&&B6	c               (    V ^8  d   QhRRRRRRRR/# )	r   r   r[   r   zdict[str, list[str]]r   r   r   r   r   )r   s   "r   r   r   J  s,     ( ((2(=D(	(r   c                2   V'       g   R # V P                   pVP                  pV'       d;   VP                  4        F&  w  rVWT9   g   K  WE,          ^ ,          pWv9  d    R#  R # 	  \        \	        VP                  4       4      4      w  rV\        W5V4      pWv9   # )TF)r_   hash_optionitemsnextiterr   )r   r   r   r_   link_hashesr   allowed_hashes
given_hashs   &&&     r   validate_hashesr   J  s     <<D""K)/%I'(3A6
3  *8 !%T&,,.%9 :I4G4J''r   rG   )5rW   
__future__r   dataclassesre   r   loggingr   r   r   typingr   packaging.requirements	packagingpackaging.specifiersr   r   packaging.tagsr   packaging.utilsr   r	   r
   r   packaging.versionr   r   unearth.fetchersr   unearth.linkr   unearth.pep425tagsr   unearth.utilsr   r   r   r   	getLoggerr7   r   r(   r4   
ValueErrorr6   	dataclassr=   r[   rh   r~   r   r   r   r   r   r   <module>r      s   8 "    	 
    ?   6 $  ,  
		8	$?	
 	      < T
 
 
. T  4 RK RK RKjD	(r   