+
    UBiq_             	      l  a  0 t $ R t^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RIHtHt ^ RIt^ RI t ^ RI!t!^ RI"t"^ RI#t#^ RI$t$^ RI%H&t& ^RI'H(t(H)t) ]PT                  '       dp   ^ R	I+H,t,H-t- ^R
I.H/t/ ^RI0H1t1 ^RI2H3t3 ^RI4H5t5 ^RI6H7t7 ^RI8H9t9 ^RI:H;t;  ! R R]-4      t< ! R R]-4      t=]P|                  ! R]P~                  ]<]=3,          R7      t@]P~                  R]A3,          tB]P|                  ! R4      tC]P|                  ! R4      tD. RNRNRNRNRNRNRNR NR!NR"NR#NR$NR NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNReNRfNRgNRhNRiNRjNRkNRlNRmNRnNRoNRpNRqNRrNRsNRtNRuNRvNRwNRxNRyNRzNR{NR|NR}NR~NRNRNRNRNRNtE ! R R4      tF/ tGR]HR&   ^ RIIHItI ]J! ]	RR4      '       d   ]	P                  R.tLM]	P                  .tLRsMR]HR&    ! R R#](4      tN ! R R ](4      tO]P                  ! RM4      tQERvR R lltRERvR R lltSERvR R lltTR R ltUR R ltVR R ltWR R ltX ! R R])]P                  R7      tZ ! R R4      t[Rt\ ! R R])4      t]R R lt^R R lt_RR.t`RR.ta ! R R"]P                  4      tc]$P                  ! RRR7       ! R R']P                  ]C,          4      4       tf]$P                  ! RRR7       ! R R)]f]C,          4      4       tg]$P                  ! RRR7       ! R R(]f]P                  ]C,          ,          4      4       ti]$P                  ! RRR7       ! R R*]i]P                  ]C,          ,          ]g]P                  ]C,          ,          4      4       tjR R ltkR R ltlR R ltmR R ltnR R ltoR R ltpR R ltqR R ltrR R ltsR R lttR R ltuR R ltvR R ltwR R ltxR R ltyR R ltzR R lt{R R lt|]! RR7      R R l4       t}R R lt~]$P                   ! R R4      4       tR R ltR R lt]EP                  ! R4      t ! R R.4      tR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltERwR R lltER  ER ltERxER ER llt]q! 4       '       d9   ERt]EP                  ! ER] ER24      EP0                  tER ER ltER	 ER
 ltMER ER ltER ER ltER ER ltER ER ltER ER ltER ER ltERwER ER lltERwER ER lltERyER ER lltERwER ER lltERwER ER  lltERwER! ER" lltERzER# ER$ lltER%tER&tER' ER( ltER) ER* ltER+ ER, ltER{ER- ER. lltERvER/ ER0 lltERvER1 ER2 lltER3 ER4 ltER5 ER6 ltER7 ER8 ltER9 ER: ltER; ER< ltR]EPh                  ]EPj                  ]EPj                  3ER= ER> lltR]EPh                  ]EPj                  ]EPj                  3ER? ER@ lltER|ERA ERB lltERC ERD ltERE ERF ltERG ERH ltERI ERJ ltERK ERL ltERM ERN ltERO ERP lt ! ERQ R-]4      tER}ERR ERS lltERT ERU ltERV ERW lt ! ERX R&]EP                  ]C,          4      tERY ERZ ltERvER[ ER\ lltERvER] ER^ llt ! ER_ R!]P                  4      t ! ER` ERa4      t ^ ERbIHt  ! ERc ERd]4      t]t ! ERf R,]EP                  4      tERwERg ERh lltERi ERj ltERk ERl ltER{ERm ERn lltERo ERp ltERq ERr lt ! ERs Re]P                  ]C,          4      tER~ERt ERu lltR#   ] d    ]tERe]HR+&    Li ; i(  z)A library of random helper functionality.)annotations)PathN)	lru_cachewrapstee)TemporaryDirectoryNamedTemporaryFile)mlog)MesonExceptionHoldableObject)LiteralProtocol)ImmutableListProtocol)ConfigurationData)StrOrBytesPath)Environment)Compiler)
SubProject)programsc                  "    ] tR t^+t$ R]R&   RtR# )_EnvPickleLoadabler   environment N__name__
__module____qualname____firstlineno____annotations____static_attributes__r       ?/usr/lib/python3.14/site-packages/mesonbuild/utils/universal.pyr   r   +   s      r!   r   c                  "    ] tR t^/t$ R]R&   RtR# )_VerPickleLoadablestrversionr   Nr   r   r!   r"   r$   r$   /   s    r!   r$   _PL)boundFile_T_UGITpython_commandNoProjectVersionproject_meson_versionsSecondLevelHolderFileModeGitExceptionLibTypeMachineChoiceEnvironmentExceptionFileOrStringdump_conf_header
OrderedSet
PerMachinePerMachineDefaultablePerThreeMachinePerThreeMachineDefaultableProgressBarRealPathActionTemporaryDirectoryWinProofVersioncheck_direntry_issuesclassify_unity_sourcescurrent_vs_supports_modulesdarwin_get_object_archsdefault_libdirdefault_libexecdirdefault_prefixdefault_datadirdefault_includedirdefault_infodirdefault_localedirdefault_mandirdefault_sbindirdefault_sysconfdirdetect_subprojects
detect_vcsdetermine_worker_countdo_conf_filedo_conf_strdo_replacementexpand_argumentsextract_as_listfirstgenerate_listget_compiler_for_sourceget_filenames_templates_dictget_rsp_thresholdget_subproject_dirget_variable_regexget_wine_shortpathgithas_path_sepis_aix
is_androidis_ascii_string	is_cygwinis_debianlikeis_dragonflybsd
is_freebsdis_haikuis_hurdis_irixis_linux	is_netbsd
is_openbsdis_os2is_osxis_parent_pathis_qnxis_sunos
is_windowsis_wsliter_regexin_iter	join_argslazy_propertylistifylistify_array_value	partitionpath_is_in_rootpickle_load
Popen_safePopen_safe_logged	quiet_git	quote_argrelative_to_if_possiblerelpathreplace_if_differentrun_onceget_meson_commandset_meson_command
split_argsstringlistifyunderscorifysubstitute_valuessubstring_is_in_listtypeslistifyunique_listverbose_gitversion_compare"version_compare_condition_with_minversion_compare_manysearch_versionwindows_detect_native_archwindows_proof_rmwindows_proof_rmtreec                      ] tR t^tRtR# )r.   r   N)r   r   r   r   r    r   r!   r"   r.   r.      s    r!   z+T.Dict[str, T.Union[str, NoProjectVersion]])globfrozenF	runpython(T.Optional['ImmutableListProtocol[str]']_meson_commandc                      ] tR t^tRtRtR# )r5   zEExceptions thrown while processing and creating the build environmentr   N)r   r   r   r   __doc__r    r   r!   r"   r5   r5      s    Or!   c                  2   a  ] tR t^tRR V 3R llltRtV ;t# )r2   c                    V ^8  d   QhRRRR/# )   msgr%   outputT.Optional[str]r   )formats   "r"   __annotate__GitException.__annotate__   s     7 7C 7 7r!   c                	r   < \         SV `  V4       V'       d   VP                  4       V n        R# R V n        R#  N)super__init__stripr   )selfr   r   	__class__s   &&&r"   r   GitException.__init__   s%    (.fllnBr!   )r   Nr   r   r   r   r   r    __classcell__r   s   @r"   r2   r2      s    7 7 7r!   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   cmdT.List[str]
workingdirr   checkboolkwargsT.Anyreturnz(T.Tuple[subprocess.Popen[str], str, str]r   )r   s   "r"   r   r      s5      [ n T UZ   `H r!   c                    \         f   Q R4       h\         .V Op \        V 3RV/VB w  rEpV'       d.   VP                  ^ 8w  d   \        R\	        V 4      ,           V4      hWEV3# )Nz"Callers should make sure it existscwdzGit command failed: )r,   r}   
returncoder2   r%   )r   r   r   r   poes   &&&,   r"   r_   r_      sc    ?@@@?++C7*77GA!"1CH<a@@7Nr!   c               (    V ^8  d   QhRRRRRRRR/# )	r   r   r   r   r   r   r   r   zT.Tuple[bool, str]r   )r   s   "r"   r   r      s)     	 	; 	N 	4 	Tf 	r!   c                    \         '       g   R pV'       d   \        V4      hRV3# \        WV4      w  rEpVP                  ^ 8w  d   RV3# RV3# )Git program not found.FTr,   r2   r_   r   )r   r   r   mr   r   r   s   &&&    r"   r   r      sP    3$q/!ax#5)GA!||qax7Nr!   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r   r   r   r   r   r   )r   s   "r"   r   r      s)      [ n T VZ r!   c                    \         '       g   R pV'       d   \        V4      hR# \        WVRRR7      w  p pVP                  ^ 8H  # )r   FNstdoutstderrr   )r   r   r   r   r   _s   &&&   r"   r   r      sA    3$q/!#5dCGAq!<<1r!   c                    V ^8  d   QhRRRR/# )r   mainfiler%   r   Noner   )r   s   "r"   r   r      s     9 9 9 9r!   c                Z   V P                  R 4      '       g   V .sMZ\        P                  P	                  V 4      '       d(   V P                  R4      '       d   \
        RR.,           sM\
        V .,           sR\        P                  9   d!   \        P                  ! R\        : 24       R# R# )z.pyzmesonmain.pyz-mzmesonbuild.mesonmainMESON_COMMAND_TESTSzmeson_command is N)	endswithr   ospathisabsr-   environr
   log)r   s   &r"   r   r      s     U##"	x	 	 X%6%6~%F%F'41G*HH (8*4

*$^$678 +r!   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r"   r   r      s      C r!   c                     \         # r   )r   r   r!   r"   r   r      s    r!   c                    V ^8  d   QhRRRR/# )r   astringzT.Union[str, bytes]r   r   r   )r   s   "r"   r   r      s      0 T r!   c                     \        V \        4      '       d   V P                  R 4       R# \        V \        4      '       d   V P	                  R 4       R#   \
         d     R# i ; i)asciiFT)
isinstancer%   encodebytesdecodeUnicodeDecodeError)r   s   &r"   rc   rc      sY    gs##NN7#
 	 ''NN7#   s   'A 'A A#"A#c                    V ^8  d   QhRRRR/# )r   direntry_arrayz4T.Union[T.Iterable[T.Union[str, bytes]], str, bytes]r   r   r   )r   s   "r"   r   r     s      *^ cg r!   c           
     \   ^ RI pVP                  4       pVP                  4       R8w  d   \        4       '       gq   \	        V \
        \        34      '       d   V .p V  FI  p\        V4      '       d   K  \        P                  ! \        P                  ! RV: RV: R24      4       KK  	  R# R# R# )    NUTF-8z
                You are using zr which is not a Unicode-compatible
                locale but you are trying to access a file system entry called zS which is
                not pure ASCII. This may cause problems.
                )localegetpreferredencodingupperrs   r   r%   r   rc   r
   warningtextwrapdedent)r   r   r   des   &   r"   rA   rA     s    
 	##%AwwyGJLLnsEl33,-N Br""LL . e $PPRv V*   ! %1r!   c                  D    ] tR tRtRt]P                  R R l4       tRtR# )r0   i  zwA second level object holder. The primary purpose
of such objects is to hold multiple objects with one
default option. c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r"   r   SecondLevelHolder.__annotate__   s    77N7r!   c                	    R # r   r   r   s   &r"   get_default_object$SecondLevelHolder.get_default_object  s    47r!   r   N)	r   r   r   r   r   abcabstractmethodr   r    r   r!   r"   r0   r0     s     	7 7r!   )	metaclassc                  l    ] tR tRt]P
                  ! R4      tRR R lltR R lt]	R R	 l4       t
R
tR# )r1   i"  z*[r-][w-][xsS-][r-][w-][xsS-][r-][w-][xtT-]Nc               $    V ^8  d   QhRRRRRR/# )r   permsr   ownerzT.Union[str, int, None]groupr   )r   s   "r"   r   FileMode.__annotate__<  s#      o =T /r!   c                	V    Wn         V P                  V4      V n        W n        W0n        R # r   )perms_sperms_s_to_bitsr   r   r   )r   r   r   r   s   &&&&r"   r   FileMode.__init__<  s#    ))%0


r!   c                   V ^8  d   QhRR/# r   r   r%   r   )r   s   "r"   r   r   C  s     @ @# @r!   c                	h    R pVP                  V P                  V P                  V P                  4      # )z!<FileMode: {!r} owner={} group={})r   r  r   r   r   rets   & r"   __repr__FileMode.__repr__C  s&    1zz$,,

DJJ??r!   c                    V ^8  d   QhRRRR/# )r   r  r   r   intr   )r   s   "r"   r   r   H  s     2 2o 2# 2r!   c                   Vf   R# Rp\        V\        4      '       g   \        RV: 24      h\        V4      ^	8w  g"   V P                  P                  V4      '       g   \        RV: RV: 24      h^ pV^ ,          R8X  d   V\        P                  ,          pV^,          R8X  d   V\        P                  ,          pV^,          R8X  d   V\        P                  ,          pMbV^,          R8X  d   V\        P                  ,          pM<V^,          R	8X  d/   V\        P                  ,          pV\        P                  ,          pV^,          R8X  d   V\        P                  ,          pV^,          R8X  d   V\        P                  ,          pV^,          R8X  d   V\        P                  ,          pMbV^,          R8X  d   V\        P                  ,          pM<V^,          R	8X  d/   V\        P                  ,          pV\        P                  ,          pV^,          R8X  d   V\        P                  ,          pV^,          R8X  d   V\        P                   ,          pV^,          R8X  d   V\        P"                  ,          pV# V^,          R
8X  d   V\        P$                  ,          pV# V^,          R8X  d/   V\        P"                  ,          pV\        P$                  ,          pV# )z
Does the opposite of stat.filemode(), converts strings of the form
'rwxr-xr-x' to st_mode enums which can be passed to os.chmod()
z	rwxr-xr-xz-Install perms must be a string. For example, zFile perms z' must be exactly 9 chars. For example, rwxSsTt)r   r%   r   lensymbolic_perms_regexmatchstatS_IRUSRS_IWUSRS_IXUSRS_ISUIDS_IRGRPS_IWGRPS_IXGRPS_ISGIDS_IROTHS_IWOTHS_IXOTHS_ISVTX)clsr  egr   s   &&  r"   r  FileMode.perms_s_to_bitsG  s>    ?I'3'' #PQSPV!WXXw<1C$<$<$B$B7$K$K ;wk9`ac`f!ghh1:T\\!E1:T\\!E1:T\\!EQZ3T\\!EQZ3T\\!ET\\!E1:T\\!E1:T\\!E1:T\\!EQZ3T\\!EQZ3T\\!ET\\!E1:T\\!E1:T\\!E1:T\\!E  QZ3T\\!E  QZ3T\\!ET\\!Er!   )r   r   r   r  )NNN)r   r   r   r   recompiler  r   r	  classmethodr  r    r   r!   r"   r1   r1   "  s7    , :: '7 8@ 2 2r!   a  You are using .C or .H files in your project. This is deprecated.
         Currently, Meson treats this as C++ code, but they
            used to be treated as C code.
         Note that the situation is a bit more complex if you are using the
         Visual Studio compiler, as it treats .C files as C code, unless you add
         the /TP compiler flag, but this is unreliable.
         See https://github.com/mesonbuild/meson/pull/8747 for the discussions.c                     ] tR tRtR R ltR R ltR R lt]]! RR	7      R
 R l4       4       t	]]! RR	7      R R l4       4       t
]]! RR	7      R R l4       4       t]R R l4       t]! RR	7      R R l4       t]! RR	7      R R l4       t]R R l4       tR R ltR%R R lltR%R R lltR R ltR  R! lt]! RR	7      R" R# l4       tR$tR# )&r)   i  c               $    V ^8  d   QhRRRRRR/# )r   is_builtr   subdirr%   fnamer   )r   s   "r"   r   File.__annotate__  s!     4 4 4s 43 4r!   c                	    VP                  R 4      '       g   VP                  R4      '       d   \        P                  ! \        RR7       Wn        W n        W0n        \        WV34      V n        R# )z.Cz.HT)onceN)r   r
   r   dot_C_dot_H_warningr.  r/  r0  hash)r   r.  r/  r0  s   &&&&r"   r   File.__init__  sN    >>$5>>$#7#7LL,48 
(E23	r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r1    s     $ $ $r!   c                	"    V P                  4       # r   )relative_namer   s   &r"   __str__File.__str__  s    !!##r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r1    s     0 0# 0r!   c                	    R pV P                   '       g
   VR,          pVR,          pVP                  V P                  4       4      # )z
<File: {0}z (not built)>)r.  r   r9  r  s   & r"   r	  File.__repr__  s;    }}}>!Cs
zz$,,.//r!   Nmaxsizec               (    V ^8  d   QhRRRRRRRR/# )r   source_rootr%   r/  r0  r   r)   r   )r   s   "r"   r   r1    s(     * *c *3 *s *t *r!   c                	    \         P                  P                  \         P                  P                  WV4      4      '       g   \	        R V R24      h\        RW4      # )zFile z does not exist.F)r   r   isfilejoinr   r)   )rC  r/  r0  s   &&&r"   from_source_fileFile.from_source_file  sH     ww~~bggll;FGG 5/?!@AAE6))r!   c               $    V ^8  d   QhRRRRRR/# )r   r/  r%   r0  r   'File'r   )r   s   "r"   r   r1    s!     ) ) )C )F )r!   c                	    \        R W4      # Tr)   )r/  r0  s   &&r"   from_built_fileFile.from_built_file  s     D&((r!   c                    V ^8  d   QhRRRR/# )r   relativer%   r   rJ  r   )r   s   "r"   r   r1    s     8 8c 8f 8r!   c                	n    \         P                  P                  V 4      w  r\        P	                  W4      # r   )r   r   splitr)   rN  )rQ  dirpart	fnameparts   &  r"   from_built_relativeFile.from_built_relative  s*      WW]]84##G77r!   c                    V ^8  d   QhRRRR/# )r   r0  r%   r   rJ  r   )r   s   "r"   r   r1    s     & &# && &r!   c                	    \        R RV 4      # )Fr   rM  )r0  s   &r"   from_absolute_fileFile.from_absolute_file  s    E2u%%r!   c                    V ^8  d   QhRRRR/# )r   build_to_srcr%   r   r   )r   s   "r"   r   r1    s     G GC GC Gr!   c                	    V P                   '       d   V P                  4       # \        P                  P	                  WP
                  V P                  4      # r   )r.  r9  r   r   rF  r/  r0  )r   r]  s   &&r"   rel_to_builddirFile.rel_to_builddir  s7    ===%%''77<<kk4::FFr!   c               $    V ^8  d   QhRRRRRR/# )r   srcdirr%   builddirr   r   )r   s   "r"   r   r1    s&     L LC L3 L3 Lr!   c                	    TpV P                   '       d   Tp\        P                  P                  \        P                  P	                  W0P                  4       4      4      # r   )r.  r   r   normpathrF  r9  )r   rb  rc  absdirs   &&& r"   absolute_pathFile.absolute_path  s@    ===FwwV5G5G5I JKKr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r1    s     ; ; ;r!   c                	    \         P                  P                  V P                  4      ^,          R,          P	                  4       # )   rk  NN)r   r   splitextr0  lowerr   s   &r"   suffixFile.suffix  s.    ww

+A.r288::r!   c                    V ^8  d   QhRRRR/# )r   endingzT.Union[str, T.Tuple[str, ...]]r   r   r   )r   s   "r"   r   r1    s     + +> +4 +r!   c                	8    V P                   P                  V4      # r   )r0  r   )r   rr  s   &&r"   r   File.endswith  s    zz""6**r!   c               $    V ^8  d   QhRRRRRR/# r   r  r%   maxsplitr  r   r   r   )r   s   "r"   r   r1    s!     6 6s 6c 6; 6r!   c                	:    V P                   P                  WR 7      # )rw  )r0  rS  r   r  rw  s   &&&r"   rS  
File.split  s    zz55r!   c               $    V ^8  d   QhRRRRRR/# rv  r   )r   s   "r"   r   r1    s!     7 7 7s 7K 7r!   c                	:    V P                   P                  WR 7      # ry  )r0  rsplitrz  s   &&&r"   r~  File.rsplit  s    zz   66r!   c                    V ^8  d   QhRRRR/# r   otherobjectr   r   r   )r   s   "r"   r   r1    s     g gF gt gr!   c                	   \        V\        4      '       g   \        # V P                  VP                  8w  d   R # V P                  V P
                  V P                  3VP                  VP
                  VP                  38H  # F)r   r)   NotImplementedr5  r0  r/  r.  r   r  s   &&r"   __eq__File.__eq__  s\    %&&!!99

"

DKK7EKKW\WeWe;fffr!   c                   V ^8  d   QhRR/# r   r   r  r   )r   s   "r"   r   r1    s      # r!   c                	    V P                   # r   )r5  r   s   &r"   __hash__File.__hash__  s    yyr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r1    s     5 5s 5r!   c                	j    \         P                  P                  V P                  V P                  4      # r   )r   r   rF  r/  r0  r   s   &r"   r9  File.relative_name  s    ww||DKK44r!   )r0  r5  r.  r/  )r  )r   r   r   r   r   r:  r	  staticmethodr   rG  rN  rV  rZ  r_  rg  propertyro  r   rS  r~  r  r  r9  r    r   r!   r"   r)   r)     s   4$0 t*  *
 t)  ) t8  8 & & tG G tL L ; ;+67g t5 5r!   c               $    V ^8  d   QhRRRRRR/# )r   	compilersT.Iterable['Compiler']srcz'FileOrString'r   z
'Compiler'r   )r   s   "r"   r   r     s(     K K'= KN KWa Kr!   c                h    V  F  pVP                  V4      '       g   K  Vu # 	  \        RV: 24      h)zNGiven a set of compilers and a source, find the compiler for that source type.z&No specified compiler can handle file )can_compiler   )r  r  comps   && r"   rY   rY     s7    C  K  A#I
JJr!   c               $    V ^8  d   QhRRRRRR/# )r   r  r  sourceszT.Sequence['FileOrString']r   z*T.Dict['Compiler', T.List['FileOrString']]r   )r   s   "r"   r   r     s(      &< Ga   gQ r!   c                z    / pV F2  p\        W4      pWB9  d   V.W$&   K  W$,          P                  V4       K4  	  V# r   )rY   append)r  r  compsrclistr  r  s   &&   r"   rB   rB     sD    >@K&y6"!$K$$S)  r!   buildhostzbuild.r   c                  F    ] tR tRtRt^ t^tR R ltR R ltR R lt	R	t
R
# )r4   i  zrEnum class representing one of the two abstract machine names used in
most places: the build, and host, machines.
c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   MachineChoice.__annotate__  s     7 7 7r!   c                	(    V P                  4        R 2# )z machine)get_lower_case_namer   s   &r"   r:  MachineChoice.__str__  s    **,-X66r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r    s     ) )S )r!   c                	0    \         V P                  ,          # r   )MACHINE_NAMESvaluer   s   &r"   r  !MachineChoice.get_lower_case_name  s    TZZ((r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r    s     , ,C ,r!   c                	0    \         V P                  ,          # r   )MACHINE_PREFIXESr  r   s   &r"   
get_prefixMachineChoice.get_prefix  s    

++r!   r   N)r   r   r   r   r   BUILDHOSTr:  r  r  r    r   r!   r"   r4   r4     s'     ED7), ,r!   )eqorderc                  \    ] tR tRt$ R]R&   R]R&   R R ltR R ltR	 R
 ltR R ltRt	R# )r9   i   r*   r  r  c                    V ^8  d   QhRRRR/# )r   machiner4   r   r*   r   )r   s   "r"   r   PerMachine.__annotate__  s     6 6= 6R 6r!   c                	T    V P                   V P                  .VP                  ,          # r   )r  r  r  r   r  s   &&r"   __getitem__PerMachine.__getitem__  s    

DII&w}}55r!   c               $    V ^8  d   QhRRRRRR/# )r   r  r4   valr*   r   r   r   )r   s   "r"   r   r    s!     : := :r :d :r!   c                	:    \        WP                  4       V4       R # r   )setattrr  )r   r  r  s   &&&r"   __setitem__PerMachine.__setitem__  s    113S9r!   c                   V ^8  d   QhRR/# )r   r   z%PerMachineDefaultable[T.Optional[_T]]r   )r   s   "r"   r   r    s      !F r!   c                    \        4       pV P                  Vn        V P                  Vn        VP                  VP                  8X  d   RVn        V# zUnset definition duplicated from their previous to None

This is the inverse of ''default_missing''. By removing defaulted
machines, we can elaborate the original and then redefault them and thus
avoid repeating the elaboration explicitly.
N)r:   r  r  r   unfreezes   & r"   miss_defaultingPerMachine.miss_defaulting  s?     ;P:Q		==HNN* HMr!   c               $    V ^8  d   QhRRRRRR/# )r   r  r*   r  r   r   r   )r   s   "r"   r   r    s!      B b T r!   c                	    Wn         W n        R # r   r  r  )r   r  r  s   &&&r"   assignPerMachine.assign  s    
	r!   r  N)
r   r   r   r   r   r  r  r  r  r    r   r!   r"   r9   r9      s%    I
H6: r!   c                  >    ] tR tRt$ RtR]R&   R R ltR R ltR	tR
# )r;   i  zLike `PerMachine` but includes `target` too.

It turns out just one thing do we need track the target machine. There's no
need to computer the `target` field so we don't bother overriding the
`__getitem__`/`__setitem__` methods.
r*   targetc                   V ^8  d   QhRR/# )r   r   z,'PerThreeMachineDefaultable[T.Optional[_T]]'r   )r   s   "r"   r   PerThreeMachine.__annotate__)  s      !M r!   c                   \        4       pV P                  Vn        V P                  Vn        V P                  Vn        VP                  VP                  8X  d   RVn        VP                  VP                  8X  d   RVn        V# r  )r<   r  r  r  r  s   & r"   r  PerThreeMachine.miss_defaulting)  sb     @Z?[		++??hmm+"HO==HNN* HMr!   c                    V ^8  d   QhRRRR/# )r   r  r4   r   r   r   )r   s   "r"   r   r  :  s     + +] +t +r!   c                	,    V P                   W,          8H  # r   )r  r  s   &&r"   matches_build_machine%PerThreeMachine.matches_build_machine:  s    zzT]**r!   r   N)	r   r   r   r   r   r   r  r  r    r   r!   r"   r;   r;     s     J"+ +r!   c                  Z    ] tR tRt$ RtRtR]R&   RtR]R&   R R lt]	R	 R
 l4       t
RtR# )r:   i>  zCExtends `PerMachine` with the ability to default from `None`s.
    NT.Optional[_T]r  r  c                   V ^8  d   QhRR/# )r   r   PerMachine[_T]r   )r   s   "r"   r   "PerMachineDefaultable.__annotate__F  s     Z Z Zr!   c                    V P                   f   Q R4       h\        V P                   V P                  e   V P                  4      # V P                   4      # )z}Default host to build

This allows just specifying nothing in the native case, and just host in the
cross non-compiler case.
z0Cannot fill in missing when all fields are empty)r  r9   r  r   s   &r"   default_missing%PerMachineDefaultable.default_missingF  sD     zz%Y'YY%$**4993HdiiYYdjjYYr!   c               (    V ^8  d   QhRRRRRRRR/# )r   is_crossr   r  r*   r  r   r  r   )r   s   "r"   r   r  P  s(     # #t #B #b #^ #r!   c                N    V ! V4      pV'       d   W4n         VP                  4       # )a  Easy way to get a defaulted value

This allows simplifying the case where you can control whether host and
build are separate or not with a boolean. If the is_cross value is set
to true then the optional host value will be used, otherwise the host
will be set to the build value.
)r  r  )r&  r  r  r  r   s   &&&& r"   defaultPerMachineDefaultable.defaultO  s$     JF  ""r!   r   )r   r   r   r   r   r  r   r  r  r+  r  r    r   r!   r"   r:   r:   >  s7     !E> D.Z # #r!   c                  6    ] tR tRt$ RtRtR]R&   R R ltRtR# )	r<   i^  zHExtends `PerThreeMachine` with the ability to default from `None`s.
    Nr  r  c                   V ^8  d   QhRR/# )r   r   zPerThreeMachine[_T]r   )r   s   "r"   r   'PerThreeMachineDefaultable.__annotate__e  s     
9 
9!4 
9r!   c                    V P                   f   Q R4       hV P                  e   V P                  MV P                   pV P                  e   V P                  MTp\        V P                   W4      # )zDefault host to build and target to host.

This allows just specifying nothing in the native case, just host in the
cross non-compiler case, and just target in the native-built
cross-compiler case.
z4Cannot default a PerMachine when all values are None)r  r  r  r;   )r   r  r  s   &  r"   r  *PerThreeMachineDefaultable.default_missinge  sW     zz%]']]% II1tyytzz $ 7Ttzz488r!   r   )	r   r   r   r   r   r  r   r  r    r   r!   r"   r<   r<   ^  s     "FN!
9 
9r!   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r"   r   r   r       0 0$ 0r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )sunosplatformsystemrn  r   r!   r"   rr   rr   r      ??""$//r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   v  s     1 1 1r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )darwinr  r   r!   r"   ro   ro   v      ??""$00r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   z  r  r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )linuxr  r   r!   r"   rk   rk   z  r  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   ~       2 2D 2r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )androidr  r   r!   r"   rb   rb   ~      ??""$	11r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     r  r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )haikur  r   r!   r"   rh   rh     r  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     r  r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )openbsdr  r   r!   r"   rm   rm     r   r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     ! !D !r!   c                 R    \         P                  ! 4       P                  4       p V R 8H  # )windowsr  )platnames    r"   rs   rs     s"     &&(Hy  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     D D Dr!   c                 r    \        4       ;'       d'    R \        P                  ! 4       P                  4       9   # )	microsoft)rk   r  releasern  r   r!   r"   rt   rt     s)    :CC+)9)9);)A)A)CCCr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     $ $4 $r!   c                 (    \         P                  R 8H  # )cygwin)sysr  r   r!   r"   rd   rd     s    <<8##r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     1 1t 1r!   c                 @    \         P                  P                  R 4      # )z/etc/debian_version)r   r   rE  r   r!   r"   re   re     s    77>>/00r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     4 4 4r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )	dragonflyr  r   r!   r"   rf   rf     s    ??""$33r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     1 14 1r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )netbsdr  r   r!   r"   rl   rl     r  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     r  r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )freebsdr  r   r!   r"   rg   rg     r   r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     0 0 0r!   c                 J    \         P                  ! 4       P                  R 4      # )irix)r  r  
startswithr   r!   r"   rj   rj     s    ??''//r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     . . .r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )gnur  r   r!   r"   ri   ri         ??""$--r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r          . . .r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )qnxr  r   r!   r"   rq   rq     r%  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     r'  r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )aixr  r   r!   r"   ra   ra     r%  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     / / /r!   c                 N    \         P                  ! 4       P                  4       R 8H  # )zos/2r  r   r!   r"   rn   rn     s    ??""$..r!   r@  c                    V ^8  d   QhRRRR/# )r   objpathr%   r   z'ImmutableListProtocol[str]'r   )r   s   "r"   r   r     s      S -I r!   c           
     V   \        RRV .4      w  rpV'       g   \        P                  ! RV  RV 24       R# VP                  R^4      ^,          pRRRR	R
R	RRRR/pVP	                  4       pV Uu. uF  qdP                  Wf4      NK  	  ppRV9   d   VP                  R4       V# u upi )z
For a specific object (executable, static library, dylib, etc), run `lipo`
to fetch the list of archs supported by it. Supports both thin objects and
'fat' objects.
lipoz-infozlipo : Ni386x86arm64aarch64arm64eppc7400ppcppc970armv7arm)r}   r
   debugr~  rS  getr  )r0  r   stdor   map_arch
lipo_archs	lipo_archmeson_archss   &       r"   rD   rD     s     !&'7!;<OAV

U7)2fX./;;tQ"D 	)5%H JGQRz)<<	5zKR $5! Ss   1B&c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s     # #C #r!   c                 
   \         P                  R8w  d   R#  ^ RIp V P                  4       pV P                  4       pV P                  P
                  pV P                  VP                  4       4      pVP                  W@P                  V4      V P                  V4      4      '       dM   VP                  R8X  d   R# VP                  R8X  d   R# VP                  R8X  d   R	# VP                  R
8X  d   R# \        P                  P                  RR4      P!                  4       pT'       g)    \        P                  R,          P!                  4       pT# T#   \        \        3 d     Lsi ; i  \"         d    \%        R4      hi ; i)z9
The architecture of Windows itself: x86, amd64 or arm64
win32r   Nid  amd64iL  r5  id  r6  i  r=  PROCESSOR_ARCHITEW6432PROCESSOR_ARCHITECTUREz'Unable to detect native OS architecture)r  r  ctypesc_ushortwindllkernel32c_void_pGetCurrentProcessIsWow64Process2byrefr  OSErrorAttributeErrorr   r   r?  rn  KeyErrorr5   )rK  process_archnative_archrN  processarchs         r"   r   r     sF    ||w(oo'==))//("<"<">?##G\\,-GVaIbcc  F*""f,""f,""f, ::>>2B7==?D	R::67==?D K4K ^$   	R&'PQQ	Rs0   B E ;E E !E +%E+ E('E(+Fc                  |    ] tR tRt$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R	&   R
tR]R&   RtR]R&   R R ltRtR
# )VcsDatai  r%   namer   repo_dirr   get_rev	rev_regexdepNr   wc_dirFr   repo_can_be_filec                    V ^8  d   QhRRRR/# )r   curdirr   r   r   r   )r   s   "r"   r   VcsData.__annotate__  s     
 
$ 
4 
r!   c                	    \         P                  ! V P                  4      '       g   R # WP                  ,          pVP	                  4       '       d   R# VP                  4       '       d   V P                  '       d   R# R # FT)shutilwhichr   r]  is_diris_filerb  )r   rd  repos   && r"   repo_existsVcsData.repo_exists  sN    ||DHH%%%;;==<<>>d333r!   r   )	r   r   r   r   r   ra  rb  rm  r    r   r!   r"   r[  r[    s@    
I	HMN	H"FO""d"
 
r!   r[  c                    V ^8  d   QhRRRR/# )r   
source_dirT.Union[str, Path]r   zT.Optional[VcsData]r   )r   s   "r"   r   r     s     0 0- 02E 0r!   c                   \        R R R. RORRRR7      \        RRR. RORR	R
7      \        RRRRR.RRR
7      \        RRRRR.RRR
7      .p\        V \        4      '       d   \        V 4      p \        P
                  ! V P                  4      pVP                  V 4       V F9  pV F0  pVP                  V4      '       g   K  \        V4      Vn	        Vu u # 	  K;  	  R# )r_   z.gitz(.*)z.git/logs/HEADT)r\  r   r]  r^  r_  r`  rb  	mercurialhgz.hgz.hg/dirstate)r\  r   r]  r^  r_  r`  
subversionsvnz.svninfozRevision: (.*)z
.svn/wc.dbbazaarbzrz.bzrrevnoN)r_   describez	--dirty=+z--always)rt  idz-i)
r[  r   r%   r   collectionsdequeparents
appendleftrm  ra  )rp  vcs_systemsparent_paths_and_selfrd  vcss   &    r"   rP   rP     s    B"!	
 	(	
 	fo(	
 	g&	
5"KF *c""*%
'--j.@.@A $$Z0'Cv&& [

  (
 r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   @  s     ; ;T ;r!   c                    \         P                  P                  R R4      p V P                  R^4      p\	        V^ ,          4      pV^8  d   R# V^8X  d   \	        V^,          4      ^
8  d   R# V P                  R4      ;'       d    RV 9   # )	VSCMD_VERr   .Tz16.9.0z-pre.)r   r   r?  rS  r  r!  )vsvernumsmajors      r"   rC   rC   @  st    JJNN;+E;;sADQLE{{s47|r)H%::'U*::r!   z(\d+)|([a-zA-Z]+)c                      ] tR tR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 R lt
R R ltR R ltR R ltRtR# )r@   iM  c                    V ^8  d   QhRRRR/# )r   r  r%   r   r   r   )r   s   "r"   r   Version.__annotate__N  s     6 6# 6$ 6r!   c                	    Wn         \        P                  V4       Uu. uFE  pVP                  ^4      '       d   \	        VP                  ^4      4      MVP                  ^4      NKG  	  upV n        R# u upi )rk  N)_s_VERSION_TOK_REfinditerr   r  _v)r   r  r   s   && r"   r   Version.__init__N  s]     )11!464A $%771::AGGAJ1771:=46 6s
   A3/A3c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r  W  s     9 9 9r!   c                	`    R P                  V P                  \        V P                  4      4      # )z	{} (V={}))r   r  r%   r  r   s   &r"   r:  Version.__str__W  s!    !!$''3tww<88r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r  Z  s     ' '# 'r!   c                	"    R V P                    R2# )z
<Version: r>  )r  r   s   &r"   r	  Version.__repr__Z  s    DGG9A&&r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  ]        F t r!   c                	z    \        V\        4      '       d!   V P                  V\        P                  4      # \
        # r   )r   r@   _Version__cmpoperatorltr  r  s   &&r"   __lt__Version.__lt__]  *    eW%%::eX[[11r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  b  r  r!   c                	z    \        V\        4      '       d!   V P                  V\        P                  4      # \
        # r   )r   r@   r  r  gtr  r  s   &&r"   __gt__Version.__gt__b  r  r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  g  r  r!   c                	z    \        V\        4      '       d!   V P                  V\        P                  4      # \
        # r   )r   r@   r  r  ler  r  s   &&r"   __le__Version.__le__g  r  r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  l  r  r!   c                	z    \        V\        4      '       d!   V P                  V\        P                  4      # \
        # r   )r   r@   r  r  ger  r  s   &&r"   __ge__Version.__ge__l  r  r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  q  r  r!   c                	l    \        V\        4      '       d   V P                  VP                  8H  # \        # r   r   r@   r  r  r  s   &&r"   r  Version.__eq__q  (    eW%%77ehh&&r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  v  r  r!   c                	l    \        V\        4      '       d   V P                  VP                  8g  # \        # r   r  r  s   &&r"   __ne__Version.__ne__v  r  r!   c               $    V ^8  d   QhRRRRRR/# )r   r  z	'Version'
comparatorz T.Callable[[T.Any, T.Any], bool]r   r   r   )r   s   "r"   r   r  {  s#     7 79 72R 7W[ 7r!   c                	2   \        V P                  VP                  4       FE  w  r4\        V\        4      p\        V\        4      pWV8w  d   V! WV4      u # W48w  g   K=  V! W44      u # 	  V! \	        V P                  4      \	        VP                  4      4      # r   )zipr  r   r  r  )r   r  r  ourstheirsours_is_inttheirs_is_ints   &&&    r"   __cmpVersion.__cmp{  su    2LD$T3/K&vs3M+!+==~!$// 3 #dgg,EHH66r!   )r  r  N)r   r   r   r   r   r:  r	  r  r  r  r  r  r  r  r    r   r!   r"   r@   r@   M  s9    69'





7 7r!   c                    V ^8  d   QhRRRR/# )r   vstr2r%   r   z.T.Tuple[T.Callable[[T.Any, T.Any], bool], str]r   )r   s   "r"   r   r     s      # *X r!   c                   V P                  R 4      '       d   \        P                  pV R,          p W3# V P                  R4      '       d   \        P                  pV R,          p W3# V P                  R4      '       d   \        P                  pV R,          p W3# V P                  R4      '       d   \        P
                  pV R,          p W3# V P                  R4      '       d   \        P
                  pV R,          p W3# V P                  R4      '       d   \        P                  pV R,          p W3# V P                  R4      '       d   \        P                  pV R,          p W3# \        P
                  pW3# )	>=r   NN<=!====rl  r>  <)r!  r  r  r  ner  r  r  )r  cmpops   & r"   _version_extract_cmpopr    s\   b	, >+ 
		$		b	& >% 
		$		b	  > 
		$		b	 > 
		#		b	 > 
		#		b	 > 
		#		b	 > >r!   c               $    V ^8  d   QhRRRRRR/# )r   vstr1r%   r  r   r   r   )r   s   "r"   r   r     s!     1 13 1s 1t 1r!   c                R    \        V4      w  r!V! \        V 4      \        V4      4      # r   )r  r@   )r  r  r  s   && r"   r   r     s#    +E2NU00r!   c               $    V ^8  d   QhRRRRRR/# )r   r  r%   
conditionszT.Union[str, T.Iterable[str]]r   z'T.Tuple[bool, T.List[str], T.List[str]]r   )r   s   "r"   r   r     s#     
+ 
+ 
+1N 
+Sz 
+r!   c                    \        V\        4      '       d   V.p. p. pV F8  p\        W4      '       g   VP                  V4       K'  VP                  V4       K:  	  V'       * W23# r   )r   r%   r   r  )r  r  found	not_foundreqs   &&   r"   r   r     s^    *c"" \
EIu**S!LL	 
 =)**r!   c               $    V ^8  d   QhRRRRRR/# )r   	conditionr%   minimumr   r   r   )r   s   "r"   r   r     s&     $G $G# $G $G $Gr!   c           	        V P                  R 4      '       d   \        P                  pV R,          p MV P                  R4      '       d   R# V P                  R4      '       d   R# V P                  R4      '       d   \        P                  pV R,          p MV P                  R4      '       d   \        P                  pV R,          p MZV P                  R4      '       d   \        P                  pV R,          p M)V P                  R	4      '       d   R# \        P                  pV P	                  4       p \
        P                  ! R
V 4      '       d
   V R,          p \        P                  ! RV! \        V4      \        V 4      4      4      # )r  r  r  Fr  r  r  rl  r>  r  z	^\d+.\d+$z.0r   )
r!  r  r  r  r   r)  r  r  castr@   )r  r  r  s   && r"   r   r     s   D!!bM				d	#	#			d	#	#			d	#	#bM				c	"	"bM				c	"	"bM				c	"	" !I	xxi((T	66&% 0')2DEFFr!   c                    V ^8  d   QhRRRR/# )r   textr%   r   r   )r   s   "r"   r   r     s     ) ) ) )r!   c                $   \         P                  ! R \         P                  4      pVP                  V 4      pV'       d   VP	                  ^ 4      # \         P                  ! R4      pVP                  V 4      pV'       d   VP	                  ^ 4      # R# )aS  
    (?<!                # Zero-width negative lookbehind assertion
        (
            \d          # One digit
            | \.        # Or one period
        )               # One occurrence
    )
    # Following pattern must not follow a digit or period
    (
        \d{1,2}         # One or two digits
        (
            \.\d+       # Period and one or more digits
        )+              # One or more occurrences
        (
            -[a-zA-Z0-9]+   # Hyphen and one or more alphanumeric
        )?              # Zero or one occurrence
    )                   # One occurrence
    z(\d{1,4}\.\d{1,4}\.?\d{0,4})zunknown version)r)  r*  VERBOSEsearchr   )r  version_regexr  s   &  r"   r   r     sx     JJ  " 
#M$   &E{{1~ JJ>?M  &E{{1~r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r     s       r!   c                 *   \        4       '       d    \        P                  ! R R.\        P                  \        P                  R7      p V P                  4       w  rV P                  ^ 8X  d(   VP                  4       P                  4       pRV,           #  \        4       '       g   \        4       '       d   R# \        P                  P                  R4      '       d(   \        P                  P                  R4      '       g   R# R#   \         d     L}i ; i)zdpkg-architecturez-qDEB_HOST_MULTIARCHr   zlib/libz
/usr/lib64lib64)re   
subprocessPopenPIPEDEVNULLcommunicater   r   r   	Exceptionrg   rj   r   r   isdirislink)pcr@  r   archpaths       r"   rE   rE     s    		!!#68N"O)3)3););=B (IT}}!;;=..0(( "
 ||wyy	ww}}\""277>>,+G+G  		s   B D DDc                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   !  s      C r!   c                 *    \        4       '       d   R # R# )r  libexecrh   r   r!   r"   rF   rF   !  s    zzr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   (  s       r!   c                 N    \        4       '       d   R # \        4       '       d   R# R# )zc:/z/boot/system/non-packagedz
/usr/local)rs   rh   r   r!   r"   rG   rG   (  s    ||zz*r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   0  s       r!   c                 *    \        4       '       d   R # R# )datasharer  r   r!   r"   rH   rH   0  s    zzr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   6  s      C r!   c                 *    \        4       '       d   R # R# )zdevelop/headersincluder  r   r!   r"   rI   rI   6  s    zz r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   <  s       r!   c                 *    \        4       '       d   R # R# )zdocumentation/infoz
share/infor  r   r!   r"   rJ   rJ   <  s    zz#r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   B  s      3 r!   c                 *    \        4       '       d   R # R# )zdata/localezshare/localer  r   r!   r"   rK   rK   B  s    zzr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   H  s       r!   c                 *    \        4       '       d   R # R# )zdocumentation/manz	share/manr  r   r!   r"   rL   rL   H  s    zz"r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   N  s       r!   c                 *    \        4       '       d   R # R# )binsbinr  r   r!   r"   rM   rM   N  s    zzr!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   T  s      C r!   c                 *    \        4       '       d   R # R# )settingsetcr  r   r!   r"   rN   rN   T  s    zzr!   c                    V ^8  d   QhRRRR/# )r   varnamesT.Optional[T.List[str]]r   r  r   )r   s   "r"   r   r   Z  s      %<  r!   c                   ^ pT ;'       g    . p V P                  R4       V  FH  pV\        P                  9   g   K   \        \        P                  V,          4      pV^ 8  d   \        hKJ  	  V^ 8X  d    \        P                  ! 4       pV# V#   \         d    \        RT R24       ^p K  i ; i  \         d    ^p T# i ; i)r   MESON_NUM_PROCESSESzInvalid value in z, using 1 thread.)	r  r   r   r  
ValueErrorprintmultiprocessing	cpu_countr  )r  num_workersvarnames   &  r"   rQ   rQ   Z  s    K~~2H OO)*bjj  !"**W"56?$$ #	  a	 *335K ;   )'2CDE   	K	s#   -B6B2 B/.B/2CCc               $    V ^8  d   QhRRRRRR/# )r   parentr%   trialr   r   r   )r   s   "r"   r   r   s  s&     W W3 Ws Wt Wr!   c                &   \         P                  P                  V 4      \         P                  P                  V4      8X  g   Q h\        4       '       d%   V P	                  RR4      p VP	                  RR4      pV P                  R4      pVP                  R4      pV Uu. uF  qD'       g   K  VR8w  g   K  VNK  	  ppV Uu. uF  qD'       g   K  VR8w  g   K  VNK  	  pp\        V4      p\        V4      V8  ;'       d	    VRV V8H  # u upi u upi )a  Checks if @trial is a file under the directory @parent. Both @trial and @parent should be
adequately normalized, though empty and '.' segments in @parent and @trial are accepted
and discarded, matching the behavior of os.path.commonpath.  Either both or none should
be absolute.\/r  N)r   r   r   rs   replacerS  r  )r  r  split_parentsplit_trialc
componentss   &&    r"   rp   rp   s  s    
 77== BGGMM%$8888||c*dC(<<$L++c"K+>|!qAQ#XAA|L>)<kQ11811kK<\"J{z)VVk+:.F,.VV	 ?<s$   	D	,D	5D		DDDc               $    V ^8  d   QhRRRRRR/# )r   r\  r%   sepr   r   r   )r   s   "r"   r   r     s!      s   r!   c                *    V F  pW 9   g   K   R# 	  R# )z@Checks if any of the specified @sep path separators are in @nameTFr   )r\  r&  eachs   && r"   r`   r`     s    <  r!   z 	
[z"]c                    V ^8  d   QhRRRR/# r   argr%   r   r   )r   s   "r"   r   r     s      s s r!   c                   V '       d   \        V 4      '       g   V # R p^ pV  FD  pVR8X  d   V^,          pK  VR 8X  d   V^,          ^,           pWR,          V,           ,          p^ pKF  	  W^,          R,          R ,           ,          pV# )"r  )_find_unsafe_char)r,  resultnum_backslashesr#  s   &   r"   r   r     s    (--JADy1$8&5&9A&=OD0144"#  	Q&$.44r!   c                    V ^8  d   QhRRRR/# r   r   r%   r   r   r   )r   s   "r"   r   r     s     ! ! ! !r!   c                   . pR p^ p^ pRpV  F  pVR8X  d   V^,          pK  VR8X  d7   V^,          '       g(   W#^,          R,          ,          pV^,          pV'       * pMfV\         9   d/   V'       g'   V'       g	   V'       d   VP                  V4       R p^ pM-VR8X  d   V^,
          ^,          pW#R,          V,           ,          p^ pK  	  V'       g	   V'       d   VP                  V4       V# )r   Fr  r.  )_whitespacer  )r   r0  r,  r1  
num_quotes	in_quotesr#  s   &      r"   r   r     s     
	ADy1$8Oa$7$7q0D88C!OJ$-I+%ijc* %&
Cx+:Q+>1*DT1A55C"#- 0 *MM#r!   c                    V ^8  d   QhRRRR/# r+  r   )r   s   "r"   r   r     s        s  s  r!   c                .    \         P                  ! V 4      # r   )shlexquote)r,  s   &r"   r   r         {{3r!   c                    V ^8  d   QhRRRR/# r3  r   )r   s   "r"   r   r     s            r!   c                .    \         P                  ! V 4      # r   )r:  rS  )r   s   &r"   r   r     r<  r!   c                    V ^8  d   QhRRRR/# )r   argsT.Iterable[str]r   r%   r   )r   s   "r"   r   r     s     2 2O 2 2r!   c                `    R P                  V  Uu. uF  p\        V4      NK  	  up4      # u upi ) )rF  r   )r@  r  s   & r"   rv   rv     s'    88404aYq\40110s   +c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   regexT.Pattern[str]liner%   variable_format#Literal['meson', 'cmake', 'cmake@']confdataHT.Union[T.Dict[str, T.Tuple[str, T.Optional[str]]], 'ConfigurationData']r   T.Tuple[str, T.Set[str]]r   )r   s   "r"   r   r     s6     8 8. 8 8$G8e8 kC8r!   c                j    VR 8X  d   \        WV4      # VR9   d   \        WR8H  V4      # \        R4      hmesoncmake@zInvalid variable format>   cmakerP  )do_replacement_mesondo_replacement_cmaker   )rE  rG  rH  rJ  s   &&&&r"   rT   rT     s@     '!#E::	/	/#DX*ExPP677r!   c               (    V ^8  d   QhRRRRRRRR/# )	r   rE  rF  rG  r%   rJ  rK  r   rL  r   )r   s   "r"   r   r     s4      D  D  Dc  D#k D qI Dr!   c                `   aa \        4       oR  VV3R llp\        P                  ! WV4      S3# )c                    V ^8  d   QhRRRR/# )r   r  T.Match[str]r   r%   r   )r   s   "r"   r   *do_replacement_meson.<locals>.__annotate__  s        r!   c                  < V P                  ^ 4      P                  R4      '       d8   V P                  ^ 4      V P                  ^ 4      ,
          pRV^,          ,          # V P	                  4       P                  R4      e   V P                  R4      ^R
 R,           # V P                  R4      pRpVS9   d   SP                  V4      w  rE\        V\        4      '       d   TpV# \        V\        4      '       dA   \        V\        4      '       d   RV: R2p\        P                  ! V4       \        V4      pV# RV: R	V: 2p\        V4      hSP                  V4       V# )r   r  escaped@variabler   z)Variable substitution with boolean value z is deprecated.Tried to replace variable 2 value with something other than a string or int: )r   r   endstart	groupdictr?  r   r%   r  r   r
   deprecationr   add)	r  num_escapesr  var_strvarr   r   rJ  missing_variabless	   &      r"   variable_replace.do_replacement_meson.<locals>.variable_replace  sC   ;;q>""4(())A,Q7K;!+,,__""9-9;;y)!B/33 kk*-GG("!g.c3''!G N  S))!#t,, I'Tcd((-!#hG N 7wk BCCF'KC(--!%%g.Nr!   )setr)  sub)rE  rG  rJ  ri  rh  s   &&f @r"   rR  rR    s.    $'E 8 66%402CCCr!   c               (    V ^8  d   QhRRRRRRRR/# )	r   rG  r%   at_onlyr   rJ  rK  r   rL  r   )r   s   "r"   r   r     s4     U/ U/s U/T U/#kU/ qIU/r!   c                   aaaaaa \        4       o\        P                  ! R \        P                  4      oR VV3R lloR VVVV3R lloS! V 4      S3# )z 
        [^a-zA-Z0-9_/.+\-]
    c                    V ^8  d   QhRRRR/# )r   r  r%   r   r   )r   s   "r"   r   *do_replacement_cmake.<locals>.__annotate__  s      c c r!   c                ^  < R pV S9   d   SP                  V 4      w  r#\        V\        4      '       d   TpV# \        V\        4      '       d   \        \	        V4      4      pV# \        V\        4      '       d   \        V4      pV# RV : RV: 2p\        V4      hSP                  V 4       V# )r   r]  r^  )r?  r   r%   r   r  r   rd  )r  rf  rg  r   r   rJ  rh  s   &    r"   variable_get*do_replacement_cmake.<locals>.variable_get  s    h\\'*FC#s##  C&&c#h-  C%%c(  37+ >??BgG$S))!!'*r!   c                    V ^8  d   QhRRRR/# )r   rG  r%   r   r   )r   s   "r"   r   rq  "  s     9 9 9 9r!   c                P  < ^ p\        V 4      V8  Ed   W,          R8X  dq   V P                  RV^,           4      pW!^,           8  dI   W^,           V pSP                  V4      pV'       g%   S! V4      pV RV V,           W^,           R ,           p EMfS'       Eg^   WV^,            R8X  EdM   ^pV^,           p V^ 8  d   WV^,            R8X  d   V^,          pV^,          pK+  W,          R8X  d   V^,          pV^,          pKL  W,          R9   d   V^,          pKd  SP                  W,          4      '       d)   W,          pW^,           V p	RV: RV	: 2p
\        V
4      hV^,          pK   T^ 8X  d   S! Y^,           T^,
           4      pSP                  T4      pT'       d7   Y^,
          ,          pY^,           T^,
           p	RT: RT	: 2p
\        T
4      hS! T4      pT RT T,           YR ,           p V^,          pEK   V #   \         d    RYR	 : 2p
\        T
4      hi ; i)
r   r[  Nz${}zFound invalid character z in variable zFound incomplete variable >   
r[  r  )r  findr  r   
IndexError)rG  indexnext_atr  r  r  bracket_countend_bracketinvalid_characterr\  r   rn  character_regex
parse_liners  s   &          r"   r  (do_replacement_cmake.<locals>.parse_line"  sC   $i%{c!))Cq11W$"773G+227;E ! ,W 5#FU|e3d19:6FFWE!G!4!< !#ai.'!+KM:dB'1,K)Q.M!.#5'1,K)Q.M!.+= (1,K,33D4EFF040A-'+!GK'@H$<=N<Q$1(#?C"0"55'1,K% ,. !A%(Agk!m)DEG+227;E,0Q,?)#'aA#> 89J8M -h\;,S11(1E<%/$|2DDDQJE' " .6t"~6HIC(--.s   8B4H H%)rk  r)  r*  r  )rG  rn  rJ  r  rh  r  rs  s   &ff@@@@r"   rS  rS    sM    $'Ejj "	O $9 9v d...r!   c          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r   rE  rF  rG  r%   rJ  'ConfigurationData'
subprojectT.Optional[SubProject]r   r   )r   s   "r"   r   r   _  s9     Y Y> Y Y@S Y 6YBEYr!   c                :   VP                  4       p\        V4      ^8w  d!   \        RVP                  4       ,          4      hV^,          p VP	                  V4      w  rg\        T\        4      '       d.   RT RT 2P                  4       R,           p\        YT4      w  rT# \        T\        4      '       d   T'       d
   RT,          # RT,          # \        T\        4      '       d   RYV3,          # \        R	T,          4      h  \
         d    RT,          u # i ; i)
r   z4#mesondefine does not contain exactly two tokens: %s/* #undef %s */
#define rC  rx  z#define %s
z
#undef %s
z#define %s %d
z.#mesondefine argument "%s" is of unknown type.)rS  r  r   r   r?  rU  r   r%   rR  r   r  )	rE  rG  rJ  r  arrr  vr   r0  s	   &&&&     r"   do_define_mesonr  _  s    **,C
3x1}SVZV`V`Vbbcc!fG-||G$ !SG9AaS)//1D8(A		At		!G++ 7**	As		 G<//MPWWXX  -"W,,-s   D DDc          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r   rG  r%   rJ  r  rn  r   r  r  r   r   )r   s   "r"   r   r   z  s2     ) )# ))< )t ) 6)BE)r!   c                  a R V 9   oR V3R llpV R,          P                  4       p\        V4      ^8w  d   Ve   ^RIHp VP	                  RRV4       V^,          p VP                  V4      w  rS'       g   T'       g
   RT,          # T! Y4      p
R	T R
T
 2P                  4       R,           p
\        YT4      w  rT
#   \         d     S'       d   RT,          u # RT,          u # i ; i)cmakedefine01c               $    V ^8  d   QhRRRRRR/# )r   rG  r%   rJ  r  r   r   )r   s   "r"   r   %do_define_cmake.<locals>.__annotate__~  s"     & &s &.A &c &r!   c                z  < V R ,          P                  4       pS'       d8   VP                  V^,          4      w  r4\        \        \	        V4      4      4      # . pVR,           F*  p VP                  V4      w  r7V\        V4      .,          pK,  	  RP                  V4      #   \
         d    YV.,          p KV  i ; i)rl  r  rC  )rS  r?  r%   r  r   rU  rF  )	rG  rJ  r  r  descdefine_valuetokenr   cmake_bool_defines	   &&      r"   get_cmake_define)do_define_cmake.<locals>.get_cmake_define~  s    2hnn SV,IQs47|$$$&WWE(||E*Q(  xx%%  ('(s   '&B""B:9B:rl  )
FeatureNewz&cmakedefine without exactly two tokensz0.54.1z#define %s 0
r  r  rC  rx  )	rS  r  interpreterbase.decoratorsr  
single_user?  rU  r   rS  )rG  rJ  rn  r  r  r  r  r  r  r   r0  r  s   &&&&       @r"   do_define_cmaker  z  s    '4/& &  r(..
C
3x1}/;FR\]!fG1||G$ Q"W,,d-Fy&*002T9F$Vh?IFM  1#g--&00	1s   B? ?C)	C)	C)(C)c                    V ^8  d   QhRRRR/# )r   rH  rI  r   rF  r   )r   s   "r"   r   r     s      (K Zh r!   c                   V R 8X  d(   \         P                  ! R\         P                  4      pV# V R8X  d(   \         P                  ! R\         P                  4      pV# V R8X  d&   \         P                  ! R\         P                  4      pX# )rO  a  
            (?:\\\\)+(?=\\?@)  # Matches multiple backslashes followed by an @ symbol
            |                  # OR
            (?<!\\)@(?P<variable>[-a-zA-Z0-9_]+)@  # Match a variable enclosed in @ symbols and capture the variable name; no matches beginning with '\@'
            |                  # OR
            (?P<escaped>\\@[-a-zA-Z0-9_]+\\@)  # Match an escaped variable enclosed in @ symbols
        rP  z
            (?<!\\)@(?P<variable>[-a-zA-Z0-9_]+)@  # Match a variable enclosed in @ symbols and capture the variable name; no matches beginning with '\@'
        rQ  z
            \${(?P<variable>[-a-zA-Z0-9_]*)}  # Match a variable enclosed in curly braces and capture the variable name
        )r)  r*  r  )rH  rE  s   & r"   r]   r]     s    '!

  ZZ L 
H	$

 ZZ L	 
G	#

 ZZ Lr!   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r  r%   r  r   rJ  r  rH  rI  r  r  r   &T.Tuple[T.List[str], T.Set[str], bool]r   )r   s   "r"   r   r     s:     8 8S 8 87J 8!D828>d8r!   c                l    VR 8X  d   \        WW$4      # VR9   d   \        WW#R8H  V4      # \        R4      hrN  )do_conf_str_mesondo_conf_str_cmaker   )r  r  rJ  rH  r  s   &&&&&r"   rS   rS     sC     '! HAA	/	/ H6QS]^^677r!   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r  r%   r  r   rJ  r  r  r  r   r  r   )r   s   "r"   r   r     s2     7 73 7k 7=P 7"87Dj7r!   c                   \        R 4      pRp. p\        4       pVP                  4       '       * pV F  p	V	P                  4       P	                  V4      '       d   Rp\        WIW#4      p	MPRV	9   d!   \        RV  RV	P                  4        R24      h\        WIV4      w  rVP                  V
4       V
'       d   RpVP                  V	4       K  	  WgV3# )rO  #mesondefineFz#cmakedefineFormat error in : saw "z" when format set to "meson")r]   rk  keyslstripr!  r  r   r   rR  updater  )r  r  rJ  r  rE  search_tokenr0  rh  confdata_uselessrG  missings   &&&&       r"   r  r    s     w'E!LF$'E $==?*;;=##L11$"5ED%$'7uGDJJL>Qm%noo0hGMD$$W-#( d  &666r!   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r  r%   r  r   rJ  r  rn  r   r  r  r   r  r   )r   s   "r"   r   r     s:     7 73 7k 7=P 7[_ 7"87Dj7r!   c           
        R pV'       d   RpRp. p\        4       pVP                  4       '       * p	V F  p
V
P                  4       p\        V4      ^8  dJ   V^ ,          R8X  d<   VR,          P                  4       P	                  V4      '       d   Rp	\        WW44      p
MSRV
9   d$   \        RV  RV
P                  4        R	V R
24      h\        WV4      w  rVP                  V4       V'       d   Rp	VP                  V
4       K  	  WxV	3# )rQ  rP  cmakedefine#rl  Fr  r  r  z" when format set to "r.  )rk  r  r  r  r!  r  r   r   rS  r  r  )r  r  rJ  rn  r  rH  r  r0  rh  r  rG  stripped_liner  s   &&&&&        r"   r  r    s    3:O" LF$'E $==?*}"}Q'73'>=QSCTC[C[C]ChChiuCvCv$"47GD%$'7uGDJJL>Qghwgxxy%z{{0IMD$$W-#( d  &666r!   c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r   r  r%   dstrJ  r  rH  rI  encodingr  r  r   zT.Tuple[T.Set[str], bool]r   )r   s   "r"   r   r     sB     / /c / //B /"E//6L/Xq/r!   c                     \        WR R7      ;_uu_ 4       pVP                  4       pRRR4       \	        T XY#T4      w  rpTR,           p \        TRTR R7      ;_uu_ 4       pTP                  T	4       RRR4       \        P                  ! Y4       \        Y4       Y3#   + '       g   i     L; i  \         d   p\        RT  RT: 24      hRp?ii ; i  + '       g   i     Ll; i  \         d   p\        RT RT: 24      hRp?ii ; i)r   )r  newlineNzCould not read input file r3  ~r  zCould not write output file )	open	readlinesr  r   rS   
writelinesrh  copymoder   )r  r  rJ  rH  r  r  fr  r   r0  rh  r  dst_tmps   &&&&&&       r"   rR   rR     s    H#"55;;=D 6
 5@T8fp4q1V 0CiGJ'32>>!LL  ? OOC!&.. 65 H9#bFGGH ?> J;C51%HIIJsi   B3 B B3 C+ "C4C+  B0	+B3 0B3 3C>CCC(	#C+ (C+ +D6DDzc/*
 * Autogenerated by the Meson build system.
 * Do not edit, your changes will be lost.
 */

{}

zV; Autogenerated by the Meson build system.
; Do not edit, your changes will be lost.

c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   ofilezT.TextIOcdatar   output_formatzLiteral['c', 'nasm']
macro_namer   r   r   r   )r   s   "r"   r   r      s7          (   +  "6    /   48  r!   c           	        VR 8X  dI   V'       d&   \         P                  RP                  V4      4      pM\         P                  R4      pRpR pM\        pRpR pV P                  V4       \	        VP                  4       4       F  pVP                  V4      w  rV	'       d   V P                  V! V	4      4       \        V\        4      '       d;   V'       d   V P                  V RV R24       Kl  V P                  V R	V R24       K  \        V\        \        34      '       d   V P                  V RV R
V R24       K  \        RV,           4      h	  VR 8X  d   V'       d   V P                  R4       R# R# R# )r#  z#ifndef {0}
#define {0}z#pragma oncer  c                    R V  R2# )z/* z */
r   r  s   &r"   <lambda> _dump_c_header.<locals>.<lambda>+  s    Se#4r!   %c                \    R RP                  V P                  4       4      ,           R,           # )z; z
; rx  )rF  
splitlinesr  s   &r"   r  r  /  s    4&++doo6G*H#H4#Or!   zdefine z

zundef rC  z/Unknown data type in configuration file entry: z#endif
N)CONF_C_PRELUDEr   CONF_NASM_PRELUDEwritesortedr  r?  r   r   r  r%   r   )
r  r  r  r  preludeprefixformat_desckr  r  s
   &&&&      r"   _dump_c_headerr     s<   
 $++,F,M,Mj,YZG$++N;G4#O	KKEJJL!IIaL	KKD)*avhgaS56vhfQCt45C:&&KK6('!AaS56 !RUV!VWW " 
J !+r!   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   	ofilenamer%   r  r   r  zLiteral['c', 'nasm', 'json']r  r   r   r   r   )r   s   "r"   r   r   C  s3     3 3 3,= 3$@3!03593r!   c           	     ^   V R ,           p\        VRRR7      ;_uu_ 4       pVR8X  dN   VP                  P                  4        UUu/ uF  w  rgWg^ ,          bK  	  ppp\        P                  ! WRR7       M\        WQW#4       RRR4       \        W4       R# u uppi   + '       g   i     L#; i)r  r  utf-8r  jsonT)	sort_keysN)r  valuesitemsr  dumpr  r   )	r  r  r  r  ofilename_tmpr  r  r  r  s	   &&&&     r"   r7   r7   C  s     OM	mS7	3	3uF"(-(:(:(<=(<AtG(<D=IIdT25C 
4 2 > 
4	3s   %BB
(BBB,	c               $    V ^8  d   QhRRRRRR/# )r   r  r%   r  r   r   r   )r   s   "r"   r   r   Q  s!      c C D r!   c           	        R p \        V R4      ;_uu_ 4       p\        VR4      ;_uu_ 4       pVP                  4       VP                  4       8X  d   RpRRR4       RRR4       T'       d   \        P                  ! Y4       R# \        P
                  ! T4       R#   + '       g   i     LP; i  + '       g   i     L[; i  \         d     Lki ; i)TrbFN)r  readFileNotFoundErrorr   r   unlink)r  r  	differentf1f2s   &&   r"   r   r   Q  s     I#t__D$$7$72wwyBGGI%!	 %8_
 


7 
		' %8$7__  sE   C B.&B	B.C B+&B..B>	9C >C CCc               $    V ^8  d   QhRRRRRR/# )r   itemr   flattenr   r   zT.List[T.Any]r   )r   s   "r"   r   r   a  s!      % $ - r!   c                    \        V \        4      '       g   V .# . pV  FH  pV'       d-   \        V\        4      '       d   V\        VRR7      ,          pK7  VP                  V4       KJ  	  V# )z
Returns a list with all args embedded in a list if they are not a list.
This function preserves order.
@flatten: Convert lists of lists to a flat list
Tr  )r   listrx   r  )r  r  r0  is   &&  r"   rx   rx   a  sZ     dD!!vFz!T**ga..FMM!	 
 Mr!   c               $    V ^8  d   QhRRRRRR/# )r   r  r  shlex_split_argsr   r   r   r   )r   s   "r"   r   r   q  s!      v  + r!   c                   \        V \        4      '       d|   V P                  R 4      '       d    \        P                  ! V 4      pMtV R8X  d   . pMjV'       d   \        V 4      pMVV P                  R4       Uu. uF  q3P                  4       NK  	  ppM(\        V \        4      '       d   T pM\        RV  R24      h\        V\        4      '       g   Q hV#   \
         d    \        RT  24      hi ; iu upi )r)  zmalformed value r   ,r.  z)" should be a string array, but it is not)r   r%   r!  astliteral_evalr  r   r   rS  r   r  )r  r  newvaluer  s   &&  r"   ry   ry   q  s    %C  A++E2 b[H%e,/4{{3/?@/?!GGI/?@	E4	 	 q'PQRRh%%%%O  A$'7w%?@@A As   C 7C1C.c               (    V ^8  d   QhRRRRRRRR/# )	r   dict_objectzT.Dict[_T, _U]keyr*   popr   r   z
T.List[_U]r   )r   s   "r"   r   r     s)     3 3 3b 3t 3PZ 3r!   c                |    V P                   pV'       d   V P                  p\        V! V4      ;'       g    . RR7      # )z@
Extracts all values from given dict_object and listifies them.
Tr  )r?  r  rx   )r  r  r  fetchs   &&& r"   rV   rV     s2     #.//E
5:##T22r!   c               $    V ^8  d   QhRRRRRR/# )r   r  z'T.Union[_T, T.Sequence[_T]]'typesz*'T.Union[T.Type[_T], T.Tuple[T.Type[_T]]]'r   
T.List[_T]r   )r   s   "r"   r   r     s$      4 BGQr!   c           	     T   \        W4      '       d   \        P                  ! RV .4      p \        V \        4      '       g%   \	        RP                  V\        V 4      4      4      hV  F>  pVf   K	  \        W!4      '       d   K  \	        RP                  V\        V4      4      4      h	  V # )z]
Ensure that type(@item) is one of @types or a
list of items all of which are of type @types
r   z,Item must be a list or one of {!r}, not {!r}z'List item must be one of {!r}, not {!r})r   r  r  r  r   r   type)r  r  r  s   && r"   r   r     s     $vvlTF+dD!!KRRSXZ^_cZdeff=A!5!5 !J!Q!QRWY]^_Y`!abb  Kr!   c                    V ^8  d   QhRRRR/# )r   r  z!T.Union[T.Any, T.Sequence[T.Any]]r   r   r   )r   s   "r"   r   r     s     # #9 #k #r!   c                "    \        V \        4      # r   )r   r%   r  s   &r"   r   r     s    c""r!   c                    V ^8  d   QhRRRR/# )r   r  r%   r   r   )r   s   "r"   r   r     s     . .s .s .r!   c                2    \         P                  ! R RV 4      # )z[^a-zA-Z0-9]r   )r)  rl  r  s   &r"   r   r     s    66/3--r!   c                    V ^8  d   QhRRRR/# )r   r@  rA  r   r  r   )r   s   "r"   r   r     s      ? /F r!   c                   . pV  F|  pVP                  R 4      '       g   VP                  V4       K-  VR,          p \        VRR7      ;_uu_ 4       pVP                  4       P	                  4       pRRR4       VX,          pK~  	  V#   + '       g   i     L; i  \
         d;   p\        P                  ! RTR4       \        P                  ! T4        Rp? R# Rp?ii ; i)r[  rl  r  r  Nz!Expanding command line arguments:z	not found)	r!  r  r  r  rS  r  r
   error	exception)r@  expended_argsr,  	args_filer  extended_argsr   s   &      r"   rU   rU     s    !#M~~c""  %G		i'22a ! 0 3]*M   32  	JJ:YTNN1	s/   BB0BBBC%.CCc               $    V ^8  d   QhRRRRRR/# )r   predzT.Callable[[_T], object]iterableT.Iterable[_T]r   z'T.Tuple[T.Iterator[_T], T.Iterator[_T]]r   )r   s   "r"   r   r     s(     	F 	F, 	F 	FKr 	Fr!   c                N   a  \        V4      w  r#V 3R lV 4       V 3R lV 4       3# )zUse a predicate to partition entries into false entries and true
entries.

>>> x, y = partition(is_odd, range(10))
>>> (list(x), list(y))
([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])
c              3  H   <"   T F  pS! V4      '       d   K  Vx  K  	  R # 5ir   r   .0r  r  s   & r"   	<genexpr>partition.<locals>.<genexpr>  s     )r!aAAr   "
"c              3  H   <"   T F  pS! V4      '       g   K  Vx  K  	  R # 5ir   r   r  s   & r"   r  r    s     +Er!T!WAArr  r   )r  r  t1t2s   f&  r"   rz   rz     s&     ]FB)r)+Er+EEEr!   c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# r   r@  r   r  r   stdinz(T.Union[None, T.TextIO, T.BinaryIO, int]r   r   r   r   r   *T.Tuple['subprocess.Popen[str]', str, str]r   )r   s   "r"   r   r     sJ      [  >? @ 	 $N	r!   c                "   ^ RI pVP                  4       pVe   \        P                  p \        P
                  P                  '       d   VP                  4       R8w  d   \        V 3RVRVRVRV/VB w  rp
M7\        P                  ! V 3RRR	VR
RRVRVRV/VB pVP                  V4      w  r \        P                   ! 4        WV
3#   \         d=   pTP                  \        P                  8X  d   \        RT ^ ,          : R24      hh Rp?ii ; i)r   Nr   r  r  r   r   universal_newlinesTr  	close_fdsFzFailed running ze, binary or interpreter not executable.
Possibly wrong architecture or the executable bit is not set.)r   r   r  r  r  r   r  r   Popen_safe_legacyr  r  rS  errnoENOEXECr   r
   setup_console)r@  r  r  r   r   r   r   r  r   r   r   oserrs   &&&&&,      r"   r}   r}     s5   
 **,H zz"""hnn&6'&A'oEoovo^dohnoGA!   V$ V V]b V',V5;VDJVNTVA=='DAq 	7N  ;;%--' ?47+ >a "a b b	s#   C 
,C 76C D7D		Dc               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# r  r   )r   s   "r"   r   r     sJ      K  EF G !&	 +U	r!   c                   \         P                  ! V 3R RRRRVRVRV/VB pRpVe   VP                  R4      pVP                  V4      w  rVe{   \        P
                  P                  e=   VP                  \        P
                  P                  RR	7      P                  R
R4      pM"VP                  RR7      P                  R
R4      pV	e   \        P                  e]   \        P                  P                  '       d=   V	P                  \        P                  P                  RR	7      P                  R
R4      p	M"V	P                  RR7      P                  R
R4      p	WhV	3# )r"  Fr#  r  r   r   Nr  r   )r  errorsz
rx  )r+  )
r  r  r   r  r  r   r  r   r   r   )
r@  r  r  r   r   r   r   input_r   r   s
   &&&&&,    r"   r$  r$    s@   
 	 	N% 	N5 	N$	N-3	N<B	NFL	NA $Fg&== DA}::*#**"5"5iHPPQWY]^A	*2264@A}::!cjj&9&9&9#**"5"5iHPPQWY]^A	*2264@A7Nr!   c               (    V ^8  d   QhRRRRRRRR/# )	r   r@  r   r   r%   r   r   r   r   r   )r   s   "r"   r   r     s)      K c  R| r!   c                L    \        V 3/ VB w  r4pTP
                  T'       d   TP                  4       MRT'       d   TP                  4       MRrp\        P                  ! R4       \        P                  ! T R\	        T 4       RT 24       T'       d   \        P                  ! RT R24       T	'       d   \        P                  ! RT	 R24       Y4T3#   \         dD   p\        P                  ! R4       \        P                  ! T R\	        T 4       RT 24       h Rp?ii ; i)z[
Wrapper around Popen_safe that assumes standard piped o/e and logs this to the meson log.
z-----------z: `z` -> Nzstdout:
z
-----------zstderr:
)r}   r  r
   r>  rv   r   r   )
r@  r   r   r   r   r   excprcouterrs
   &&,       r"   r~   r~     s    T,V,a <<aT1779tSBJJ}JJ#c)D/*%t45


Yse=12


Yse=127N  

=!

cU#io.eD6:;s   C D# >DD#c               $    V ^8  d   QhRRRRRR/# )r   	regexiterrA  initerz*T.Iterable[str | programs.ExternalProgram]r   r   r   )r   s   "r"   r   r     s#       :d ix r!   c                    V  FV  pV FM  p\        V\        4      '       g   K  \        P                  ! W#4      pV'       g   K;  VP	                  4       u u # 	  KX  	  R# )z
Takes each regular expression in @regexiter and tries to search for it in
every item in @initer. If there is a match, returns that match.
Else returns False.
N)r   r%   r)  r  r   )r4  r5  rE  iir  s   &&   r"   ru   ru     sL     Bb#&&IIe(Eu{{}$   r!   c               $    V ^8  d   QhRRRRRR/# )r   command&T.List[str | programs.ExternalProgram]r  &T.Dict[str, T.Union[str, T.List[str]]]r   r   r   )r   s   "r"   r   r   #  s1     %X %X-S %X  ^D %X  IM %Xr!   c           
        . ROpRR.pRV9  d%   \        W 4      pV'       d   \        RV: R24      hM\        VR,          4      ^8  d,   \        VR,          V 4      pV'       d   \        RV: R24      hV  F  p\        V\        4      '       g   K  \
        P                  ! V^ ,          V4      pV'       g   KC  VP                  4       V9  g   KZ  Rp\        VP                  VP                  4       \        VR,          4      4      4      h	  R	V9  d&   \        W04      pV'       d   \        RV: R
24      hR# V  F  p\        V\        4      '       g   K  \
        P                  ! V^ ,          V4      pV'       g   KC  VP                  4       V9  g   KZ  Rp\        VP                  VP                  4       \        VR	,          4      4      4      h	  R# )@INPUT([0-9]+)?@z@OUTPUT([0-9]+)?@@OUTDIR@@INPUT@zCommand cannot have z%, since no input files were specifiedrl  z' when there is more than one input filez9Command cannot have {!r} since there are only {!r} inputs@OUTPUT@z since there are no outputsz:Command cannot have {!r} since there are only {!r} outputsN)r=  @PLAINNAME@
@BASENAME@)	ru   r   r  r   r%   r)  r  r   r   )r9  r  inregexoutregexr  r(  match2r   s   &&      r"   _substitute_values_check_errorsrF  #  s   LG0*=H!'3 #7y@e!fgg  vi !A%%gbk7;E$';E9 E@ &@ A A DdC((YYwqz40Fv&,,.6O$QXXfllnc&BS>T%UVV  !(4 #7y@[!\]]  DdC((YYx{D1Fv&,,.6P$QXXfllnc&BT>U%VWW r!   c               $    V ^8  d   QhRRRRRR/# )r   r9  r:  r  r;  r   r   )r   s   "r"   r   r   K  s-     D DE DOu D  {a Dr!   c                  a R V3R llp\        V S4       . pS Uu. uF!  qDR
9  g   K  \        P                  ! V4      NK#  	  ppV'       d&   \        P                  ! RP	                  V4      4      MRpV  EF[  pRp\        V\        4      '       g   VP                  V4       EMRV9   d^   SR,          p	VR8X  d
   W9,          pM\        V	4      ^8X  d*   VP                  VP                  RV	^ ,          4      4       M\        R4      hRV9   d^   SR,          p
VR8X  d
   W:,          pM\        V
4      ^8X  d*   VP                  VP                  RV
^ ,          4      4       MW\        R4      hVS9   d*   SV,          p\        V\        4      '       g   Q R	4       hTpMV'       d   VP                  W'4      pMTpVf   EKJ  VP                  V4       EK^  	  V# u upi )a  
Substitute the template strings in the @values dict into the list of
strings @command and return a new list. For a full list of the templates,
see get_filenames_templates_dict()

If multiple inputs/outputs are given in the @values dictionary, we
substitute @INPUT@ and @OUTPUT@ only if they are the entire string, not
just a part of it, and in that case we substitute *all* of them.

The typing of this function is difficult, as only @OUTPUT@ and @INPUT@ can
be lists, everything else is a string. However, TypeDict cannot represent
this, as you can have optional keys, but not extra keys. We end up just
having to us asserts to convince type checkers that this is okay.

https://github.com/python/mypy/issues/4617
c                    V ^8  d   QhRRRR/# )r   r   rW  r   r%   r   )r   s   "r"   r   'substitute_values.<locals>.__annotate__]  s      < C r!   c                r   < SV P                  ^ 4      ,          p\        V\        4      '       g   Q R4       hV# )r   for mypy)r   r   r%   )r   r  r  s   & r"   r   "substitute_values.<locals>.replace]  s2    1771:!S!!-:-!r!   r?  r@  |NzFCommand has '@INPUT@' as part of a string and more than one input filezHCommand has '@OUTPUT@' as part of a string and more than one output filerL  )r?  r@  )rF  r)  escaper*  rF  r   r%   r  r  r   r   rl  )r9  r  r   outcmdr  rx_keysvalue_rxvvmoreinputsoutputsr   s   &f          r"   r   r   K  s   $  $GV4 68F)/V#>U3U~ryy~GV07rzz#((7+,TH $"c""MM""_I&FY V!bjjF1I>?$ &K L L2Z(GZ!W"bjjWQZ@A$ &L M M
 6\r
Aa%%1z1%D<<,DDMM$I L MQ Ws
   GGc               $    V ^8  d   QhRRRRRR/# )r   rU  r   rV  r   r;  r   )r   s   "r"   r   r     s"     1 1 1{ 1Ou 1r!   c                   / pV '       d   WR&   \        V 4       Fa  w  r4WBRV R2&   \        P                  P                  V4      pWRRV R2&   \        P                  P	                  V4      ^ ,          VRV R2&   Kc  	  \        V 4      ^8X  dU   \        P                  P                  V ^ ,          4      ;VR&   p\        P                  P	                  V4      ^ ,          VR&   V'       d]   WR&   \        V4       F  w  r4WBR	V R2&   K  	  \        P                  P                  V^ ,          4      VR
&   VR
,          R8X  d   RVR
&   V# )aZ  
Create a dictionary with template strings as keys and values as values for
the following templates:

@INPUT@  - the full path to one or more input files, from @inputs
@OUTPUT@ - the full path to one or more output files, from @outputs
@OUTDIR@ - the full path to the directory containing the output files

If there is only one input file, the following keys are also created:

@PLAINNAME@ - the filename of the input file
@BASENAME@ - the filename of the input file with the extension removed

If there is more than one input file, the following keys are also created:

@INPUT0@, @INPUT1@, ... one for each input file
@PLAINNAME0@, @PLAINNAME1@, ... one for each input file
@BASENAME0@, @BASENAME1@, ... one for each input file

If there is more than one output file, the following keys are also created:

@OUTPUT0@, @OUTPUT1@, ... one for each output file
r?  z@INPUTr[  z
@PLAINNAMEz	@BASENAMErA  rB  r@  z@OUTPUTr>  r   r  )	enumerater   r   basenamerm  r  dirname)rU  rV  r  r7  rS  plains   &&    r"   rZ   rZ     s4   0 68F"y!&)HR%'VB4q>"GG$$R(E).Zt1%&(*(8(8(?(BFYrd!$% * v;!,.GG,<,<VAY,GGF=!E#%77#3#3E#:1#=F< $z!'*HR&(WRD?# +  WW__WQZ8z*#!$F:Mr!   c                    V ^8  d   QhRRRR/# )r   topdirrq  r   r   r   )r   s   "r"   r   r     s     W W 2 Wt Wr!   c                   \         P                  ! V 4       EF;  w  rp\         P                  ! V\         P                  ! V4      P                  \        P
                  ,          \        P                  ,          4       V F  p\         P                  P                  W4      p\         P                  P                  V4      '       d   KI  \         P                  P                  V4      '       g   Kp  \         P                  ! V\         P                  ! V4      P                  \        P
                  ,          \        P                  ,          4       K  	  EK>  	  R # r   )r   walkchmodr  st_modeS_IWRITES_IREADr   rF  r  rE  )r^  dr   filesr0  fpaths   &     r"   _make_tree_writablerh    s     wwve
BGGAJ&&6EFEGGLL*E77>>%((RWW^^E-B-B 6 6 F UV  'r!   c                    V ^8  d   QhRRRR/# )r   r  rq  r   r   r   )r   s   "r"   r   r     s      / D r!   c                h   . ROpRpV F1  p V'       g   \        V 4       Rp \        P
                  ! T 4        R# 	  \        P
                  ! V 4       R#   \         d    \        P                  ! T4        Kq  i ; i  \         d      R# \         d    \        P                  ! T4        K  i ; i)皙?FTNrk  rk  皙?rm  rm        ?rn  rk  rk  rk  rk  r   )rh  PermissionErrortimesleeprh  rmtreer  rS  )r  delayswritablere  s   &   r"   r   r     s    
 @FH	#A&	MM! " MM!  	JJqM	 ! 	 	JJqM	s.   AA>!A;:A;>B1B1B10B1c                    V ^8  d   QhRRRR/# )r   rg  rq  r   r   r   )r   s   "r"   r   r     s      . 4 r!   c                   \         P                  P                  V 4      '       d`   \         P                  ! V \         P                  ! V 4      P
                  \        P                  ,          \        P                  ,          4       . ROpV F  p \         P                  ! V 4        R# 	  \         P                  ! V 4       R#   \         d      R# \         d    \        P                  ! T4        Ki  i ; i)z1Like windows_proof_rmtree, but for a single file.Nrl  )r   r   rE  ra  r  rb  rc  rd  r  r  rS  rp  rq  )rg  rs  re  s   &  r"   r   r     s    	ww~~e
..>MN?F	IIe  IIe	 ! 	 	JJqM	s   CC5C5C54C5c                  D   a  ] tR tRtRtR V 3R lltR V 3R lltRtV ;t# )r?   i  zL
Like TemporaryDirectory, but cleans things up using
windows_proof_rmtree()
c               (    V ^8  d   QhRRRRRRRR/# )r   excr   r  tbr   r   r   )r   s   "r"   r   'TemporaryDirectoryWinProof.__annotate__  s(     , ,E ,% ,U ,t ,r!   c                	x   <  \         SV `  WV4       R #   \         d    \        T P                  4        R # i ; ir   )r   __exit__rS  r   r\  )r   ry  r  rz  r   s   &&&&r"   r}  #TemporaryDirectoryWinProof.__exit__  s2    	,GS, 	, +	,s     99c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r"   r   r{    s     , , ,r!   c                	t   <  \         SV `  4        R #   \         d    \        T P                  4        R # i ; ir   )r   cleanuprS  r   r\  )r   r   s   &r"   r  "TemporaryDirectoryWinProof.cleanup  s-    	,GO 	, +	,s     77r   )	r   r   r   r   r   r}  r  r    r   r   s   @r"   r?   r?     s    
, ,, ,r!   c               (    V ^8  d   QhRRRRRRRR/# )r   
spdir_namer%   current_dirr0  z$T.Optional[T.Dict[str, T.List[str]]]r   zT.Dict[str, T.List[str]]r   )r   s   "r"   r   r     s*      3 S COgr!   c                   Vf   / p\         P                  P                  W4      p\         P                  P                  V4      '       g   V# \	        \         P                  P                  VR4      4       EF	  p\         P                  P                  V4      pVR8X  d   K,  Rp\         P                  P                  V4      '       d#   \        V4      ;'       g    Rp \        WV4       MeVP                  R4      '       dM   \         P                  P                  V4      '       d(   \         P                  P                  V4      ^ ,          pMRpV'       g   K  WR9   d   W%,          P                  V4       EK  V.W%&   EK  	  V# )N*packagecacheTsubprojectsz.wrapF)r   r   rF  existsr   rZ  r  r\   rO   r   rE  rm  r  )r  r  r0  spdirr  rZ  append_thiss   &&&    r"   rO   rO     s   ~GGLL1E77>>%  bggll5#./77##E*N"77==+E2CCmJz&9^^G$$)>)>ww''1!4HK;! ''.$)7 # 0$ Mr!   c               $    V ^8  d   QhRRRRRR/# )r   substrr%   strlistr   r   r   r   )r   s   "r"   r   r   +  s!       { t r!   c                *    V F  pW9   g   K   R # 	  R# )TFr   )r  r  r  s   && r"   r   r   +  s    ;  r!   c                    V ^8  d   QhRRRR/# )r   r  r  r   r   r   )r   s   "r"   r   r   2  s     " "> "j "r!   c                >    \        \        P                  V 4      4      # r   )r  dictfromkeys)r  s   &r"   r   r   2  s    a !!r!   c                      ] tR tRtRtRR R l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 R ltR R R lltR R R lltR R ltR R ltR R ltRtR# )!r8   i6  zMA set that preserves the order in which items are added, by first
insertion.
Nc                   V ^8  d   QhRR/# )r   r  zT.Optional[T.Iterable[_T]]r   )r   s   "r"   r   OrderedSet.__annotate__:  s     " "!; "r!   c                	p    \         P                  ! 4       V n        V'       d   V P                  V4       R # R # r   )r}  OrderedDict_OrderedSet__containerr  )r   r  s   &&r"   r   OrderedSet.__init__:  s'    4?4K4K4MKK! r!   c                    V ^8  d   QhRRRR/# )r   r  r  r   r   r   )r   s   "r"   r   r  ?  s     ) )& )T )r!   c                	    WP                   9   # r   r  r   r  s   &&r"   __contains__OrderedSet.__contains__?  s    ((((r!   c                   V ^8  d   QhRR/# r   r   zT.Iterator[_T]r   )r   s   "r"   r   r  B  s     - -. -r!   c                	H    \        V P                  P                  4       4      # r   )iterr  r  r   s   &r"   __iter__OrderedSet.__iter__B  s    D$$))+,,r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r  E  s     % % %r!   c                	,    \        V P                  4      # r   )r  r  r   s   &r"   __len__OrderedSet.__len__E  s    4##$$r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r  H  s      # r!   c                	    V P                   '       d@   R P                  RP                  R V P                   P                  4        4       4      4      # R# )zOrderedSet([{}])z, c              3  8   "   T F  p\        V4      x  K  	  R # 5ir   )repr)r  r   s   & r"   r  &OrderedSet.__repr__.<locals>.<genexpr>L  s     C+Ba$q''+Bs   zOrderedSet())r  r   rF  r  r   s   &r"   r	  OrderedSet.__repr__H  sG    %,,		C4+;+;+@+@+BCCE Er!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r  O  s     1 1n 1r!   c                	H    \        V P                  P                  4       4      # r   )reversedr  r  r   s   &r"   __reversed__OrderedSet.__reversed__O  s    ((--/00r!   c                    V ^8  d   QhRRRR/# r   r  r*   r   r   r   )r   s   "r"   r   r  R  s     ' ' ' 'r!   c                	$    R V P                   V&   R # r   r  r  s   &&r"   rd  OrderedSet.addR  s    "&r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  U  s     ( (R (D (r!   c                	D    WP                   9   d   V P                   V R # R # r   r  r  s   &&r"   discardOrderedSet.discardU  s!    $$$  ' %r!   c               $    V ^8  d   QhRRRRRR/# )r   r  r*   lastr   r   r   r   )r   s   "r"   r   r  Y  s!     2 2 24 24 2r!   c                	<    V P                   P                  W4       R # r   )r  move_to_end)r   r  r  s   &&&r"   r  OrderedSet.move_to_endY  s    $$U1r!   c                    V ^8  d   QhRRRR/# )r   r  r   r   r*   r   )r   s   "r"   r   r  \  s        r!   c                	@    V P                   P                  V4      w  r#V# r   )r  popitem)r   r  r  r   s   &&  r"   r  OrderedSet.pop\  s    ""**40r!   c                    V ^8  d   QhRRRR/# r   r  r  r   r   r   )r   s   "r"   r   r  `  s     * *~ *$ *r!   c                	6    V F  pR V P                   V&   K  	  R # r   r  r   r  r  s   && r"   r  OrderedSet.update`  s    D%)DT" r!   c                    V ^8  d   QhRRRR/# )r   set_r  r   z'OrderedSet[_T]'r   )r   s   "r"   r   r  d  s     < <~ <2B <r!   c                	:   a \        V 4      ! V3R  lV  4       4      # )c              3  8   <"   T F  qS9  g   K  Vx  K  	  R # 5ir   r   )r  r   r  s   & r"   r  (OrderedSet.difference.<locals>.<genexpr>e  s     ;Td]!!Ts   
)r  )r   r  s   &fr"   
differenceOrderedSet.differenced  s    Dz;T;;;r!   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r"   r   r  g  s      . T r!   c                	:    V F  pV P                  V4       K  	  R # r   )r  r  s   && r"   difference_updateOrderedSet.difference_updateg  s    DLL r!   )__containerr   rL  )r   r   r   r   r   r   r  r  r  r	  r  rd  r  r  r  r  r  r  r    r   r!   r"   r8   r8   6  sM    "
)-%1'(2*< r!   c               $    V ^8  d   QhRRRRRR/# )r   r   rq  ra  r   r%   r   )r   s   "r"   r   r   k  s#      $ -? C r!   c                     \         P                  P                  W4      #   \        \        3 d    \        T 4      u # i ; ir   )r   r   r   	TypeErrorr  r%   )r   ra  s   &&r"   r   r   k  s8    wwt++z" 4ys   ! A A c               (    V ^8  d   QhRRRRRRRR/# r   r   r   rootresolver   r   r   )r   s   "r"   r   r   t  s(     	 	$ 	d 	T 	d 	r!   c                     V'       d0   V P                  4       P                  VP                  4       4       R# V P                  V4        R#   \         d     R # i ; irg  r  relative_tor  r   r  r  s   &&&r"   r{   r{   t  sR    LLN&&t||~6
  T"   s   A -A A AAc               (    V ^8  d   QhRRRRRRRR/# r  r   )r   s   "r"   r   r     s(      $ d T d r!   c                     V'       d.   V P                  4       P                  VP                  4       4      # V P                  V4      #   \         d    T u # i ; ir   r  r  s   &&&r"   r   r     sL    <<>--dlln==##D)) s   A ,A A AAc                  *    ] tR tRtRt^ t^t^t^tRt	R# )r3   i  zEnumeration for library types.r   N)
r   r   r   r   r   SHAREDSTATICPREFER_SHAREDPREFER_STATICr    r   r!   r"   r3   r3     s    (FFMMr!   c                  f    ] tR tRtRtRR R l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# )ProgressBarFallbacki  a  
    Fallback progress bar implementation when tqdm is not foundclass OptionType(enum.IntEnum):

    """Enum used to specify what kind of argument a thing is."""

    BUILTIN = 0
    BACKEND = 1
    BASE = 2
    COMPILER = 3
    PROJECT = 4

# This is copied from coredata. There is no way to share this, because this
# is used in the OptionKey constructor, and the coredata lists are
# OptionKeys...
_BUILTIN_NAMES = {
    'prefix',
    'bindir',
    'datadir',
    'includedir',
    'infodir',
    'libdir',
    'licensedir',
    'libexecdir',
    'localedir',
    'localstatedir',
    'mandir',
    'sbindir',
    'sharedstatedir',
    'sysconfdir',
    'auto_features',
    'backend',
    'buildtype',
    'debug',
    'default_library',
    'errorlogs',
    'genvslite',
    'install_umask',
    'layout',
    'optimization',
    'prefer_static',
    'stdsplit',
    'strip',
    'unity',
    'unity_size',
    'warning_level',
    'werror',
    'wrap_mode',
    'force_fallback_for',
    'pkg_config_path',
    'cmake_prefix_path',
    'vsenv',
    'os2_emxomf',
}


    Since this class is not an actual iterator, but only provides a minimal
    fallback, it is safe to ignore the 'Iterator does not return self from
    __iter__ method' warning.
    Nc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r  zT.Optional[T.Iterable[str]]totalzT.Optional[int]bar_typer   r  disablezT.Optional[bool]r   )r   s   "r"   r    ProgressBarFallback.__annotate__  s3     + +!< +O +*+9H+*+r!   c                	^   Ve   \        V4      V n        R # W n        ^ V n        ^ V n        Vf   \
        P                  ! 4       '       * MTV n        V P                  '       gL   V P                  '       d   VR8X  d   \        RV P                  4       V'       d   \        V R2RR7       R # R # R # )NdownloadzDownload size:r3  r   r`  )	r  r  r  doneprinted_dotsr
   colorize_consoler  r  )r   r  r  r  r  r  s   &&&&&&r"   r   ProgressBarFallback.__init__  s      NDM
	6=o400227|||zzzh*4&

3bkr*  r!   c                   V ^8  d   QhRR/# )r   r   zT.Iterator[str]r   )r   s   "r"   r   r    s      / r!   c                	    V P                   # r   )r  r   s   &r"   r  ProgressBarFallback.__iter__  s    }}r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r    s     # ## #r!   c                	,    \        V P                  4      # r   )nextr  r   s   &r"   __next__ProgressBarFallback.__next__  s    DMM""r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r    s      4 r!   c                	    V P                   '       g,   \        R RR7       \        P                  P	                  4        V ;P
                  ^,          un        R# )r  r   r  N)r  r  r  r   flushr  r   s   &r"   	print_dotProgressBarFallback.print_dot  s6    |||#2JJQr!   c                    V ^8  d   QhRRRR/# )r   progressr  r   r   r   )r   s   "r"   r   r    s      s t r!   c                	    V ;P                   V,          un         V P                  '       g   V P                  4        R # \        V P                   V P                  ,          ^
,          4      pV P                  V8  d   V P                  4        K#  R # r   )r  r  r  r  r  )r   r  ratios   && r"   r  ProgressBarFallback.update  s_    		X	zzzNNDII

*R/0%'NN (r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r    s      t r!   c                	B    V P                   '       g   \        4        R # R # r   )r  r  r   s   &r"   closeProgressBarFallback.close  s    |||G r!   )r  r  r  r  r  )NNNNN)r   r   r   r   r   r   r  r   r  r  r  r    r   r!   r"   r  r    s+    :v+$# r!   r  )tqdmc                  6   a  ] tR tRtRR/R V 3R llltRtV ;t# )ProgressBarTqdmi 	  r  Nc               (    V ^8  d   QhRRRRRRRR/# )r   r@  r   r  r   r   r   r   r   )r   s   "r"   r   ProgressBarTqdm.__annotate__	  s*     	. 	.% 	.? 	.UZ 	._c 	.r!   c               	   < VR 8X  d   VP                  RRRRRRRRRR	/4       MVP                  RR
RR/4       \        SV `  ! V/ VB  R# )r  unitB
unit_scaleTunit_divisor   leave
bar_formatz<{l_bar}{bar}| {n_fmt}/{total_fmt} {rate_fmt} eta {remaining}Fz1{l_bar}{bar}| {n_fmt}/{total_fmt} eta {remaining}N)r  r   r   )r   r  r@  r   r   s   &$*,r"   r   ProgressBarTqdm.__init__	  sf    :%vs+T-t&+-k	! " w+-`! " Gd-f-r!   r   r   r   s   @r"   r  r   	  s    	.T 	. 	. 	.r!   r  z=T.Union[T.Type[ProgressBarFallback], T.Type[ProgressBarTqdm]]c                  B   a  ] tR tRtRR V 3R llltRR R lltRtV ;t# )	r>   i	  c               (    V ^8  d   QhRRRRRRRR/# )r   option_stringsr   destr%   r  r   r   r   )r   s   "r"   r   RealPathAction.__annotate__	  s/     V V{ V# V V]b Vr!   c                	   < \         P                  P                  \         P                  P                  V4      4      p\        SV `  ! W3R RRV/VB  R# )nargsNr  )r   r   abspathrealpathr   r   )r   r   r!  r  r   r   s   &&&&,r"   r   RealPathAction.__init__	  s@    ''//"''"2"27";<UTU7UfUr!   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   parserzargparse.ArgumentParser	namespacezargparse.Namespacer  z%T.Union[str, T.Sequence[T.Any], None]option_stringr   r   r   r   )r   s   "r"   r   r"  	  s;     Q Q6 QCU Q>QO^QjnQr!   c           	     	    \        V\        4      '       g   Q h\        W P                  \        P
                  P                  \        P
                  P                  V4      4      4       R # r   )r   r%   r  r!  r   r   r%  r&  )r   r)  r*  r  r+  s   &&&&&r"   __call__RealPathAction.__call__	  s?    &#&&&&	99bggoobgg6F6Fv6N&OPr!   r   r  r   )r   r   r   r   r   r-  r    r   r   s   @r"   r>   r>   	  s    V VQ Qr!   c               (    V ^8  d   QhRRRRRRRR/# )r   winecmdr   
wine_pathsworkdirr   r   r%   r   )r   s   "r"   r   r   	  s0     @ @ @ @ /@;>@r!   c                   \        \        V4      4      pRP                  V4      p\        V4      R8:  d   V# ^RIHp V! RV RR7      p\        VP                  4       R4      '       d   V# . pV'       dC   . pV F8  p \        V4      P                  V4      p	VP                  \        V	4      4       K:  	  TpV'       d   \        RR	R
RR7      ;_uu_ 4       p
V
P                  R4       RRR4        \        P                   ! V RRX
P"                  .,           V,           R
\        P$                  R7      pVP'                  R4      pV'       d   VP)                  R4      pM\*        P,                  ! R4        \0        P2                  ! X
P"                  4       RP                  Wa,           4      p\        V4      R8  d   \*        P,                  ! R4       V#   \         d    TP                  T4        EK{  i ; i  + '       g   i     EL; i  \        P.                   d-   p\*        P,                  ! R\        T4       24        Rp?LRp?ii ; i  \0        P2                  ! X
P"                  4       i ; i)a  
WINEPATH size is limited to 1024 bytes which can easily be exceeded when
adding the path to every dll inside build directory. See
https://bugs.winehq.org/show_bug.cgi?id=45810.

To shorten it as much as possible we use path relative to `workdir`
where possible and convert absolute paths to Windows shortpath (e.g.
"/usr/x86_64-w64-mingw32/lib" to "Z:\usr\X86_~FWL\lib").

This limitation reportedly has been fixed with wine >= 6.4
;r  )ExternalProgramwineT)silentz>=6.4r  z.batr  F)ro  r  deletezt
            @ECHO OFF
            for %%x in (%*) do (
                echo|set /p=;%~sx
            )
            Nr   z/C)r  r   z(Could not shorten WINEPATH: empty stdoutzCould not shorten WINEPATH: z9WINEPATH exceeds 1024 characters which could cause issues)r  r8   rF  r  r   r6  r   get_versionr   r  r  r%   r  r	   r  r  check_outputr\  r  r   rS  r
   r   CalledProcessErrorr   r  )r1  r2  r3  	wine_pathr6  r7  	rel_paths	abs_pathsr   relbat_filer   r   s   &&&          r"   r^   r^   	  s    j,-J $I
9~ +6748Dt'')733  I!#	A$1g))'2  S*  
FWUSSW_NN   T	%,,WtX]]7S-SV`-`6=jFXFXZF\\#&F#\\#.
GH IIhmm$/0I
9~PQ9  $  ##$ TSS ,, 	BLL7Ax@AA	B IIhmm$s[   =4GG81A,H I H 4I G54G58H		I!"II II "I2c                    V ^8  d   QhRRRR/# )r   funczT.Callable[..., _T]r   r   )r   s   "r"   r   r   a	  s      & +> r!   c                >   a a . o\        S 4      R  V V3R ll4       pV# )c               $    V ^8  d   QhRRRRRR/# )r   r@  r   r   r   r*   r   )r   s   "r"   r   run_once.<locals>.__annotate__e	  s!      u  " r!   c                 \   < S'       d
   S^ ,          # S! V / VB pSP                  V4       V# )r   )r  )r@  r   r  rC  r  s   *, r"   wrapperrun_once.<locals>.wrapperd	  s.    q6MD#F#

3
r!   r   )rC  rH  r  s   f @r"   r   r   a	  s*    C
4[   Nr!   c                    V ^8  d   QhRRRR/# )r   rC  z,T.Callable[..., T.Generator[_T, None, None]]r   zT.Callable[..., T.List[_T]]r   )r   s   "r"   r   r   p	  s      D Id r!   c                6   a  \        S 4      R  V 3R ll4       pV# )c               $    V ^8  d   QhRRRRRR/# )r   r@  r   r   r   r   r   )r   s   "r"   r   #generate_list.<locals>.__annotate__r	  s!     + +u + +* +r!   c                 &   < \        S! V / VB 4      # r   )r  )r@  r   rC  s   *,r"   rH  generate_list.<locals>.wrapperq	  s    D$)&)**r!   rJ  )rC  rH  s   f r"   rX   rX   p	  s     
4[+ + Nr!   c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   filenamer%   object_nameobject_typezT.Type[_PL]suggest_reconfigurer   r   r'   r   )r   s   "r"   r   r   x	  s1      # C k `d ps r!   c                   V R V : R2pV'       d   RMRp \        V R4      ;_uu_ 4       p\        P                  ! V4      pRRR4       \        XT4      '       g   \        YE,           4      h\        TR4      '       d#   \        P                  ! RT4      P                  pM5\        P                  ! R	T4      P                  P                  P                  p^R
IHp	 ^RIHp
Hp T
! Y4      '       d
   T! YT4      hT#   + '       g   i     L; i  \        P                  \        3 d    \        YE,           4      h\        \        \        3 d    \        T R T : R2T,           4      hi ; i)z file z is corrupted.zG Consider reconfiguring the directory with "meson setup --reconfigure".r   r  Nzz references functions or classes that don't exist. This probably means that it was generated with an old version of meson.r&   r$   r   )r&   )major_versions_differMesonVersionMismatchException)r  pickleloadUnpicklingErrorEOFErrorr   r  ModuleNotFoundErrorrT  r   hasattrr  r  r&   r   coredatarW  rX  )rR  rS  rT  rU  load_fail_msg	extra_msgr  objr&   coredata_versionrW  rX  s   &&&&        r"   r|   r|   x	  s8   "m6(^DM]pYvxI	-(D!!Q++a.C " c;'']677 sI&&-s3;;&&-s3??HHPP6OW77+GyQQJ5 "!""H- 8]677*N; -m6( .   "+,- 	--s.   D C=D =D	D D ?E+E+c               $    V ^8  d   QhRRRRRR/# )r   r  r  	predicatezT.Callable[[_T], bool]r   r  r   )r   s   "r"   r   r   	  s"       +A n r!   c                <    V  F  pV! V4      '       g   K  Vu # 	  R# )a$  Find the first entry in an iterable where the given predicate is true

:param iter: The iterable to search
:param predicate: A finding function that takes an element from the iterable
    and returns True if found, otherwise False
:return: The first found element, or None if it is not found
Nr   )r  re  r  s   && r"   rW   rW   	  s!     Q<<H  r!   c                   V ^8  d   QhRR/# r  r   )r   s   "r"   r   r   	  s     = =3 =r!   c                     \        4       '       d   Rp MRp V ^,          p \        \        P                  P	                  RV 4      4      # )zReturn a conservative estimate of the commandline size in bytes
above which a response file should be used.  May be overridden for
debugging by setting environment variable MESON_RSP_THRESHOLD.i    i   MESON_RSP_THRESHOLD)rs   r  r   r   r?  )limits    r"   r[   r[   	  s?    
 ||   QJErzz~~3U;<<r!   c                  >    ] tR tRtRtR R ltR R ltR R ltR	tR
# )rw   i	  a  Descriptor that replaces the function it wraps with the value generated.

This property will only be calculated the first time it's queried, and will
be cached and the cached value used for subsequent calls.

This works by shadowing itself with the calculated value, in the instance.
Due to Python's MRO that means that the calculated value will be found
before this property, speeding up subsequent lookups.
c                    V ^8  d   QhRRRR/# )r   rC  zT.Callable[[T.Any], _T]r   r   r   )r   s   "r"   r   lazy_property.__annotate__	  s      4  r!   c                	     R V n         Wn        R # r   )_lazy_property__name_lazy_property__func)r   rC  s   &&r"   r   lazy_property.__init__	  s    '+r!   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r\  r%   r   r   r   )r   s   "r"   r   rm  	  s!     ' '% 's 't 'r!   c                	V    V P                   f	   W n         R # W P                   8X  g   Q hR # r   )ro  )r   r   r\  s   &&&r"   __set_name__lazy_property.__set_name__	  s!    ;;K;;&&&r!   c               $    V ^8  d   QhRRRRRR/# )r   instancer  r&  zT.Typer   r*   r   )r   s   "r"   r   rm  	  s!       V  r!   c                	T    V P                  V4      p\        WP                  V4       V# r   )rp  r  ro  )r   rw  r&  r  s   &&& r"   __get__lazy_property.__get__	  s#    H%++u-r!   )__func__nameN)	r   r   r   r   r   r   rt  ry  r    r   r!   r"   rw   rw   	  s    ' r!   c                    V ^8  d   QhRRRR/# )r   	directoryr%   r   r   r   )r   s   "r"   r   r   	  s     : :# : :r!   c                    ^RI Hp ^RIHp V! V RR4      p VP	                  4        TP                  4       ;'       g    R#   T d     R# i ; i)a-  Get the name of the subproject directory for a specific project.

If the subproject does not have a meson.build file, it is called in an
invalid directory, it returns None

:param directory: Where to search, defaults to current working directory
:return: the name of the subproject directory or None.
)IntrospectionInterpreter)InvalidArgumentsr   noneNr  )r  r  interpreterbase.exceptionsr  load_root_meson_fileextract_subproject_dir)r~  r  r  intrs   &   r"   r\   r\   	  sV     /=#Ir6:D!!# &&(99M9  s   A AAr  r   )z/\)rO  )r  NrL  )Calledr   r/  )__conditional_annotations__r   
__future__r   pathlibr   argparser  enumr  r  rp  r   r  r  r  r  r   r:  rh  r)  r}  	functoolsr   r   	itertoolsr   tempfiler   r	   typingr  r   rY  r%  r  dataclasses
mesonbuildr
   corer   r   TYPE_CHECKINGtyping_extensionsr   r   _typingr   r  r   cmdliner   r   r   compilers.compilersr   interpreterbase.baseobjectsr   r   r   r   r$   TypeVarUnionr'   r%   r6   r*   r+   __all__r.   r/   r   r   getattr
executabler-   r   r5   r2   ri  r,   r_   r   r   r   r   rc   rA   ABCMetar0   r1   r4  r)   rY   rB   r  r  IntEnumr4   	dataclassGenericr9   r;   Optionalr:   r<   rr   ro   rk   rb   rh   rm   rs   rt   rd   re   rf   rl   rg   rj   ri   rq   ra   rn   rD   r   r[  rP   rC   r*  r  r@   r  r   r   r   r   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rQ   rp   r`   r5  r  r/  r   r   rv   rT   rR  rS  r  r  r]   rS   r  r  rR   r  r  r  r7   r   rx   ry   rV   r   r   r   rU   rz   r  r  r}   r$  r~   ru   rF  r   rZ   rh  r   r   r?   rO   r   r   
MutableSetr8   r   r{   r   r3   r  r  r  r=   ImportErrorActionr>   r^   r   rX   r|   rW   r[   rw   r\   )r  s   @r"   <module>r     s  
 0 "   
  
   
  < < < <  &  ;        0???3/)().8!X !X  ))E);=O)O!P
QCwwvs{#YYt_YYt_m	mm m 	m
 m m m m m m m m m m m  !m" #m$ %m& !'m( )m* +m, !-m. /m0 1m2 3m4 "5m6 7m8 9m: ;m< =m> ?m@ AmB CmD EmF GmH ImJ KmL MmN OmP QmR SmT UmV WmX YmZ [m\ ]m^ _m` amb #cmd emf gmh imj kml 
mmn omp qmr smt umv wmx ymz {m| }m~ m@ AmB CmD EmF GmH ImJ KmL MmN OmP QmR SmT UmV WmX YmZ [m\ ]m^ _m` amb cmd emf gmh imj kml mmn omp qmr smt umv wmx ymz {m| }m~ m@ AmB CmD EmF GmH ImJ KmL MmN )OmP QmR SmT !UmV WmX Ym`	 	 GI C H 
3%  
 nnk2Nnn%N;?8 ?P> P7> 7
 ll5 	 	 9"&8#++ 8X XtS P5> P5fK &!b> ,DLL ,& %u-2  .: %u-+jn + .+> %u-#Jqzz"~6 # .#> %u-9!6qzz"~!FXYXbXbceXfHg 9 .9&010202!D$14120.../ 4 :#J   .0d; **12<7 <7~81

+$GL)X& 2W(  << K

a}B#78??,! !F  28 DDU/nY Y6) )V *8 87 767 7>/ /( 
  F3    *3 3 #.&	F <@AKASASBL//BL// @ CGHRHZHZISIS 0 * %XPDN1hW6 ,!3 ,& 8"3b! 3j	 	 dll f fP"
.$ .  "KQX__ Q@ @F B=*AIIbM 4: :u  eQdKNdes   `! !`32`3