+
    UBiW                    |   ^ RI Ht ^RIHtHtHt ^RIHt ^RIH	t	H
t
HtHt ^RIHt ^RIHt ^RIHt ^ RIHt ^ R	It^ R	It^ R	It^ R	It]P4                  '       dJ   ^ R
IHt ^RIHt ^RIHt  ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]4      t# ! R R]4      t$ ! R R]4      t% ! R R]4      t&R	# )    )annotations)ExternalDependencyDependencyExceptionDependencyTypeName)PkgConfigDependency)
Popen_safe	join_argsversion_compareversion_compare_many)	OptionKey)ExternalProgram)mlog)EnumN)	TypedDict)Environment)DependencyObjectKWsc                  J    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R	&   R
tR# )DubDescriptionT.List[str]platformarchitecturestr	buildTypezT.List[DubPackDesc]packageszT.List[DubTargetDesc]targets N__name__
__module____qualname____firstlineno____annotations____static_attributes__r       @/usr/lib/python3.14/site-packages/mesonbuild/dependencies/dub.pyr   r      s    !!%%&&r$   r   c                  ^    ] tR t^ t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R
tR# )DubPackDescr   nameversionboolactiveconfigurationpath
targetTypetargetFileNamer   Nr   r   r$   r%   r'   r'       s'    		r$   r'   c                  @    ] tR t^)t$ R]R&   R]R&   R]R&   R]R&   RtR	# )
DubTargetDescr   rootPackager   linkDependenciesDubBuildSettingsbuildSettingscacheArtifactPathr   Nr   r   r$   r%   r1   r1   )   s    %%''r$   r1   c                  h    ] tR t^/t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R]R
&   RtR# )r4   r   importPathsstringImportPathsversionsr   mainSourceFilesourceFilesdflagslibslflagsr   Nr   r   r$   r%   r4   r4   /   s2      &&  r$   r4   c                  ,    ] tR t^9t$ R]R&   R]R&   RtR# )FindTargetEntryr   searchartifactPathr   Nr   r   r$   r%   rA   rA   9   s    r$   rA   c                      ] tR t^=tRtRtRtR# )DubDescriptionSourcelocalexternalr   N)r   r   r    r!   LocalExternalr#   r   r$   r%   rE   rE   =   s    EHr$   rE   c                     a  ] tR t^At$ RtR]R&   RtRtRRRRR	R
/tR]R&   R V 3R llt	R R lt
R R ltR R ltR R ltRR R lltRR R lltR R ltRtV ;t# )DubDependencyN)T.Optional[T.Tuple[ExternalProgram, str]]class_dubbinF dmdgccgdcllvmldczT.Mapping[str, str]_ID_MAPc               $    V ^8  d   QhRRRRRR/# )   r(   r   environmentz'Environment'kwargsr   r   )formats   "r%   __annotate__DubDependency.__annotate__N   s'     v vS v} vFY vr$   c           	     	
  <a aaaaaaa  \         S!S `  \        R 4      W#RR7       VS n        ^RIHpHp \         S!S `  4       p\        Wd4      '       g   Q hVS n	        VP                  R4      e   VR,          S n        \        P                  f;   \        P                  '       g%   S P                  4       \        n        R\        n        \        P                  f    S P                  '       d   \!        R4      hR# \        P                  w  S n        p\        S P"                  \$        4      '       g   Q h\'        VR4      S n        \'        VR	4      S n        \'        VR	4      S n        S P(                  '       gS   S P*                  '       gA   S P                  '       d   \!        R
V R24      h\.        P0                  ! RV RV R24       R# \.        P2                  ! RP5                  VS P"                  P7                  4       4      4       S P                  P8                  o\;        VP<                  P>                  PA                  \C        R4      4      4      oSR8X  d   RoM	SR8X  d   RoS PE                  SS4      pVf   R# Vw  oop	S PF                  S P                  PI                  4       ,          o. S n%        . ;S n&        S n'        RoSR,           U
u/ uF  qR,          V
bK  	  up
o R VVVVVV VV 3R llp/ pRpSR,           EF  pWVR,          &   VR,          '       g   K   VR,          V8X  g   K0  VR,          RA9  d7   \.        PP                  ! \.        PR                  ! V4      RVR,          4        R# S PT                  ez   VR ,          p\W        VS PT                  4      ^ ,          '       gN   \.        PP                  ! \.        PR                  ! V R!V 24      R"R#PY                  S PT                  4      4        R# RpVR ,          S n-        VS n.        EK  	  V'       g   \.        PP                  ! R$V R%24       V	\^        P`                  J dF   \.        Pb                  ! R&4       \.        Pb                  ! \.        PR                  ! R'V 24      4       R# V	\^        Pd                  J d   \g        R(V 24      hR# VS 9  d~   S P\                  R,          R8X  d/   \.        PP                  ! R)\.        PR                  ! R4      R*4       R# \.        PP                  ! R+\.        PR                  ! S P                  4      4       R# RS n4        V! S P\                  4      '       g   R# S V,          R,,           F  pVV,          pV! V4      '       d   K   R# 	  S'       dV   \.        Pb                  ! R-\.        PR                  ! R.4      4       \.        Pb                  ! \.        PR                  ! S4      4       S V,          R/,          pVR0,           F  pS PJ                  Pk                  V4       K   	  VR1,           F%  pS PJ                  Pk                  R2V,           4       K'  	  VR3,           Fk  pR4VS P                  Pl                  ,          9  d    MHVS P                  Pl                  ,          R4,          pS PJ                  Pk                  V R5V 24       Km  	  VR6,           Fk  pR VS P                  Pl                  ,          9  d    MHVS P                  Pl                  ,          R ,          pS PJ                  Pk                  V R5V 24       Km  	  VR7,          '       d#   S PJ                  Pk                  VR7,          4       VR8,           FN  pVPo                  R94      '       g   VPo                  R:4      '       g   K3  S PL                  Pk                  V4       KP  	  VR;,           F  pS PL                  Pk                  V4       K   	  S Pp                  Pr                  Pt                  Pw                  4       pV'       d   . RBOpVR<,           EF,  p\x        P                  R=8w  d   \{        VVRRR>R/4      pVP|                  '       d   VP                  4        F  pS PJ                  Pk                  V4       K   	  VP                  4        F  pS PL                  Pk                  V4       K   	  VP                  RR?7       F  pS PN                  Pk                  V4       K   	  K  V'       d-   VX9   d&   S PL                  Pk                  VR9,           4       EK
  S PL                  Pk                  R@V,           4       EK/  	  RS n>        R# u up
i )Cdubd)language)	DCompilerd_feature_argsrequiredNTzDUB not found.z<=1.31.1z>=1.35.0zDUB version z^ is not compatible with Meson (can't locate artifacts in DUB's cache). Upgrade to Dub >= 1.35.zDUB dependency z not found because Dub z^ is not compatible with Meson. (Can't locate artifacts in DUB's cache). Upgrade to Dub >= 1.35z4Determining dependency {!r} with DUB executable {!r}	buildtypedebugoptimizedzrelease-debugminsizereleaseFr   r2   c                    V ^8  d   QhRRRR/# )rV   pkgr'   returnr*   r   )rY   s   "r%   rZ   ,DubDependency.__init__.<locals>.__annotate__   s     &	 &	[ &	T &	r$   c           
       < V R ,           RV R,           2pSV R ,          ,          pS
P                  SWS	4      w  r4VEfK   V'       g.   \        P                  ! \        P                  ! V4      R4       EMRV9  dC   \        P                  ! \        P                  ! V4      R\        P                  ! S	4      4       EMS	R8w  dc   RV9  d\   \        P                  ! \        P                  ! V4      R\        P                  ! S	 R	S
P                  P
                   24      4       EM!R
V9  dB   \        P                  ! \        P                  ! V4      R\        P                  ! S4      4       MRV9  dX   \        P                  ! \        P                  ! V4      R\        P                  ! RP                  SR,          4      4      4       M{RV9  dJ   \        P                  ! \        P                  ! V4      R\        P                  ! V R,          4      R4       M+\        P                  ! \        P                  ! V4      R4       \        P                  ! R4       \        P                  ! \        P                  ! S4      4       R# RV9  dC   \        P                  ! \        P                  ! V4      R\        P                  ! S4      4       RoS
P                  P                  V4       R# )r(   @r)   z	not foundcompilerzfound but not compiled with rQ   compiler_versionzfound but not compiled with-archzfound but not compiled forr   .r,   zfound but not compiled for thezIYou may try the following command to install the necessary DUB libraries:F
build_typezfound but not compiled asT)_find_target_in_cacher   errorboldrm   r)   joinlogwarning	link_argsappend)rh   pack_idtgt_desctgt_filecompatibilities	build_cmddescriptiondub_archdub_buildtypedub_comp_idselfshow_buildtype_warningr   s   &    r%   find_package_target3DubDependency.__init__.<locals>.find_package_target   s    VQs9~&67Gs6{+H*.*D*D[RUal*m'X&JJtyy1;?6JJtyy13QSWS\S\]hSij E).@.WJJtyy13P#yyK=$--:O:O9P)QRT?2JJtyy13OQUQZQZ[cQde6JJtyy13O#yy+j2I)JKM$O;JJtyy13S#yy_)=>Q JJtyy1;?de9-.?2TYYw/1LdiiXeNfg)-&NN!!(+r$   r   r(   r+   r.   sourceLibraryz+found but it isn't a static library, it is:r)   rl   z-does not satisfy all version requirements of: zCould not find z in DUB description.zLMake sure that the dependency is registered for your dub project by running:zdub add z2`dub describe` succeeded but it does not contains zDUB targets of typezare not supported.z%Could not find target description forr3   zKIf it is not suitable, try the following command and reconfigure Meson withz--clearcacher5   r=   r8   z-Ir9   
import_dir=r:   r;   r<   z.libz.ar?   r>   ntsilent)rawz-l)libraryr   staticLibrary)kernel32user32gdi32winspoolshell32ole32oleaut32uuidcomdlg32advapi32ws2_32)Asuper__init__r   r(   compilers.dr`   ra   get_compiler
isinstancerm   getrb   rK   rM   class_dubbin_searched
_check_dubr   dubbinr   r
   _search_in_cache_use_cache_describe_dub_has_build_deepr   rx   debugrY   get_pathrp   r   coredataoptstoreget_value_forr   _get_dub_descriptionrT   get_idcompile_argsry   raw_link_argsrt   ru   version_reqsr   rv   r)   rh   rE   rH   rw   rI   RuntimeErrorstaticrz   idendswithenvmachineshost
is_windowsosr   is_foundget_compile_argsget_link_args)"r   r(   rW   rX   r`   ra   
_temp_compdubverresultdescription_sourcetr   r   found_itrh   verlink_depbsflagr-   filer   winlibslibpkgdepargr   r   r   r   r   r   r   	__class__s"   f&&&                      @@@@@@@r%   r   DubDependency.__init__N   s   +E2KRUV	;W)+
*0000"::j!-":.DM%%-m6Y6Y6Y)-):M&26M/%%-}}})*:;; - : :f$++7777 !0
 C#26:#F #26:#F $$$T-E-E-E}}})"6( +X XY Y tf4KF8 T7 7 8 

  &t{{';';'=>	@ ==%% K0099GG	R]H^_` ,,+Mi'%M**8]C>5;2Y 2ll4==#7#7#9:.00+!& 1<I0FG0F1]#Q&0FG&	 &	` .0z**C$'S[!x== 6{d"|$,YYJJtyy0]"<02$$0i.C/T5F5FGJJ

499vQse_#=#R#&88D,=,=#>@ "9~/ +2 JJ.BCD!%9%?%??ghXdV#456  $';'D'DD"%WX\W]#^__wxx%8 

0$))O2LNbc  

BDIIdiiDXY  #488,,  &899H8$C&s++ :
 "HHbdhdmdmn|d}~HHTYYy)* T]?+xLLD$$T* ! }%%D$$TD[1 & *++D>$--2B2B#CC!$--"2"23LAD$$vQtf%56	 , j>>Ct}}/?/? @@!$--"2"23I>D$$vQse_5	 " $$R(8%9: }%%D}}V$$d(;(;%%d+ &
 xLLDNN!!$' ! XX&&++668
MG f::Cww$,S+
DRZ\`?ab???%668))005  9%335--c2  6%333=**11#6  >cWn%%cFl3 NN!!$s(+% ( e Hs   f c               $    V ^8  d   QhRRRRRR/# )rV   r   r   r   ri   z>T.Optional[T.Tuple[DubDescription, str, DubDescriptionSource]]r   )rY   s   "r%   rZ   r[   I  s&     / /S / /  JH /r$   c                	  a aa R  VVV 3R llpRRS,           RS,           RS P                   P                  4       R,          ,           .p\        V! 4       4      p\        P                  pS P                  V4      w  rxp	V^ 8X  d   \        P                  ! V4      WV3# S P                  p
S P                  e   \        S P                  4      ^8  d8   \        P                  ! R4       \        P                  ! R4       \        R	4      h\        S P                  4      ^8X  d"   V
R
S P                  ^ ,          ,           ,          p
RV
RS,           RS,           RS P                   P                  4       R,          ,           .p\        V! 4       V
.,           4      p\        P                  pS P                  V4      w  rxp	V^ 8X  d   \        P                  ! V4      WV3# \        P                  ! RV	,           4       RV	9   dV   \        P                  ! \        P                   ! V
4      R4       \        P"                  ! \        P                   ! V4      4       R# )c                   V ^8  d   QhRR/# )rV   ri   r   r   )rY   s   "r%   rZ   8DubDependency._get_dub_description.<locals>.__annotate__J  s     
	 
	; 
	r$   c                    < SP                   '       d   . ROp M. ROp V RS,           RSP                  P                  4       R,          ,           RS,           .,           # )r]   --arch=--compiler=--build=)r]   buildz--deep)r]   runz--yeszdub-build-deepz--)r   rm   get_exelist)cmdr   r   r   s    r%   get_build_command=DubDependency._get_dub_description.<locals>.get_build_commandJ  sU    '''0EH$ 9 9 ;B ??]*  r$   describer   r   r   NzIMultiple version requirements are not supported for raw dub dependencies.z1Please specify only an exact version like '1.2.3'zDMultiple version requirements are not solvable for raw dub depenciesrl   zDUB describe failed: locallyz:is not present locally. You may try the following command:r   )rm   r   r	   rE   rH   _call_dubbinjsonloadsr(   r   lenr   rt   r   rI   r   ru   rw   )r   r   r   r   describe_cmdhelper_buildsourceretreserr	pack_specs   fff        r%   r   "DubDependency._get_dub_descriptionI  s   
	 
	 	H,&8Q8Q8STV8W(W
 !!2!45%++)),7#!8JJsO\::II	(4$$%)

fg

NO)*pqqT&&'1,S4#4#4Q#777	 	9x#7&8Q8Q8STV8W(W
 !!2!4	{!BC%..)),7#!8JJsO\::

*S01JJtyy+-ijHHTYY|,-r$   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )rV   descr   pkg_descr'   r|   r1   r   r   ri   z$T.Tuple[T.Optional[str], T.Set[str]]r   )rY   s   "r%   rZ   r[   ~  s9     K' K'. K'K K'(5K'DGK'#GK'r$   c                	  a \         P                  ! R VR,          4       V P                  '       dA   VR,          p\        P                  P                  V4      '       d   V0 Rm3# R	\        4       3# V P                  '       g   Q hV P                  V4      p0 Rmp\        4       pV P                  V4       EFM  p	V	R
,          p
\        P                  P                  V
4      '       g    \         P                  ! RV
,           4       KQ  \        4       pV	R,          o\         P                  ! RS,           4       \         P                  ! RV4       VR,          S9   d   VP                  R4       VR,          S9   d   VP                  R4       \        ;QJ d&    V3R lVR,           4       F  '       d   K   RM	  RM! V3R lVR,           4       4      '       d   VP                  R4       \        ;QJ d&    V3R lVR,           4       F  '       d   K   RM	  RM! V3R lVR,           4       4      '       d   VP                  R4       VS9   d   VP                  R4       V'       dA   \        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   VP                  R4       VP                  V4      '       d   \         P                  ! RV
4       W3u # \        P                  W4      pEKP  	  R	V3# )z%Searching in DUB cache for compatibler/   r6   r,   r   rp   rm   rn   rr   NrC   z&WARNING: Could not find a Dub target: rB   zsearching compatibility in compiler_versionsr   c              3  ,   <"   T F	  qS9   x  K  	  R # 5iNr   ).0r   rB   s   & r%   	<genexpr>6DubDependency._find_target_in_cache.<locals>.<genexpr>  s     G6F(v%6F   FTc              3  ,   <"   T F	  qS9   x  K  	  R # 5ir   r   )r   rp   rB   s   & r%   r   r     s     C.Bd6>.Br   r   c              3  ,   <"   T F	  qS9   x  K  	  R # 5ir   r   )r   cvrB   s   & r%   r   r     s     'M}f}r   Found>   rp   rm   r   rr   r,   rn   >   rp   rm   r   r,   rn   )r   r   r   r   r-   existssetr   _get_comp_versions_to_find_cache_entriesaddallanyissubsetunion)r   r   r   r|   r   r}   comp_versions
check_listr~   entrytargetcompsrB   s   &&&&&       @r%   rs   #DubDependency._find_target_in_cache~  s5    	

:HEU<VW ### 34Hww~~h'' "uvvce}$$$$$$ 77D
 [
&)e((2E>*F77>>&)) 

CfLM
 !$E8_FJJ4v=>JJ*M:(F2		/*K F*		,'sGd:6FGsssGd:6FGGG		*%sCd>.BCsssCd>.BCCC		&!f$		*% CC'M}'MCCC'M}'M$M$M		,-""5))

7F+&"%))O"CQ 3T o&&r$   c                    V ^8  d   QhRRRR/# )rV   r   r'   ri   zT.List[FindTargetEntry]r   )rY   s   "r%   rZ   r[     s     
 
{ 
7N 
r$   c                	   \         P                  P                  VR ,          RR4      p\         P                  P                  V4      '       g   \        P
                  ! RV4       . # \        P                  ! RV4       \         P                  ! V4       Uu. uF.  pRVR\         P                  P                  W#VR,          4      /NK0  	  up# u upi )r-   z.dubr   zNo such cache folder:zChecking in DUB cache folderrB   rC   r/   )r   r-   rv   r   r   rx   r   listdir)r   r   dub_build_path	dir_entrys   &&  r%   r   DubDependency._cache_entries  s    hv&6Hww~~n--LL0.AI

1>B  ZZ7

 8	 )^QaHb c 8
 	
 
s   4Cc                    V ^8  d   QhRRRR/# )rV   r   r   ri   r   r   )rY   s   "r%   rZ   r[     s      c k r$   c           	     	.   VR 8X  d   . # V P                   P                  .pV P                  R.4      R,          w  r4V^ 8w  d]   \        P                  ! R\        P
                  ! RP                  V P                  P                  4       R.,           4      4      4       . # \        P                  ! RV4      pVe\   VP                  4       pVP                  R^4      ^ ,          P                  RR4      P                  RR4      pVP                  Wg.4       V# )	rQ   	--versionr   rV   NzFailed to runr   zv[0-9].[0-9][0-9][0-9].[0-9]rq   vrN   )rm   r)   _call_compbinr   rt   ru   rv   r   get_commandrerB   grouprsplitreplaceextend)r   r   r  r   r   	d_ver_regfrontend_versionfrontend_ids   &&      r%   r   (DubDependency._get_comp_versions_to_find  s     %I../%%{m4S9!8JJ		#((4;;;R;R;TXcWd;d2e(fgIII<cB	 (0*11#q9!<DDR b)   "2!@Ar$   c               $    V ^8  d   QhRRRRRR/# rV   argsr   r   zT.Optional[T.Dict[str, str]]ri   zT.Tuple[int, str, str]r   )rY   s   "r%   rZ   r[     s#     6 6 63O 6[q 6r$   c                	*   \        V P                  \        4      '       g   Q h\        V P                  P	                  4       V,           W P
                  P                  4       R 7      w  r4pVP                  VP                  4       VP                  4       3# ))r   cwd)	r   r   r   r   r  r   get_source_dir
returncodestripr   r"  r   poutr   s   &&&   r%   r   DubDependency._call_dubbin  sg    $++7777 !8!8!:T!AsPXPXPgPgPij||SYY[#))+55r$   c               $    V ^8  d   QhRRRRRR/# r!  r   )rY   s   "r%   rZ   r[     s#     6 6+ 64P 6\r 6r$   c                	    \        V P                  P                  4       V,           VR 7      w  r4pVP                  VP	                  4       VP	                  4       3# ))r   )r   rm   r   r&  r'  r(  s   &&&   r%   r  DubDependency._call_compbin  sA     !:!:!<t!CM||SYY[#))+55r$   c                   V ^8  d   QhRR/# rV   ri   rL   r   )rY   s   "r%   rZ   r[     s     $ $E $r$   c                	   R  R lpV! 4       pVf.   \         P                  ! R\         P                  ! R4      4       V# Vw  r4\         P                  ! R\         P                  ! VP	                  4       4      RV,          4       V# )c                   V ^8  d   QhRR/# r0  r   )rY   s   "r%   rZ   .DubDependency._check_dub.<locals>.__annotate__  s     	$ 	$? 	$r$   c                    \        R RR7      p V P                  4       '       g   R#  \        V P                  4       R.,           4      R,          w  rVP                  ^ 8w  dE   \
        P                  ! RP                  RP                  V P                  4       4      4      4       R#  \        P                  ! RTP                  4       4      pT'       d   TP                  ^4      pY3# \
        P                  ! R	RP                  T P                  4       4       R
TP                  4        24       R#   \        \        3 d     R# i ; i)r]   T)r   Nr  r  z"Found dub {!r} but couldn't run itr   zDUB version (\d+\.\d+\.\d+.*), z
Found dub z but couldn't parse version in )r   foundr   r  r&  r   rx   rY   rv   FileNotFoundErrorPermissionErrorr  rB   r'  r  )r   r)  r*  vermatchr   s        r%   find&DubDependency._check_dub.<locals>.find  s   $U48F<<>>#F$6$6$8K=$HI#N<<1$LL "$$*F388F4F4F4H+I$JL % yy!CSYY[QH!*
 ## z#((63E3E3G*H)IIhiliririthuvw &7 s   A=D1 1EEz
Found DUB:NOz(version %s))r   rw   redru   r   )r   r9  r5  r   r   s   &    r%   r   DubDependency._check_dub  sk    	$2 =HH\488D>2 	  %VHH\499V__->#?#f,. r$   )r   r   r   r   rm   r   r   ry   r(   rh   r   rb   r   r)   r   )r   r   r    r!   rM   r"   r   class_cache_dirrT   r   r   rs   r   r   r   r  r   r#   __classcell__)r   s   @r%   rK   rK   A   sq    >BL;B!O 	uu$G  v vv/jK'Z
$.6
6$ $r$   rK   )'
__future__r   baser   r   r   	pkgconfigr   mesonlibr   r	   r
   r   optionsr   programsr   rN   r   enumr   r  r   r   typingTTYPE_CHECKINGtyping_extensionsr   rW   r   r   r   r'   r1   r4   rA   rE   rK   r   r$   r%   <module>rK     s    # M M * U U  &   	 	  ???+))' 'i 	 9 ) 4 `& `r$   