D,biVSrSSKrSSKrSSKr/SQrSrSrSrSSjrSSjr S r Sq S r Sq S rS rS rSqSrSrSrSrSrSrSrSrSrSrSrSrg)zShared OS X support functions.N)compiler_fixupcustomize_config_varscustomize_compilerget_platform_osx) CFLAGSLDFLAGSCPPFLAGS BASECFLAGS BLDSHAREDLDSHAREDCCCXX PY_CFLAGS PY_LDFLAGS PY_CPPFLAGSPY_CORE_CFLAGSPY_CORE_LDFLAGS)r r r r_OSX_SUPPORT_INITIAL_cUc[RSnUR[R5n[RR U5up4[ RS:Xa US:waUS-n[RRU5(dQUHJn[RRXP5n[RRU5(dMHUs $ gU$)zTries to find 'executable' in the directories listed in 'path'. A string listing directories separated by 'os.pathsep'; defaults to os.environ['PATH']. Returns the complete filename or None if not found. NPATHwin32z.exe) osenvironsplitpathseppathsplitextsysplatformisfilejoin) executablerpathsbaseextpfs 3/opt/alt/python313/lib64/python3.13/_osx_support.py_find_executabler)s  |zz&! JJrzz "E  ,ID cVm&( 77>>* % %A Q+Aww~~a    cSSKnSSKnUR5nURU5nU(aU<SUR<S3nOU<SUR<S3n[ R"U5(d-UR5RS 5R5OSsSSS5 $![a& [ S[ R "5<3S5nNf=f!,(df  g=f) z0Output from successful command execution or NonerNz/tmp/_osx_support.zw+bz >'z' 2>&1z 2>/dev/null >''utf-8) contextlibtempfileNamedTemporaryFile ImportErroropenrgetpidclosingnamesystemreaddecodestrip) commandstringcapture_stderrr.r/fpcmds r( _read_outputr>7s "  ( ( *   B 2 %2BGG)toolnames r(_find_build_toolrBMs' X & X GH r*cl[c~Sq[SSS9n[R"SUR 55nUR 5 Ub2SR URS5RS5SS 5q[$[$!UR 5 f=f![a [$f=f) z*Return the OS X system version as a stringNr@z0/System/Library/CoreServices/SystemVersion.plistr-)encodingz=ProductUserVisibleVersion\s*(.*?).) _SYSTEM_VERSIONr2researchr7closer!grouprOSError)r'ms r(_get_system_versionrOVs FGRYZA  II89:C }"%((1771:+;+;C+@!+D"E ?      s B!%B B! B32B3c[c9[5nU(a([SURS555q[$[$![a Sq[$f=f)zm Return the macOS system version as a tuple The return value is safe to use to compare two version numbers. c38# UHn[U5v M g7fNint.0is r( ,_get_system_version_tuple..s-U>Tc!ff>TrE)_SYSTEM_VERSION_TUPLErOtupler ValueError osx_versions r(_get_system_version_tuplerausb$)+  +(--Uk>O>OPS>T-U(U% !   +(*%   +s!A AAcd[U5H!nUR[5(dMX M# g)z-Remove original unmodified values for testingN)list startswith_INITPRE) _config_varsks r(_remove_original_valuesrhs',  << ! ! r*cjURUS5nX2:wa[U-U;a X0[U-'X U'g)z@Save modified and original unmodified value of configuration varr@N)getre)rfcvnewvalueoldvalues r(_save_modified_valuerns;B'H8b= #D&.X]#r*ct[b[$[U<S3S5nSnUR5HwnURS5(aSnMURS5(aSnM7U(dM@UR 5nUS:XaSqMZUR S 5(dMrUSS qMy [cSq[$) zzEnd of search listz /usr/include/z.sdk/usr/includei)_cache_default_sysrootr> splitlinesrdr9endswith)cccontents in_incdirslines r(_default_sysrootrxs)%%">EHJ##% ??+ , ,J __1 2 2J Z::replace SystemError_COMPILER_CONFIG_VARSrnr!)rfrtoldccdatarkcv_splits r(_find_appropriate_compilerrs" rzzd#))+A..B B  g &   "  ( ( / / " 3 :=> J$&!'*B /1 1 {(B!b &:'+113$&%KbR$Y $\sxx7IJ ( r*c[HmnX;dM U[R;dM Xn[R"SSU[R S9n[R"SSU5n[ XU5 Mo U$)z5Remove all universal build arguments from config vars -arch\s+\w+\sr)flagsz-isysroot\s*\S+)_UNIVERSAL_CONFIG_VARSrrrIsubASCIIrn)rfrkrs r(_remove_universal_flagsrse% "BJJ"6 $EFF+S%rxxHEFF-sE:E 5 9 % r*cvS[R;aU$[R"SUS5b[R"SUSR SS5<S35nU(aR[ HHnX ;dM U[R;dM Xn[R"SS U5n[XU5 MJ U$) z-Remove any unsupported archs from config varsr z -arch\s+ppcrzecho 'int main{};' | 'r,rz6' -c -arch ppc -x c -o /dev/null /dev/null 2>/dev/nullz-arch\s+ppc\w*\sr) rrrIrJr6rrrrn)rfstatusrkrs r(_remove_unsupported_archsrs rzz yyh!78D4 ((i8 ;< -%"BJJ*>(,EFF#6UCE(5A - r*cS[R;aa[RSn[HDnX ;dM SX;dMXn[R"SSU5nUS-U-n[ XU5 MF U$)z2Allow override of all archs with ARCHFLAGS env var ARCHFLAGS-archrr)rrrrIrrn)rfarchrkrs r(_override_all_archsr:ss bjj zz+&(B!g1A&A$(/e< d*$\u= ) r*clURSS5n[R"SU5nUbURS5n[R R U5(dR[HHnX@;dM U[R;dM Xn[R"SSU5n[XU5 MJ U$)z+Remove references to any SDKs not availablerr@z-isysroot\s*(\S+)rFz-isysroot\s*\S+(?:\s|$)r) rjrIrJrLrrexistsrrrrn)rfcflagsrNsdkrkrs r(_check_for_unavailable_sdkrKs  h +F &/A}ggajww~~c"",%"BJJ*>(,EFF#=sEJE(5A - r*cvS=p#[U5n[5(dS=p#OSU;n[SU55nU(dS[R;aUR S5nXUS-2 M[5(dB[[[U555H!nXS:XdM XS-S:XdMXUS-2 M# S[R;a+U(d$U[RSR5-nU(a^[U5VVs/sHupgURS 5(dMUPM! nnnU(dOUS nXS :XaXUS-2 OXUS-2 M]S n Un [U5VVs/sHupgURS 5(dMUPM! nnnU(d9Un [U5VVs/sHupgURS 5(dMUPM! nnnUH$nXS :Xa XS-n OX[S 5S n O U (a[RRU 5(d`[ R"R%S U S 35 [ R"R%S5 [ R"R'5 U$![ a GMf=fs snnfs snnfs snnf)aM This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flags if the user has specified one them in extra_compile_flags. This is needed because '-arch ARCH' adds another architecture to the build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysroot' arguments are present. FTrc3T# UHoRS5(dMUv M g7f) -isysrootN)rd)rVargs r(rX!compiler_fixup..ysQ'3^^K5P33's( (rrGrFarm64rrNz2Compiling with an SDK that doesn't seem to exist:  z%Please check your Xcode installation )rcr~anyrrindexr^rreversedrangelenr enumeraterdrisdirrstderrwriteflush) compiler_socc_args stripArch stripSysrootridxrWxindicessysrootargvars r(rrfs %$I{#K % ' '$(' Lw& Q'QQ K2::- #))'2eAg . $ % %E#k"234C7*{q5/AW/LCE *5bjj "BJJ{$;$A$A$CC $-k$:X$:SQall;>Wq$:GXAJE![0eAg . eAg .G F%g.L.SQ!,,{2Kq.GL  )+ 6T 6!,,{:S1 6T ;+ %UmG k#k"2"34G  rww}}W-- MgYVXYZ AB  e   Y MUs6JJ)6J)7J/J/7J5J5 J&%J&cf[5(d [U5 [U5 [U5 U$)aCustomize Python build configuration variables. Called internally from sysconfig with a mutable mapping containing name/value pairs parsed from the configured makefile used to build this interpreter. Returns the mapping updated as needed to reflect the environment in which the interpreter is running; in the case of a Python from a binary installer, the installed environment may be very different from the build environment, i.e. different OS levels, different built tools, different available CPU architectures. This customization is performed whenever distutils.sysconfig.get_config_vars() is first called. It may be used in environments where no compilers are present, i.e. when installing pure Python dists. Customization of compiler paths and detection of unavailable archs is deferred until the first extension module build is requested (in distutils.sysconfig.customize_compiler). Currently called from distutils.sysconfig )r~rrrrfs r(rrs12 & ' ' - %|, r*cH[U5 [U5 [U5 U$)zCustomize compiler path and configuration variables. This customization is performed when the first extension module build is requested in distutils.sysconfig.customize_compiler. )rrrrs r(rrs&|,l+ % r*cFURSS5nU(a SU;aUS- n[5=(d UnU=(d UnU(GaBUnSnUR[S-URSS55nU(a&[SUR S5SS 55nOS nUS :aS UR 5;aS n[R"SU5n[[[U555n[U5S:XaUSnOUS:XaSnOxUS:XaS nOoUS:XaSnOfUS:XaSnO]US:XaSnOTUS:XaSnOK[ SU<35eUS:Xa[RS:aSnOUS;a[RS:aS nOS!nXU4$![ a S nNf=f)"z Filter values for get_platform()MACOSX_DEPLOYMENT_TARGETr@rEz.0macosxrc38# UHn[U5v M g7frRrSrUs r(rX#get_platform_osx..s"N3Ma3q663MrZrrG)r{rzrfatz -arch\s+(\S+)rF)rx86_64 universal2)i386ppc)rrintel)rrrfat3)ppc64rfat64)rrrr universalz#Don't know machine value for archs=rlr)PowerPCPower_Macintoshrr)rjrOrer]rr^r9rIfindallsortedsetrrmaxsize)rfosnamereleasemachinemacver macreleaserarchss r(rrs  8" =F #V# $$&0&J  !zF  !!(8"3$0$4$4Xr$BD  %""N:3C3CC3H13M"NN !J ' !w&,,.'@GJJ/8E&U,-E5zQ(--&/),,!33 --!<<% >CEGG {{e#" 6 6{{e#! W %%a %$  %s$F F F rR)F)__doc__rrIr__all__rrrer)r>rBrHrOr\rarhrnrqrxr~rrrrrrrrrrr[r*r(rs$  A ? #4Q,<!&  "2B<;| %P"6M`&R(P&r*