
    -Ph4                    $   d dl mZ 	 d dlZd dlmZ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 dd	lmZmZ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 ej        rej        e ee
j!        ef         Z" G d de          Z# G d de          Z$ G d de$          Z% G d de%          Z& G d de          Z' G d de          Z( G d de          Z) G d de          Z* G d d e          Z+ G d! d"e          Z, G d# d$e          Z- G d% d&e          Z. G d' d(e          Z/ G d) d*e          Z0 G d+ d,e'          Z1 G d- d.e          Z2 G d/ d0e'          Z3 G d1 d2e          Z4 G d3 d4e          Z5 G d5 d6e          Z6 G d7 d8e          Z7 G d9 d:e          Z8 G d; d<e          Z9 G d= d>e          Z: G d? d@e'e(          Z; G dA dBe          Z< G dC dDe          Z= G dE dFe          Z> G dG dHe          Z? G dI dJe          Z@ G dK dLe          ZA G dM dNe          ZB G dO dPe'          ZC G dQ dRe'          ZD G dS dTe          ZE G dU dVeE          ZF G dW dXe          ZG G dY dZeF          ZH G d[ d\e          ZI G d] d^eFeIeG          ZJ G d_ d`e          ZK G da dbeFeKeG          ZL G dc ddeFeG          ZM G de dfeFeKeIeG          ZN G dg dheN          ZO G di djeE          ZP G dk dle          ZQdS )m    )annotationsN)	TypedDictLiteralProtocolNotRequired   )build)options)Compiler)
Dependency)EnvironmentVariablesMachineChoiceFileFileModeFileOrString)	OptionKey)CMakeSubprojectOptions)ExternalProgram   )PkgConfigDefineTypeSourcesVarargsTypec                  (    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__     ]/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/mesonbuild/interpreter/kwargs.pyr   r      s6           r$   r   c                  Z    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S )BaseTestz Shared base for the Rust module.boolshould_failinttimeoutT.Optional[str]workdirz6T.List[T.Union[build.CustomTarget, build.BuildTarget]]dependspriorityr   envr   suiteNr   r#   r$   r%   r'   r'   (   sf         **LLLCCCCMMMr$   r'   c                  (    e Zd ZU dZded<   ded<   dS )FuncBenchmarkz8Keyword Arguments shared between `test` and `benchmark`.zT.List[TestArgs]argsz+Literal['exitcode', 'tap', 'gtest', 'rust']protocolNr   r#   r$   r%   r3   r3   5   s0         BB999999r$   r3   c                      e Zd ZU dZded<   dS )FuncTestzKeyword Arguments for `test`

    `test` only adds the `is_parallel` argument over benchmark, so inheritance
    is helpful here.
    r(   is_parallelNr   r#   r$   r%   r7   r7   =   s*           r$   r7   c                      e Zd ZU dZded<   dS )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 its arguments from this class.
    z(T.Union[bool, options.UserFeatureOption]requiredNr   r#   r$   r%   r:   r:   H   s*           766666r$   r:   c                      e Zd ZU dZded<   dS )ExtractSearchDirszlKeyword arguments consumed by the `extract_search_dirs` function.

    See the not in `ExtractRequired`
    r   dirsNr   r#   r$   r%   r=   r=   S   s*          
 r$   r=   c                  F    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@   ]   sQ         66NNNCCCCCCr$   r@   c                  2    e Zd ZU dZded<   ded<   ded<   dS )	GeneratorProcessz(Keyword Arguments for generator.process.r,   preserve_path_fromr   
extra_argsr   r0   Nr   r#   r$   r%   rG   rG   h   s<         22''''r$   rG   c                  F    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(   compile_args	link_argslinksincludessourcesNr   r#   r$   r%   rK   rK   p   sF         DDOOOKKKNNNMMMMMr$   rK   c                      e Zd ZU ded<   dS )!BuildTargeMethodExtractAllObjectsr(   	recursiveNr   r   r    r"   r#   r$   r%   rR   rR   z   s         OOOOOr$   rR   c                  L    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 )FuncInstallSubdirstrinstall_dirr(   strip_directoryr   exclude_filesexclude_directoriesr   install_modeT.Optional[bool]follow_symlinksNrT   r#   r$   r%   rV   rV   }   sZ         $$$$%%%%%%r$   rV   c                  B    e Zd ZU ded<   ded<   ded<   ded<   d	ed
<   dS )FuncInstallDatarW   rX   T.List[FileOrString]rP   r   renamer   r\   r]   r^   NrT   r#   r$   r%   r`   r`      sN         !!!!%%%%%%r$   r`   c                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	FuncInstallHeadersr,   rX   r   r\   subdirr]   r^   NrT   r#   r$   r%   rd   rd      sB             %%%%%%r$   rd   c                  .    e Zd ZU ded<   ded<   ded<   dS )FuncInstallManr,   rX   r   r\   localeNrT   r#   r$   r%   rg   rg      s6             r$   rg   c                      e Zd ZU ded<   dS )FuncImportModuler(   disablerNrT   r#   r$   r%   rj   rj      s         NNNNNr$   rj   c                      e Zd ZU ded<   dS )FuncIncludeDirectoriesr(   	is_systemNrT   r#   r$   r%   rm   rm      s         OOOOOr$   rm   c                      e Zd ZU ded<   dS )FuncAddLanguagesr]   r   NrT   r#   r$   r%   rp   rp      s         r$   rp   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]]commandrE   r.   r   r0   NrT   r#   r$   r%   rr   rr      s6         ____CCCCr$   rr   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<   ded<   ded<   ded<   ded<   ded<   ded<   dS )CustomTargetr(   build_alwaysr]   build_always_stalebuild_by_defaultrD   kT.List[T.Union[str, build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, ExternalProgram, File]]rs   consolera   depend_filesrE   r.   r,   rC   r   r0   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]]]rX   r   r\   zT.List[T.Optional[str]]install_tagr   rB   NrT   r#   r$   r%   ru   ru      s         ((((&&&&MMMM M M MMMM&&&&CCCCJJJ_ _ _ _MMM7777((((r$   ru   c                  L    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]]exe_wrapperr(   gdbr*   timeout_multiplier
is_defaultr   exclude_suitesr   r0   NrT   r#   r$   r%   r   r      sW         6666IIIr$   r   c                  L    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 )ProjectzT.Optional[FileOrString]versionr,   meson_versionr   default_optionslicenselicense_filesrW   subproject_dirNrT   r#   r$   r%   r   r      sZ         %%%%""""    r$   r   c                      e Zd ZdZ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                    d S )Nr#   )selfs    r%   foundz_FoundProto.found   s      r$   N)r   r(   )r   r   r    r!   r   r#   r$   r%   r   r      s(         
 !     r$   r   c                      e Zd ZU ded<   dS )SubdirzT.List[_FoundProto]if_foundNrT   r#   r$   r%   r   r      s         !!!!!!r$   r   c                  .    e Zd ZU ded<   ded<   ded<   dS )SummaryrW   sectionr(   bool_ynr,   list_sepNrT   r#   r$   r%   r   r      s0         LLLMMMr$   r   c                  .    e Zd ZU ded<   ded<   ded<   dS )FindProgram1T.Dict[OptionKey, options.ElementaryOptionValues]r   r   r   r   r   NrT   r#   r$   r%   r   r      s6         FFFFr$   r   c                  .    e Zd ZU ded<   ded<   ded<   dS )
RunCommandr(   checkr]   rD   r   r0   NrT   r#   r$   r%   r   r      s3         KKKr$   r   c                      e Zd ZU ded<   dS )FeatureOptionRequirer,   error_messageNrT   r#   r$   r%   r   r     s         """"""r$   r   c                  $    e Zd ZU ded<   ded<   dS )DependencyPkgConfigVarr,   defaultr   define_variableNrT   r#   r$   r%   r   r     s*         ((((((r$   r   c                  V    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
S )DependencyGetVariabler,   cmake	pkgconfig
configtoolinternalsystemdefault_valuer   pkgconfig_defineNrT   r#   r$   r%   r   r     sf         """"))))))r$   r   c                      e Zd ZU ded<   dS )ConfigurationDataSetr,   descriptionNrT   r#   r$   r%   r   r     s               r$   r   c                  j    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S )VcsTagry   rs   r,   fallbackr}   r~   r   rB   rW   replace_stringr(   r   r   rX   r   r\   NrT   r#   r$   r%   r   r     s         M M M M_ _ _ _MMM        r$   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<   ded<   ded<   d	ed<   dS )ConfigureFilerW   rB   r(   rD   z%T.Literal['meson', 'cmake', 'cmake@']formatzT.Literal['c', 'json', 'nasm']output_formatr,   rC   r]   r   zT.Union[str, T.Literal[False]]rX   r   r\   r   encodingzST.Optional[T.List[T.Union[build.Executable, ExternalProgram, Compiler, File, str]]]rs   ra   r~   zRT.Optional[T.Union[T.Dict[str, T.Union[str, int, bool]], build.ConfigurationData]]configuration
macro_nameNrT   r#   r$   r%   r   r   *  s         KKKMMM11111111////    MMM````eeeer$   r   c                  $    e Zd ZU ded<   ded<   dS )
Subprojectr   r   r   r   NrT   r#   r$   r%   r   r   <  s*         FFFFr$   r   c                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	DoSubprojectzFT.Union[T.List[str], T.Dict[str, options.ElementaryOptionValues], str]r   r   r   cmake_optionsz"T.Optional[CMakeSubprojectOptions]r
   NrT   r#   r$   r%   r   r   B  sB         [[[[//////r$   r   c                      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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 )_BaseBuildTargetzArguments used by all BuildTarget like functions.

    This really exists because Jar is so different than all of the other
    BuildTarget functions.
    r(   rx   rW   build_rpathra   extra_filesgnu_symbol_visibilityr   r   r\   install_rpathimplicit_include_directorieszZT.List[T.Union[str, File, build.CustomTarget, build.CustomTargetIndex, build.BuildTarget]]link_dependsr,   link_languagename_prefixname_suffixr   r   zT.List[build.ObjectTypes]objectsr   override_optionszNotRequired[T.List[File]]r{   r   	resourcesNr   r#   r$   r%   r   r   J  s           %%%%MMM&&&&llll""""        &&&&GGGG++++r$   r   c                      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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 )_BuildTargetz%Arguments shared by non-JAR functionsT.List[T.Union[str, int]]d_debugz'T.List[T.Union[str, build.IncludeDirs]]d_import_dirsd_module_versionsr(   
d_unittestT.Dict[str, str]rust_dependency_mapr   rP   r   c_argscpp_args	cuda_argsfortran_argsd_args	objc_argsobjcpp_args	rust_argszT.List[T.Union[str, File]]	vala_argscs_args
swift_argscython_args	nasm_args	masm_argsNr   r#   r$   r%   r   r   e  s        //&&&&::::0000))))))))r$   r   c                      e Zd ZU ded<   dS )_LibraryMixinz T.Optional[Literal['c', 'rust']]rust_abiNrT   r#   r$   r%   r   r     s         ......r$   r   c                  V    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S )
Executabler]   export_dynamicgui_appzT.Optional[T.Union[str, bool]]implibpieKT.Optional[T.Union[str, File, build.CustomTarget, build.CustomTargetIndex]]vs_module_defsr,   win_subsystemz0T.Optional[Literal['application', 'executable']]android_exe_typeNrT   r#   r$   r%   r   r     sf         $$$$****____""""FFFFFFr$   r   c                  $    e Zd ZU ded<   ded<   dS )_StaticLibMixinr(   prelinkr]   picNrT   r#   r$   r%   r   r     s'         MMMr$   r   c                      e Zd ZdS )StaticLibraryNr   r   r    r#   r$   r%   r   r             Dr$   r   c                  8    e Zd ZU ded<   ded<   ded<   ded<   dS )	_SharedLibMixinzT.Optional[T.Tuple[str, str]]darwin_versionsr,   	soversionr   r   r   NrT   r#   r$   r%   r  r    sB         2222______r$   r  c                      e Zd ZdS )SharedLibraryNr   r#   r$   r%   r  r    r   r$   r  c                      e Zd ZU ded<   dS )SharedModuler   r   NrT   r#   r$   r%   r  r    s         ______r$   r  c                  ,   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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ed<   ded<   ded<   d S )!Libraryz9For library, both_library, and as a base for build_targetzNotRequired[T.List[str]]c_static_argsc_shared_argscpp_static_argscpp_shared_argscuda_static_argscuda_shared_argsfortran_static_argsfortran_shared_argsd_static_argsd_shared_argsobjc_static_argsobjc_shared_argsobjcpp_static_argsobjcpp_shared_argsrust_static_argsrust_shared_argsz'NotRequired[T.List[T.Union[str, File]]]vala_static_argsvala_shared_argscs_static_argscs_shared_argsswift_static_argsswift_shared_argscython_static_argscython_shared_argsnasm_static_argsnasm_shared_argsmasm_static_argsmasm_shared_argsNr   r#   r$   r%   r
  r
    sh        CC++++++++--------........11111111++++++++........00000000........========,,,,,,,,////////00000000..................r$   r
  c                      e Zd ZU ded<   dS )BuildTargetznLiteral['executable', 'shared_library', 'static_library', 'shared_module', 'both_libraries', 'library', 'jar']target_typeNrT   r#   r$   r%   r(  r(    s0         N N N N N Nr$   r(  c                  8    e Zd ZU ded<   ded<   ded<   ded<   d	S )
JarrW   
main_classz#T.Optional[build.StructuredSources]java_resourceszT.Union[str, File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList, build.ExtractedObjects, build.BuildTarget]rP   r   	java_argsNrT   r#   r$   r%   r+  r+    sK         OOO7777 M  M  M  Mr$   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<   ded<   ded<   dS )FuncDeclareDependencyr   rL   z'T.List[T.Union[build.IncludeDirs, str]]r   r   r   zT.List[Dependency]dependenciesra   r   include_directoriesrM   zQT.List[T.Union[build.StaticLibrary, build.CustomTarget, build.CustomTargetIndex]]
link_wholezT.List[build.LibTypes]	link_withzT.List[build.ExtractedObjects]r   z3T.List[T.Union[FileOrString, build.GeneratedTypes]]rP   r   	variablesr,   r   NrT   r#   r$   r%   r0  r0    s         ::::0000$$$$%%%%@@@@aaaa%%%%++++@@@@r$   r0  )R
__future__r   typingTtyping_extensionsr   r   r   r    r	   r
   	compilersr   dependencies.baser   mesonlibr   r   r   r   r   r   modules.cmaker   programsr   type_checkingr   r   TYPE_CHECKINGUnionrW   TargetTestArgsr   r'   r3   r7   r:   r=   r@   rG   rK   rR   rV   r`   rd   rg   rj   rm   rp   rr   ru   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r
  r(  r+  r0  r#   r$   r%   <module>rE     s,	   # " " " " " (     G G G G G G G G G G G G                         * * * * * * X X X X X X X X X X X X X X       2 2 2 2 2 2 & & & & & & B B B B B B B B? AwsD%,?@H       
 
 
 
 
y 
 
 
: : : : :H : : :    }   7 7 7 7 7i 7 7 7    	   D D D D DI D D D    y       	       	   & & & & &	 & & && & & & &i & & && & & & & & & &    Y          
    Y              	       9   ,    9       i   ! ! ! ! !( ! ! !" " " " "Y " " "
    i       /#4          # # # # #9 # # #
) ) ) ) )Y ) ) )* * * * *I * * *! ! ! ! !9 ! ! !    Y            I      $       0 0 0 0 0? 0 0 0    y   6    #   4/ / / / /I / / /
G G G G G G G G    i   	 	 	 	 	L/= 	 	 	` ` ` ` `i ` ` `	 	 	 	 	L/= 	 	 	` ` ` ` `< ` ` `
/ / / / /lO_m / / /DN N N N N' N N N    
       I     r$   