
    e}w                    *   d dl mZ d dlZd dlZd dlZd dlmc mZ	 ddl
mZmZ ddl
mZ ddl
mZ ddl
mZ dd	lmZmZmZmZ dd
lmZmZmZmZ ddlmZ ddlmZmZmZ ddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& ddl'm(Z( ejR                  rddl
m*Z* ddl+m,Z,m-Z- ddlm.Z. ddlm/Z/ ddlm0Z0 ddl'm1Z1 ejd                  e,e-f   Z3d dl4m5Z5  G d de5      Z6 G d de5      Z7 G d de5      Z8 G d de5      Z9 G d de/jt                        Z; G d  d!e5      Z< G d" d#e      Z=y)$    )annotationsN   )ModuleReturnValueExtensionModule   )build)coredata)mlog)find_external_dependency
DependencyExternalLibraryInternalDependency)MesonExceptionFileversion_compare
Popen_safe)extract_required_kwarg)INSTALL_DIR_KW
INSTALL_KWNoneType)ContainerTypeInfoFeatureDeprecated	KwargInfo	noPosargs
FeatureNewtyped_kwargs)NonExistingExternalProgram)ModuleState)QtPkgConfigDependencyQmakeQtDependency)Interpreter)kwargs)FileOrString)ExternalProgram)	TypedDictc                  :    e Zd ZU dZded<   ded<   ded<   ded	<   y
)ResourceCompilerKwArgsz3Keyword arguments for the Resource Compiler method.T.Optional[str]namecT.Sequence[T.Union[FileOrString, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]]sourcesT.List[str]
extra_argsstrmethodN__name__
__module____qualname____doc____annotations__     7/usr/lib/python3/dist-packages/mesonbuild/modules/qt.pyr'   r'   -   s    Attr7   r'   c                  0    e Zd ZU dZded<   ded<   ded<   y)	UICompilerKwArgsz-Keyword arguments for the Ui Compiler method.r*   r+   r,   r-   r.   r/   Nr0   r6   r7   r8   r:   r:   6   s    ;ttr7   r:   c                  N    e Zd ZU dZded<   ded<   ded<   ded<   d	ed
<   ded<   y)MocCompilerKwArgsz.Keyword arguments for the Moc Compiler method.r*   r+   headersr,   r-   r.   r/   'T.List[T.Union[str, build.IncludeDirs]]include_directories,T.List[T.Union[Dependency, ExternalLibrary]]dependenciesNr0   r6   r7   r8   r<   r<   >   s(    <ttttDDBBr7   r<   c                  |    e Zd ZU ded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   ded<   ded<   ded<   y)PreprocessKwArgszT.List[FileOrString]r+   z1T.List[T.Union[FileOrString, build.CustomTarget]]moc_sourcesmoc_headers
qresourcesui_filesr,   moc_extra_argumentsrcc_extra_argumentsuic_extra_argumentsr>   r?   r@   rA   r.   r/   Nr1   r2   r3   r5   r6   r7   r8   rC   rC   I   sC    %%FFFF((CC((((((DDBBr7   rC   c                      e Zd ZU ded<   y)HasToolKwArgsr.   r/   NrK   r6   r7   r8   rM   rM   W   s    r7   rM   c                  T    e Zd ZU ded<   ded<   ded<   ded<   ded<   d	ed
<   ded<   y)CompileTranslationsKwArgsboolbuild_by_defaultinstallr(   install_dirr.   r/   	qresourcer,   rI   z\T.List[T.Union[str, File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]]ts_filesNrK   r6   r7   r8   rO   rO   [   s*    $$""((nnr7   rO   c                     e Zd ZdZdZdZd7d8dZd9dZd:d;dZe	d<d       Z
	 	 	 	 d=d	Z ed
d      e ed
 edeej$                  fd       eded            d>d                     Z edd      e ed edeef       ed eeeeej4                  ej6                  ej8                  fd      dd       ed eee      dg        eded            d?d                     Zd@dZ edd      e ed ed eeeeej4                  ej6                  ej8                  fd      dd       ed eee      dg        eded            dAd                     ZdBdZ  edd      e ed ed eeeeej4                  ej6                  ej8                  f      dg        ed eeeeej4                  ej6                  ej8                  f      dg        ed eee      dg        eded       ed eeejB                  ef      dg        ed eee"e#f      dg             dCd                      Z$dDd!Z% ed" ed eeeef      dg d#       ed$ eeeef      dg        ed% eeeeej4                  f      dg        ed& eeeeej4                  f      dg        ed' eeeeej4                  f      dg        ed( eee      dg d)*       ed+ eee      dg d,*       ed- eee      dg d,*       eded       ed eeejB                  ef      dg        ed eee"e#f      dg             dEd.       Z& ed/d)      e ed/ ed0ed      e'e( eded       ed1eefd23       ed+ eee      dg d2*       ed4 eeeeej4                  ej6                  ej8                  f      dg             dFd5                     Z)y6)GQtBaseModuleFc           	     Z   t        j                  | |       || _        t        d      t        d      t        d      t        d      d| _        | j
                  j                  | j                  | j                  | j                  | j                  | j                  | j                  d       y )Nmocuicrcclrelease)rY   rZ   r[   r\   )	has_tools
preprocesscompile_translationscompile_resources
compile_uicompile_moc)r   __init__
qt_versionr   toolsmethodsupdater]   r^   r_   r`   ra   rb   )selfinterpreterrd   s      r8   rc   zQtBaseModule.__init__j   s      {3$ .e4-e4-e42:>	O

 	//$($=$=!%!7!7//++
 	r7   c                X   	 dj                    }d fd} |       D ]  \  }	 j                  	   j                         r$	dk(  rdgnt        j                   d      rdgndgd	fd}|j	                  |d	||
      }|j                         sx| j                  	<    y)zCDetect Qt (4 or 5) moc, uic, rcc in the specified bindir or in PATHz== c               3  v  K   j                   D ]  } j                  r.t        j                  j	                  j                  |       | f j
                  r.t        j                  j	                  j
                  |       | f |  j                   | f |  dj                   | f | | f  y w)N-qt)re   bindirospathjoin
libexecdirqtver)bqt_deprh   s    r8   gen_binsz/QtBaseModule.compilers_detect.<locals>.gen_bins   s     ZZ 
=='',,v}}a8!;;$$'',,v'8'8!<a?? FLL>*A--3v||n-q00d

s   B6B9r\   z-versionz>= 5z	--versionz-vc                    t        | j                         z         \  }}}dk(  sj                  j                  d      s|}n|}|j	                  dd      d   j                  dd      j                         S )	Nr\   4 r   )maxsplit) )r   get_commandversion
startswithrsplitreplacestrip)p_outerrcareargr)   rt   s        r8   get_versionz2QtBaseModule.compilers_detect.<locals>.get_version   so    (3)>?3:%V^^-F-Fs-KDD{{3{3B7??RHNNPPr7   F)requiredversion_funcwantedN)returnz*T.Generator[T.Tuple[str, str], None, None])r   z*T.Union[ExternalProgram, build.Executable]r   r.   )r~   re   foundr   find_program)
rh   statert   r   ru   rs   r   r   r   r)   s
   ` `     @@r8   compilers_detectzQtBaseModule.compilers_detect~   s    v~~&'	  z 	%GAtzz$%%'z!!l 8"mfQ ""1u0;*0 # 2A wwy#$

4 1	%r7   Tr/   r   c                .   | j                   ry d| _         t        j                  d| j                   d       |d|d}t	        j
                  dt        d| j                   |j                  |            }|j                         r| j                  ||       t        |j                  d      rd| _        nt        j                  d	d
       t        |j                  d      rd| _        y t        j                  dt        j                  d      d
       y d| j                   }t!        d|z         | j"                  d<   t!        d|z         | j"                  d<   t!        d|z         | j"                  d<   t!        d|z         | j"                  d<   y )NTzDetecting Qtz toolsCore)r   modulesr/   r   qtz>=5.15.0zDmoc dependencies will not work properly until you move to Qt >= 5.15F)fatalz>=5.14.0zErcc dependencies will not work properly until you move to Qt >= 5.14:z+https://bugreports.qt.io/browse/QTBUG-45460rl   rY   r)   rZ   r[   r\   )_tools_detectedr
   logrd   Tcastr   environmentr   r   r   r~   _moc_supports_depfileswarning_rcc_supports_depfilesboldr   re   )rh   r   r/   r   r"   r   suffixs          r8   _detect_toolszQtBaseModule._detect_tools   sQ   #<078&6VLVV+-E4??J[F\^c^o^oqw-xy88:!!%,rzz:6.2+ckpqrzz:6.2+d!YY'TU]bd 4??+,F : ODJJu : ODJJu : ODJJu%?ZRXEX%YDJJz"r7   c           
        t        |t              r@t        j                  j	                  | j
                  j                  | j                  |      }n:|j                  | j
                  j                  | j
                  j                        }t        j                  j                  |      }	 t        j                  |      }|j                         }g }|d   D ]  }|j                  dk7  rIt        j                   dt        j                  j	                  | j                  t        |                    nh|j"                  ?t%        dt        j                  j	                  | j                  t        |                   |j'                  |j"                          ||fS # t$        $ r  t(        $ r t%        d|       w xY w)Nr   filezmalformed rcc file: z!<file> element without a path in zUnable to parse resource file )
isinstancer.   rn   ro   rp   r   
source_dirsubdirabsolute_path	build_dirdirnameETparsegetroottagr
   r   textr   append	Exception)r   rcc_fileabspathrcc_dirnametreerootresultchilds           r8   
_qrc_nodeszQtBaseModule._qrc_nodes   sf    h$ggll5#4#4#?#?xXG,,U->->-I-I5K\K\KfKfgGggoog.	M88G$D<<>D"$Fa .99&LL!7ellTWX`Ta9bcZZ'(+LRWW\\Z_ZfZfhklthuMvLw)xyyMM%**-. && 	 	M #A'!KLL	Ms   +C2F !F?c           	        g }g }t        |t        t        f      r|g}n|j                         }|D ]  }| j	                  ||      \  }}|D ]  }t
        j                  j                  |      r|j                  t
        j                  j                  |j                  j                              rRt
        j                  j                  ||j                  j                        }	|j                  t        dd|	             |j                  t        d|j                  |             t
        j                  j                  t
        j                  j!                  ||            }
|
j                  |j                  j                        r)|j                  t        d|j                  |             j|j                  t        d|j                  |
               |S )NTr|   )is_builtr   fnameF)r   r.   r   get_outputsr   rn   ro   isabsr   r   r   r   relpathr   r   normpathrp   )rh   r   	rcc_file_r   inputsr   r   nodesresource_pathresource_relpathpath_from_rccs              r8   _parse_qrc_depszQtBaseModule._parse_qrc_deps   sl   !-/i#t-[F**,F 	fH!%!AK!& f 77==/$//@Q@Q@[@[0\]+-77??=%J[J[JeJe+f(dDK[&\] dE%,,Vc&de$&GG$4$4RWW\\+}5]$^M$//0A0A0K0KLdDUb&cd dE%,,Vc&de/f	f4 r7   zqt.has_toolsz0.54.0defaultautoc                `    |j                   dd      }t        ||j                  d      \  }}}|r+t        j                  dt        j
                  |      d       y| j                  ||d       | j                  j                         D ]!  }|j                         r|rt        d       y y	)
Nr/   r   Fr   zqt.has_tools skipped: featuredisabled)r   zQt tools not foundT)getr   
subprojectr
   r   r   r   re   valuesr   r   )	rh   r   argsr"   r/   r   r   featuretools	            r8   r]   zQtBaseModule.has_tools  s     Hf- '=VUEUEU_d&e#(GHH4dii6H*U5&59JJ%%' 	D::<()=>>		
 r7   zqt.compile_resourcesz0.59.0r)   r+   )allow_empty)listifyr   r-   )r   r   c                    t        d |d   D              r-t        j                  dd|j                  |j                         | j                  ||      }t        ||g      S )zhCompile Qt resources files.

        Uses CustomTargets to generate .cpp files from .qrc files.
        c              3     K   | ]=  }t        |t        j                  t        j                  t        j                  f       ? y wNr   r   CustomTargetCustomTargetIndexGeneratedList.0ss     r8   	<genexpr>z1QtBaseModule.compile_resources.<locals>.<genexpr>1  1     |efz!e00%2I2I5K^K^_`|   AAr+   zOqt.compile_resources: custom_target or generator for "sources" keyword argument0.60.0location)anyr   
single_user   current_node_compile_resources_implr   rh   r   r   r"   r   s        r8   r`   zQtBaseModule.compile_resources  s_    & |jpqzj{||!!"s"*E,<,<uGYGY[**5&9 se,,r7   c                @   | j                  ||d          | j                  d   j                         s5d}t        |j	                  dd| j
                   | j
                              g }| j                  rddgng }|d   }g }|d	   D ]I  }t        |t        t        f      r|j                  |       +|j                  |j                                K |d
   }	|rg }
|D ]#  }|
j                  | j                  ||             % t        j                  ||j                   |j"                  |j$                  | j                  d   j'                         d|ddgz   |	z   dgz   |z   || dg|
| dd
      }|j                  |       |S |D ]  }| j                  ||      }
t        |t              r t(        j*                  j-                  |      }n)t(        j*                  j-                  |j.                        }d| j
                   d|j1                  dd       }t        j                  ||j                   |j"                  |j$                  | j                  d   j'                         g dz   |	z   dgz   |z   |g| dg|
| dd
      }|j                  |        |S )Nr/   r[   Q{0} sources specified and couldn't find {1}, please check your qt{2} installationRCCzrcc-qtz	--depfilez	@DEPFILE@r)   r+   r-   -name-o@OUTPUT@@INPUT@z.cppz.dzCompiling Qt resources {})depend_filesdepfiledescriptionr   -.r   )r   z
@BASENAME@r   r   )r   re   r   r   formatrd   r   r   r.   r   r   extendr   r   r   r   r   r   r   r}   rn   ro   basenamer   r   )rh   r   r"   err_msgtargetsDEPFILE_ARGSr)   r+   r   r-   qrc_deps
res_targetr   r   s                 r8   r   z$QtBaseModule._compile_resources_impl7  s   5&"23zz% &&(>G ?P7QSWSbSb!cdd /1 CGB]B][+$>cef~*,	" 	0A!c4[)q!q}}/		0
 L)
 %'H @ 4 4UA >?@ ++  !!

5!--/7D$
2SSV``dmcnnq}}6%&7J NN:&. + $ +//x@h,!ww//9H!ww//?HDOO,Ah.>.>sC.H-IJ"//LL$$%%JJu%1136__bllpyozz  ~J  JJvT]O!)#fBK ;
 z*'+* r7   zqt.compile_uic                    t        d |d   D              r-t        j                  dd|j                  |j                         | j                  ||      }t        ||g      S )z&Compile UI resources into cpp headers.c              3     K   | ]=  }t        |t        j                  t        j                  t        j                  f       ? y wr   r   r   s     r8   r   z*QtBaseModule.compile_ui.<locals>.<genexpr>  r   r   r+   zHqt.compile_ui: custom_target or generator for "sources" keyword argumentr   r   )r   r   r   r   r   _compile_ui_implr   r   s        r8   ra   zQtBaseModule.compile_uiz  s_     |jpqzj{||!!"l"*E,<,<uGYGY[##E62 se,,r7   c                t   | j                  ||d          | j                  d   j                         s5d}t        |j	                  dd| j
                   | j
                              t        j                  | j                  d   |d   g dz   dgd	| j
                   d
      }|j                  |d   |      S )Nr/   rZ   r   UICuic-qtr-   )r   r   r   zui_@BASENAME@.hQtz uir   r+   )	r   re   r   r   r   rd   r   	Generatorprocess_files)rh   r   r"   r   gens        r8   r   zQtBaseModule._compile_ui_impl  s    5&"23zz% &&(>G ?P7QSWSbSb!cdd ooJJu< #@@doo&c*	,
   	!2E::r7   zqt.compile_mocr=   r?   rA   c                H   t        d |d   D              r-t        j                  dd|j                  |j                         t        d |d   D              r-t        j                  dd|j                  |j                         | j                  ||      }t        ||g      S )	Nc              3     K   | ]=  }t        |t        j                  t        j                  t        j                  f       ? y wr   r   r   s     r8   r   z+QtBaseModule.compile_moc.<locals>.<genexpr>  r   r   r=   zIqt.compile_moc: custom_target or generator for "headers" keyword argumentr   r   c              3     K   | ]=  }t        |t        j                  t        j                  t        j                  f       ? y wr   r   r   s     r8   r   z+QtBaseModule.compile_moc.<locals>.<genexpr>  r   r   r+   zIqt.compile_moc: custom_target or generator for "sources" keyword argument)r   r   r   r   r   _compile_moc_implr   r   s        r8   rb   zQtBaseModule.compile_moc  s    , |jpqzj{||!!"m"*E,<,<uGYGY[|jpqzj{||!!"m"*E,<,<uGYGY[$$UF3 se,,r7   c           	     `   | j                  ||d          | j                  d   j                         s5d}t        |j	                  dd| j
                   | j
                              |d   s|d   st        j                  d      |j                  |d	   
      }g }|d   D ]  }|j                  d |j                         D               t        |t              s:|j                  D ]\  }|j                  d |j                  | j                  j                   | j                  j"                  j$                        D               ^  g }| j&                  rdgng }	|d   |	z   |z   |z   g dz   }
|d   rZt        j(                  | j                  d   |
dgdd| j
                   d      }|j+                  |j-                  |d   |             |d   rZt        j(                  | j                  d   |
dgdd| j
                   d      }|j+                  |j-                  |d   |             |S )Nr/   rY   r   MOCr  r=   r+   z[At least one of the "headers" or "sources" keyword arguments must be provided and not emptyr?   )include_dirsrA   c              3  D   K   | ]  }|j                  d       s|  yw))-Iz-DN)r   )r   as     r8   r   z1QtBaseModule._compile_moc_impl.<locals>.<genexpr>  s     daVbIcds     c              3  &   K   | ]	  }d |   yw)r  Nr6   )r   is     r8   r   z1QtBaseModule._compile_moc_impl.<locals>.<genexpr>  s       (UQ"QC  (Us   z--output-dep-filer-   )r   r   r   zmoc_@BASENAME@.cppzmoc_@BASENAME@.cpp.dr  z moc header)r   r)   z@BASENAME@.mocz@BASENAME@.moc.dz moc source)r   re   r   r   r   rd   r   InvalidArgumentsget_include_argsr   get_all_compile_argsr   r   r?   to_string_listri   source_rootr   r   r   r  r   r  )rh   r   r"   r   inccompile_argsdepincloutputr   	argumentsmoc_gens               r8   r  zQtBaseModule._compile_moc_impl  sU   5&"23zz% &&(>G ?P7QSWSbSb!cddy!VI%6((  *G  H  H$$&9N2O$P$&.) 	UCd3+C+C+Edd#1233 UD ''  (U$:M:MdN^N^NjNjlpl|l|  mI  mI  mS  mS  ;T  (U  UU	U /1 >B=X=X%8$9^`<(<7#=LOll	)oo

5!9/C.D.$//*+68G MM'//y0A5IJ)oo

5!9/?.@*$//*+68G MM'//y0A5IJr7   zqt.preprocess)r   r   
deprecatedrF   rG   rD   rE   rH   z0.44.0)r   r   sincerI   z0.49.0rJ   c                   |dd  }|r-t        j                  dd|j                  |j                         t	        j
                  d||d   z         }|D ]-  }t        |t        t        f      rt        j                  d       |d   }|d	   r_d
|d	   |d   |d}|r/|d   }	t        |	t              st        j                  d      |	|d<   |j                  | j                  ||             |d   r-|d   |d   |d}
|j                  | j                  ||
             |d   s|d   r9|d   |d   |d   |d   |d   |d}|j                  | j                  ||             t!        ||g      S )Nr   z qt.preprocess positional sourcesz0.59r   zCT.List[T.Union[str, File, build.GeneratedList, build.CustomTarget]]r+   z<Variadic arguments to qt.preprocess must be Strings or Filesr/   rF   r|   rI   )r)   r+   r-   r/   r   z0First argument to qt.preprocess must be a stringr)   rG   rJ   )r+   r-   r/   rE   rD   rH   r?   rA   )r-   r+   r=   r?   rA   r/   )r   r   r   r   r   r   r   r.   r   r   r  r   r   r   r   r  r   )rh   r   r   r"   _sourcesr+   r   r/   
rcc_kwargsr)   	ui_kwargs
moc_kwargss               r8   r^   zQtBaseModule.preprocess  s    8(()KVUZUeUepu  qC  qC  D&&^!F9$557 	mAa#t-,,-kll	m !,<>6R^K_ou  wL  pM  Y_  4`JAw!$,001cdd%)
6"NN477zJK*8>z8JZ`avZw  DJ  -KINN400	BC- F=$9$%:;!-0!-0'-.C'D &~ 6 /J NN411%DE 7)44r7   zqt.compile_translationsrQ   rT   z0.56.0)r!  rU   c                   |d   }t        d |D              r-t        j                  dd|j                  |j                         |d   r|d   st        d      |d	   }|r|rt        d
      t        j                  j                  |      dk7  rt        d      t        j                  |j                  |      }t        j                  j                  |j                  j                  |j                               }t        j                  j                  |j                  j                   |j                               }t        j"                  t        j                  j                  |      d       t%        j&                  ||       | j(                  j+                  |       | j-                  ||      \  }	}
|
D ]D  }|j/                  d      r$|j1                  |j3                  d      dz          8t        d|        | j5                  |g ||d   d      }| j7                  ||d          g }|D ]g  }| j8                  d   j;                         s(t        d| j8                  d   j<                  z   dz         |rt?        |t@              sJ d       t        j                  j                  t        j                  jC                  t        j                  j                  |j                  |                  }t        j                  jE                  |      }n|j                  }| j8                  d   dddg}tG        jH                  d| jJ                   d| ||j                  |j                  ||gdg|d   |d   gdg|d    d!"      }|j1                  |       j |r%tM        jN                  d#   |jP                  |g      S tM        ||g      S )$NrU   c              3     K   | ]=  }t        |t        j                  t        j                  t        j                  f       ? y wr   r   r   s     r8   r   z4QtBaseModule.compile_translations.<locals>.<genexpr>*  s1     sefz!e00%2I2I5K^K^_`sr   zSqt.compile_translations: custom_target or generator for "ts_files" keyword argumentr   r   rR   rS   z[qt.compile_translations: "install_dir" keyword argument must be set when "install" is true.rT   zCqt.compile_translations: Cannot specify both ts_files and qresourcer|   zMqt.compile_translations: qresource file name must not contain a subdirectory.T)exist_okz.qmz.tszDqt.compile_translations: qresource can only contain qm files, found rI   )rF   rI   r/   r\   zqt.compile_translations: z
 not foundzfor mypyr   z-qmr   r   z	-compile-z@BASENAME@.qmi18nrQ   zCompiling Qt translations {})rR   rS   install_tagrQ   r   r   ))r   r   r   r   r   r   rn   ro   r   r   from_built_filer   rp   r   r   relative_namer   makedirsshutilcopy2ri   add_build_def_filer   endswithr   rstripr^   r   re   r   r)   r   r.   r   r   r   r   rd   r   return_valuenew_objects)rh   r   r   r"   rU   rT   qresource_file
infile_absoutfile_absr   r   cresultstranslationstsoutdircmdlrelease_targets                     r8   r_   z!QtBaseModule.compile_translations  s    *%sjrss!!"w"*E,<,<uGYGY[)VM%: !~;'	$%jkkwwy)R/$%tuu!11%,,	JNe&7&7&B&BND`D`DbcJ'',,u'8'8'B'BND`D`DbcKKK4tDLL[1//
;un=HAu u::e$OOAHHUOe$;<(+opqor)stt	u
 ooeRgm  oD  hE  2F  GG5&"2335 	1B::j)//1$%@%)ZZ
%;%@%@&ACO&P Q Q
 ""c*6J6*)9)9"'',,u||UW:X)YZWW%%b)LPJJWaLbdmot  wA  LBC#00T__%Yrd3  !! !y)#M23#H!'(:!;:O 0;	1< $W%9%9!%<w?R?RT`>abb$\L>BBr7   N)   )ri   z'Interpreter'rd   int)r   'ModuleState'rt   z'QtDependencyType'r   None)T)r   rB  r/   r.   r   rP   r   rC  )r   rB  r   z'FileOrString'r   zT.Tuple[str, T.List[str]])r   rB  r   zYT.Union['FileOrString', build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]r   zT.List[File])r   rB  r   T.Tupler"   z'HasToolKwArgs'r   rP   )r   rB  r   rD  r"   'ResourceCompilerKwArgs'r   r   )r   rB  r"   rE  r   zT.List[build.CustomTarget])r   rB  r   rD  r"   'UICompilerKwArgs'r   r   )r   rB  r"   rF  r   zbuild.GeneratedList)r   rB  r   rD  r"   'MocCompilerKwArgs'r   r   )r   rB  r"   rG  r   zT.List[build.GeneratedList])r   rB  r   zT.List[T.Union[str, File]]r"   z'PreprocessKwArgs'r   r   )r   rB  r   rD  r"   z'CompileTranslationsKwArgs'r   r   )*r1   r2   r3   r   r   r   rc   r   r   staticmethodr   r   r   r   r   r   rP   r	   UserFeatureOptionr.   r]   r   r   listr   r   r   r   r   r`   r   ra   r   IncludeDirsr   r   rb   r  r^   r   r   r_   r6   r7   r8   rW   rW   e   sD   O""()%VZ6 M M8##|# BN#J )*tX%?%?@%P(C0
  *" &1&3/*dT30B0BED[D[]b]p]p$q  @E  F		
 	, 1$ <dTVW(C0	-  2	-AF *dT30B0BED[D[]b]p]p$q  @E  F		
 	, 1$ <dTVW(C0
-
  +-;   (+dT30B0BED[D[]b]p]p$qr		
 	dT30B0BED[D[]b]p]p$qr		
 	, 1$ <dTVW(C0'):4%BSBSUXAY)Zdhrtu."3D::W"Xbfprs#&-'  ,*-&R ).tdC[A4Y[hpq, 1$s Dd\^_*/tS%BTBT6UV`dnpq-!24$UEWEW9X!Ycgqst-!24$UEWEW9X!Ycgqst'):4)Et]_gop'):4)Et]_gop'):4)Et]_gop(C0'):4%BSBSUXAY)Zdhrtu."3D::W"Xbfprs%5%5N )84!$dE:(C0+Xh?'):4)Et]_gop*/sD%BTBTV[VmVmot  pC  pC  7D  E  OS  ]_  	`	>C	  5>Cr7   rW   )>
__future__r   rn   r/  typingr   xml.etree.ElementTreeetreeElementTreer   r|   r   r   r   r	   r
   rA   r   r   r   r   mesonlibr   r   r   r   ri   r   interpreter.type_checkingr   r   r   interpreterbaser   r   r   r   r   r   programsr   TYPE_CHECKINGr   dependencies.qtr   r    r!   r"   r#   r$   UnionQtDependencyTypetyping_extensionsr%   r'   r:   r<   rC   ExtractRequiredrM   rO   rW   r6   r7   r8   <module>r[     s    # 	   " " 0    d d H H 0 L L r r 1??J)$'*ww46GGH+ 9 	CI 	C9 .. oI oAC? ACr7   