o
    ld                     @  s  d dl mZ 	 d dlZd dlmZ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 dd
lmZ G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZ G d!d" d"eZ!G d#d$ d$eZ"G d%d& d&eZ#G d'd( d(eZ$G d)d* d*eZ%G d+d, d,eZ&G d-d. d.eZ'G d/d0 d0eZ(G d1d2 d2eZ)G d3d4 d4eZ*G d5d6 d6eZ+G d7d8 d8eZ,G d9d: d:eZ-G d;d< d<eeZ.G d=d> d>eZ/G d?d@ d@eZ0G dAdB dBeZ1G dCdD dDeZ2G dEdF dFeZ3G dGdH dHeZ4G dIdJ dJeZ5G dKdL dLeZ6G dMdN dNeZ7dS )O    )annotationsN)	TypedDictLiteralProtocol   )build)coredata)Compiler)MachineChoiceFileFileModeFileOrString)CMakeSubprojectOptions)ExternalProgramc                   @  "   e Zd ZU dZded< ded< dS )FuncAddProjectArgsa  Keyword Arguments for the add_*_arguments family of arguments.

    including `add_global_arguments`, `add_project_arguments`, and their
    link variants

    Because of the use of a convertor function, we get the native keyword as
    a MachineChoice instance already.
    r
   nativeT.List[str]languageN__name__
__module____qualname____doc____annotations__ r   r   |home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/host/lib/python3.10/site-packages/mesonbuild/interpreter/kwargs.pyr      s   
 	r   c                   @  sR   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< ded< ded< dS )BaseTestz Shared base for the Rust module.z(T.List[T.Union[str, File, build.Target]]argsboolZshould_failinttimeoutT.Optional[str]Zworkdirz6T.List[T.Union[build.CustomTarget, build.BuildTarget]]dependsprioritybuild.EnvironmentVariablesenvr   ZsuiteNr   r   r   r   r   r   #   s   
 r   c                   @     e Zd ZU dZded< dS )FuncBenchmarkz8Keyword Arguments shared between `test` and `benchmark`.z+Literal['exitcode', 'tap', 'gtest', 'rust']ZprotocolNr   r   r   r   r   r(   1   s   
 r(   c                   @  r'   )FuncTestzKeyword Arguments for `test`

    `test` only adds the `is_parallel` argument over benchmark, so inheritance
    is helpful here.
    r   Zis_parallelNr   r   r   r   r   r)   8      
 r)   c                   @  r'   )ExtractRequiredzKeyword Arguments consumed by the `extract_required_kwargs` function.

    Any function that uses the `required` keyword argument which accepts either
    a boolean or a feature option should inherit it's arguments from this class.
    z)T.Union[bool, coredata.UserFeatureOption]requiredNr   r   r   r   r   r+   C   r*   r+   c                   @  r'   )ExtractSearchDirszlKeyword arguments consumed by the `extract_search_dirs` function.

    See the not in `ExtractRequired`
    r   dirsNr   r   r   r   r   r-   N   s   
 r-   c                   @  s:   e Zd ZU dZded< ded< ded< ded< d	ed
< dS )FuncGeneratorz,Keyword rguments for the generator function.r   	argumentsoutputr"   depfiler   capture6T.List[T.Union[build.BuildTarget, build.CustomTarget]]r#   Nr   r   r   r   r   r/   X      
 r/   c                   @  r   )GeneratorProcessz(Keyword Arguments for generator.process.r"   Zpreserve_path_fromr   
extra_argsNr   r   r   r   r   r6   c   s   
 r6   c                   @  s:   e Zd ZU dZded< ded< ded< ded< ded< dS )	!DependencyMethodPartialDependencyz: Keyword Arguments for the dep.partial_dependency methods r   Zcompile_argsZ	link_argsZlinksincludessourcesNr   r   r   r   r   r8   j   r5   r8   c                   @     e Zd ZU ded< dS )!BuildTargeMethodExtractAllObjectsr   	recursiveNr   r   r   r   r   r   r   r   r<   t   s   
 r<   c                   @  6   e Zd ZU ded< ded< ded< ded< ded	< d
S )FuncInstallSubdirstrinstall_dirr   Zstrip_directoryr   Zexclude_filesZexclude_directoriesr   install_modeNr>   r   r   r   r   r@   w      
 r@   c                   @  s.   e Zd ZU ded< ded< ded< ded< d	S )
FuncInstallDatarA   rB   T.List[FileOrString]r:   r   renamer   rC   Nr>   r   r   r   r   rE      
   
 rE   c                   @  &   e Zd ZU ded< ded< ded< dS )FuncInstallHeadersr"   rB   r   rC   ZsubdirNr>   r   r   r   r   rJ         
 rJ   c                   @  rI   )FuncInstallManr"   rB   r   rC   localeNr>   r   r   r   r   rL      rK   rL   c                   @  r;   )FuncImportModuler   ZdisablerNr>   r   r   r   r   rN         
 rN   c                   @  r;   )FuncIncludeDirectoriesr   Z	is_systemNr>   r   r   r   r   rP      rO   rP   c                   @  r;   )FuncAddLanguagesT.Optional[bool]r   Nr>   r   r   r   r   rQ      rO   rQ   c                   @  &   e Zd ZU ded< ded< ded< dS )	RunTargetzRT.List[T.Union[str, build.BuildTarget, build.CustomTarget, ExternalProgram, File]]commandr4   r#   r%   r&   Nr>   r   r   r   r   rT      rK   rT   c                   @  s   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< ded< ded< ded< ded< ded< ded< dS )CustomTargetr   Zbuild_alwaysrR   Zbuild_always_staleZbuild_by_defaultr3   kT.List[T.Union[str, build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, ExternalProgram, File]]rU   ZconsolerF   Zdepend_filesr4   r#   r"   r2   r%   r&   feedT.List[T.Union[str, build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, build.ExtractedObjects, build.GeneratedList, ExternalProgram, File]]inputinstallz&T.List[T.Union[str, T.Literal[False]]]rB   r   rC   zT.List[T.Optional[str]]install_tagr   r1   Nr>   r   r   r   r   rV      s$   
 rV   c                   @  s>   e Zd ZU ded< ded< ded< ded< ded	< d
ed< dS )AddTestSetupz%T.List[T.Union[str, ExternalProgram]]Zexe_wrapperr   Zgdbr    Ztimeout_multiplierZ
is_defaultr   Zexclude_suitesr%   r&   Nr>   r   r   r   r   r]         
 r]   c                   @  r?   )ProjectzT.Optional[FileOrString]versionr"   Zmeson_versionr   default_optionslicenserA   Zsubproject_dirNr>   r   r   r   r   r_      rD   r_   c                   @  s   e Zd ZdZdddZdS )_FoundProtozrProtocol for subdir arguments.

    This allows us to define any object that has a found(self) -> bool method
    returnr   c                 C  s   d S )Nr   )selfr   r   r   found   s    z_FoundProto.foundN)rd   r   )r   r   r   r   rf   r   r   r   r   rc      s    rc   c                   @  r;   )SubdirzT.List[_FoundProto]Zif_foundNr>   r   r   r   r   rg      rO   rg   c                   @  rS   )SummaryrA   sectionr   Zbool_ynr"   Zlist_sepNr>   r   r   r   r   rh      rK   rh   c                   @     e Zd ZU ded< ded< dS )FindProgramr
   r   r   r`   Nr>   r   r   r   r   rk         
 rk   c                   @  rS   )
RunCommandr   checkrR   r3   r%   r&   Nr>   r   r   r   r   rm      rK   rm   c                   @  r;   )FeatureOptionRequirer"   Zerror_messageNr>   r   r   r   r   ro      rO   ro   c                   @  rj   )DependencyPkgConfigVarr"   defaultr   Zdefine_variableNr>   r   r   r   r   rp      rl   rp   c                   @  s>   e Zd ZU ded< ded< ded< ded< ded< ded< d	S )
DependencyGetVariabler"   ZcmakeZ	pkgconfigZ
configtoolZinternaldefault_valuer   Zpkgconfig_defineNr>   r   r   r   r   rr     r^   rr   c                   @  r;   )ConfigurationDataSetr"   descriptionNr>   r   r   r   r   rt     rO   rt   c                   @  s6   e Zd ZU ded< ded< ded< ded< d	ed
< dS )VcsTagrW   rU   r"   fallbackrY   rZ   r   r1   rA   Zreplace_stringNr>   r   r   r   r   rv     s   
 rv   c                   @  sv   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< ded< ded< dS )ConfigureFilerA   r1   r   r3   z%T.Literal['meson', 'cmake', 'cmake@']formatzT.Literal['c', 'nasm']Zoutput_formatr"   r2   rR   r[   zT.Union[str, T.Literal[False]]rB   r   rC   r\   encodingzST.Optional[T.List[T.Union[build.Executable, ExternalProgram, Compiler, File, str]]]rU   rF   rZ   zRT.Optional[T.Union[T.Dict[str, T.Union[str, int, bool]], build.ConfigurationData]]configurationNr>   r   r   r   r   rx     s   
 rx   c                   @  s   e Zd ZU ded< ded< dS )
Subprojectr   ra   r`   Nr>   r   r   r   r   r|   +  rl   r|   c                   @  s.   e Zd ZU ded< ded< ded< ded< dS )DoSubprojectr   ra   r`   Zcmake_optionsz"T.Optional[CMakeSubprojectOptions]optionsNr>   r   r   r   r   r}   1  rH   r}   )8
__future__r   typingTtyping_extensionsr   r   r    r   r   	compilersr	   Zmesonlibr
   r   r   r   Zmodules.cmaker   Zprogramsr   r   r   r(   r)   r+   r-   r/   r6   r8   r<   r@   rE   rJ   rL   rN   rP   rQ   rT   rV   r]   r_   rc   rg   rh   rk   rm   ro   rp   rr   rt   rv   rx   r|   r}   r   r   r   r   <module>   sX   

	
	

