Wc}c s. ddlZddlZddlmZmZgdZdhZddddd d d d d ddddddd d d dddddddd d ddddd d d d d dddddddd d dZejdkr eded<n eded<eded<dZ e duZ e r!eddddd d!d"d#d$d$d%d%d&d'd"d#d(d(d)d)d&d'd"d#d*zZe ed+sej ej ks d,ejvrd-Zd#ZejdZejdd.ejd/Zejdejd/Zejej Zejej ZejejZejejZdadZ d0Z!d1Z"d2Z#d3Z$ej%r)ej&e$ej%Z'ne$ej(Z'e)ed4dZ*e*re*Z'ejdkr,e$e'+e$ed5reZ'd6ejvre$ejd6Z'dZd7Z,e,Z-e-r#d8D]Z.ee.Z.e.d9e.d:<d;e.d9<dZ/d?Z0da1d@Z2dAZ3dBZ4dCZ5dDZ6d[dFZ7dGZ8dHZ9dIZ:dJZ;dKZdNZ?dOZ@e6ddEfdPZAe6ddEfdQZBdRZCdSZDdTZEdUZFdVZGdWZHdXZIeJdYkr eIdSdS)\N)pardirrealpath) get_config_h_filenameget_config_varget_config_varsget_makefile_filenameget_pathget_path_names get_paths get_platformget_python_versionget_scheme_namesparse_config_hZMACOSX_DEPLOYMENT_TARGETz6{installed_base}/{platlibdir}/python{py_version_short}z0{platbase}/{platlibdir}/python{py_version_short}z1{base}/lib/python{py_version_short}/site-packagesz>{platbase}/{platlibdir}/python{py_version_short}/site-packagesz;{installed_base}/include/python{py_version_short}{abiflags}z?{installed_platbase}/include/python{py_version_short}{abiflags}z {base}/binz{base})stdlib platstdlibpurelibplatlibinclude platincludescriptsdataz{installed_base}/lib/pythonz{base}/lib/pythonz{installed_base}/include/pythonz{installed_base}/Libz {base}/Libz{base}/Lib/site-packagesz{installed_base}/Includez{base}/Scripts) posix_prefix posix_homent posix_venvnt_venvrrvenvrrZ rpm_prefixc stjdd}|r|StjdvrdSd}tjdkr-tjdpd}||dStjdkrItjr=|dd tjtjd d tjd S|dd S)NZPYTHONUSERBASE>ZwasiZvxworksZ emscriptencsbtjtjj|SN)ospath expanduserjoin)args "/usr/lib64/python3.11/sysconfig.pyjoinuserz_getuserbase..joinuser{s!w!!"',"5666rZAPPDATAz~ZPythondarwinZLibraryr.z.local)renvirongetsysplatformname _framework version_info)Zenv_baser$base r# _getuserbaser2rsz~~.55H |88t777 w$(z~~i((/Cxh''' |xHCNHxY+A.FF1A!1DFFHH H 8C " ""r%z({userbase}/Python{py_version_nodot_plat}z6{userbase}/Python{py_version_nodot_plat}/site-packagesz0{userbase}/Python{py_version_nodot_plat}/Includez0{userbase}/Python{py_version_nodot_plat}/Scriptsz {userbase})rrrrrrrz0{userbase}/{platlibdir}/python{py_version_short}z5{userbase}/lib/python{py_version_short}/site-packagesz+{userbase}/include/python{py_version_short}z{userbase}/binz{userbase}/lib/pythonz#{userbase}/lib/python/site-packages)nt_user posix_userosx_framework_userZ real_prefixRPM_BUILD_ROOTz/localr'r(z"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)z\$\(([A-Za-z][A-Za-z0-9_]*)\)z\${([A-Za-z][A-Za-z0-9_]*)}csF t|S#t$r|cYSwxYwr)rOSError)rr"r#_safe_realpathr8s7~~  s   Z_homez\PCbuildZ_PYTHON_PROJECT_BASEcs|!ddl}|dtddD]H}tjtjtd|rdSIdS) Nrz.check_home argument is deprecated and ignored.)Z stacklevel)ZSetupz Setup.localZModulesTF)warningsZwarnZDeprecationWarningrrZisfiler _PROJECT_BASE)Z check_homer:Zfnr1r#is_python_buildr<s~8 F(Q  8 8 8& 7>>"',,}iDD E E 44  5r%)rrrZheadersz{srcdir}/Includez{projectbase}/.rcs |jdi|S#t$rA} |jditjcYd}~S#t$rt |dwxYwd}~wwxYw)N)ZformatZKeyErrorrr)AttributeError)sZ local_varsZvarr1r# _subst_varsr@s5qx%%*%%% 555 518))bj)) ) ) ) ) ) ) 5 5 5 C** 4 55s#  A6AAAAcsv|}|D]\}}||vr |||<dSr)keysitems)Z target_dictZ other_dictZ target_keyskeyvalue r# _extend_dictrFsY""$$K &&((!! U +    C!!r%cs|t/ttadtd<dtd<tS)Nz /usr/localr0platbase)_CONFIG_VARS_LOCALZdictrr=r%r#_config_vars_localrIs<6!/"3"344%16")5:& r%csi}|i}|dkr6tdkr+dtjvrt|t nt|t tjdkr|ddiz}t|D]b\}}tjdvrtj |}tj t||||<c|S)Nrz/usrr6r platlibdirZlib)posixr) _PREFIXrr)rFrIrr-_INSTALL_SCHEMESrBrrnormpathr@)schemevarsZresrCrDrEr# _expand_varsrQ%s C  . .6. *. 133 4 4 4 4T?,,--- w$,|U++&v.4466>> U 7o % .G&&u--E7##Kt$<$<==C Jr%cs~tjdkrddddStjdkrtjrddddSddddS) Nrrr3)prefixZhomeZuserr&rr5r4)rr-r+r,r.r=r%r#_get_preferred_schemesrSFst w$      |x CN $ (   !  r%cs|dkrtjtjkrdSt|}|tvrt |d|d|S)NrRrz returned z., which is not a valid scheme on this platform)r+rR base_prefixrSrM ValueError)rCrO r#get_preferred_schemerWZsx h3:8v # % %c *F %%          Mr%cs tdS)NrR)rWr=r%r#get_default_schemerXfs  ) ))r%TcsR ddl}|i}i}i}t|tjd5}|}dddn #1swxYwY|D]}|ds|dkr0|t|} | r| dd\} } | } | dd} d | vr| || < | tvrtt| } | || <#t$r| dd || <YwxYwt|} d }t!| dkrLt#| D]'}||}|t&|}|t(|}|r1|r/||kr|n|} n|r|n|} | | d} d }| |vrt-|| }nz| |vrd }ns| t.jvrt.j| }nR| |vrG|d r|dd|vrd}n*d | z|vrd }n t-|d | z}ndx|| <}|r|| d}|d| |z|z}d |vr|||<s |tvrtt|}|||<n'#t$r|||<YnwxYw| ||d r|dd|vr|dd}||vr|||< |r|||<| |)t!| dkL|D]1\}} t9| t,r| ||<2|||S)NrZsurrogateescape)encodingZerrorsz#r(r9z$$z$)ZCFLAGSZLDFLAGSZCPPFLAGSTFZPY_)reopenr+ZgetfilesystemencodingZ readlines startswithZstripmatch _variable_rxgroupreplace _ALWAYS_STRrUintZlistrAZlentuplesearch _findvar1_rx _findvar2_rxZstartZstrrr)endZremoverBZ isinstanceupdate)ZfilenamerPZkeep_unresolvedr\ZdoneZnotdonefZlineslinemnvZtmpvZ variablesZrenamed_variablesr-rDZm1Zm2ZfoundZitemZafterZks r#_parse_makefilerpjs III  DG h!:!s1<>>> 7<<**OZ H HHr%c sttjdd}tjddtjdtjd|S)NrrrZZ_PYTHON_SYSCONFIGDATA_NAMEZ_sysconfigdata__)getattrr+rwrr)r*rqr,)Z multiarchr"r#_get_sysconfigdata_namerzsP*L"==I :>>$C#,CCCC CC  r%cs ddl}i}t} t||nC#t$r6}d|}t |dr |d|jd}t|d}~wwxYwt } t|d5}t||dddn #1swxYwYnC#t$r6}d|}t |dr |d|jd}t|d}~wwxYwtr |d|d <t}d tj vr/ddl }||} || _| tj|<d t#d t$} t td r| dz } t'j| dt&j| |dz} t| dd5}|d|d|||dddn #1swxYwYtddd5}|| ddddS#1swxYwYdS)Nrz,invalid Python installation: unable to open strerrorz (z)zutf-8)rYZLDSHAREDZ BLDSHAREDr&z build/lib.rsZgettotalrefcountz-pydebugT)Zexist_okz.pyZwZutf8zB# system configuration generated and used by the sysconfig module zbuild_time_vars = )Zstreamzpybuilddir.txt)pprintrrpr7rur{rr]r rtrzr+r,typesZ ModuleTypebuild_time_varsZmodulesr rvrZmakedirsrr Zwrite) r|rPZmakefileZeZmsgZconfig_hrkr-r}ZmoduleZ pybuilddirZdestfiles r#_generate_posix_varsrsEMMM D$&&H$'''' GXGG 1j ! ! *))AJ)))Ccll  %&&H (W - - - $ 1d # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ GXGG 1j ! ! *))AJ)))Ccll - ,[ # $ $D3<# !!$''!%" DBlnnBB/@BBJs&''!j K T****w||Ju 55H hf - - -& * + + + $%%% d1 %%% &&&&&&&&&&&&&&& f 5 5 5  su( A(1A##A(:B4 B( B4(B,,B4/B,0B44 C4>1C//C4AH  H$'H$=I  I$'I$cs t}t|ttdgd}|j}||dS)Nr~r)rzZ __import__ZglobalsZlocalsr~rj)rPr-Z_tempr~ r# _init_posixr>sQA " $ $D tWYY3D2Eq I IE+OKK     r%csP ddl}td|d<td|d<td|d<|d|d<d |d <t|d <tjttj |d <d |d<dS)NrrZLIBDESTrZ BINLIBDESTrZ INCLUDEPYZ EXT_SUFFIXz.exeZEXEZVERSIONZBINDIRrZZTZPATH) _imprZextension_suffixes_PY_VERSION_SHORT_NO_DOTrrdirnamer8r+ executable)rPrrVr#_init_non_posixrFs5KKKx((DO!,//D ++D002215DDK.DOW__^CN%C%CDDDNDNNNr%cs |i}ddl}|d}|d} |}|sn||}|rP|dd\}} |t vrt t|}n#t $rYnwxYw|||<n/||}|rd||d<|S)Nrz"#define ([A-Z][A-Za-z0-9_]+) (.*) z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/ Tr(r9)r\compileZreadliner_rarcrUrd) ZfprPr\Z define_rxZundef_rxrlrmrnros r#r r Xs   III @AAIzzCDDH%{{}}   OOD ! ! %771a==DAq  #%$$FF    DGGt$$A %#$QWWQZZ #%$ Ks=B B*)B*cs tr>tjdkr&tjt d}nt }nt d}tj|dS)NrZPCrz pyconfig-64.h)rtrr-rr r;r)Zinc_dirr"r#rrzs\(* 7d? $gll=$77GG#GG=)) 7<< 1 11r%csF tttSr)resortedrMr=r%r#r r s6 ()) * **r%cs tSr) _SCHEME_KEYSr=r%r#rrs 4 r%csB |rt||St|Sr)rQrM)rOrPexpandr1r#r r s, (FD)))''r%cs2 t||||Sr)r )r-rOrPrrr#rrs  VT6 * *4 00r%cs tiattd<ttd<ttd<ttd<t td<t td<ttd<ttd<ttd <ttd <tj td < tj td <n#t$r d td <YnwxYw tj dd td<n#t$r d td<YnwxYwtjdkr(t#ttjtd<tjdkrt'tt(rt+td<tdt}tjdkr~t.rLtjt5}tj||}n+tjt5}t9|td<tjdkrddl}|t|r6g}|D]/}| t|0|StS)NrR exec_prefixZ py_versionZpy_version_shortZpy_version_nodotZinstalled_baser0Zinstalled_platbaserGZ projectbaserJrqrZr'Zpy_version_nodot_platrZVPATHrKZuserbasesrcdirr&r)! _CONFIG_VARSrL _EXEC_PREFIX _PY_VERSIONrvr _BASE_PREFIX_BASE_EXEC_PREFIXr;r+rJrqr>Zwinverrbrr-rZ_vpathr_HAS_USER_BASEr2r*rtrrrr r8r, _osx_supportZcustomize_config_varsZappend)r!rr0rZvalsr- r#rrs:= ") X&2 ]#%0 \"+< '(+C '()5 %&& V-> )*#/ Z &3 ]#%(^ \" *'*|L $ $ * * *')L $ $ $ * 747J4F4FsB4O4OL0 1 1 7 7 746L0 1 1 1 7 7d? / L ) ) )$'JL ! 7g  &  % % %  6(4~~L $!!(M:: 7g  B Bw'<'>'>??dF33 )>)@)@AA!/!7!7 X <8 # =      . .| < < <  0 0D KK ((.. / / / / s$7C C#"C#'(DD'&D'csF t|Sr)rr*)r-r"r#rrs#     & &&r%cs tjdkrrdtjvrdSdtjvrdSdtjvrdStjStjdkst td s tjSd tjvrtjd Stj\}}}}}| d d }| d d}| d d}|dddkr|d|S|dddkrQ|ddkrDd}t|ddz d|dd}ddd}|d|tj z }n|dddkrddl m }|S|dddkrGd}ddl}|d }||} | r| }n:|ddd!kr,ddl} | t)|||\}}}|d|d|S)"NrZamd64z win-amd64z(arm)z win-arm32z(arm64)z win-arm64rKunameZ_PYTHON_HOST_PLATFORMz/rZz rxrsiZlinuxZsunosrZ5Zsolarisr[r'r9Z32bitZ64bit)ilZaix) aix_platformiZcygwinz[\d.]+r&)rr-r+versionZlowerr,rur)rrbrdZmaxsizeZ _aix_supportrr\rr_rarZget_platform_osxr) ZosnameZhostZreleaserZmachineZbitnessrr\Zrel_rermrs r#r r s( w$ ck'')) ) ; ck'')) ) ;  ))++ + ;| w'W!5!5|"*,3z122/1hjj+FD'7G\\^^ # #C , ,Fooc3''Gooc3''G bqbzWF%%G%%% w F 1:  2FWQZ1,<>&&|U A: U,,,    $3$$E$$$%%%%&&r%cs dtjvrtdStdt dtdt dtdt dttdtttdtdS)Nz--generate-posix-varsz Platform: "rzPython version: "zCurrent installation scheme: "ZPathsZ Variables) r+Zargvrrr r rXrr rr=r%r#_mainrss4#(* )  ) ) )*** 5022 5 5 5666 B+=+?+? B B BCCC GGG%%% GGG _../////r%Z__main__r)NT)Krr+Zos.pathrrZ__all__rcrMr-r2rrurRrTr)Z_prefix_additionrrZsplitrr/rvrrrNrLrrrZbase_exec_prefixrrZ _USER_BASEr`rgrhr8rrr;ZgetcwdryZ _sys_homer^r<rtrOr@rFrHrIrQrSrWrXrprrzrrrr rr rr rrrr r rrrZ__name__r=r%r#rsy3 $$$$$$$$     KHFS I M   0)&&48   )"---1# 8KHFS I M   )"---1#   }HHV7d?>/ :V/ =V "2.!A ###,,..,ADOOII ILNND' .1<<D' )L m $ $ J#/! BJ&  # k!!!$ '*BBS-=a-@BB!.q1H33CA3FHH '  3: & &w00 w00 G$$S%9::  5 / -  >0GOONN3>$B$BCCMM#N929;;//M GC$ ' '  M7d?% ~m$$// Nl555 6 688%$ RZ'G"N2:.D#EFFM !!  022 "&)"9-y.y 1}555!!!B(   ***}}}}@ I I I===~!!!   $D 2 2 2+++  ('))T ( ( ( (-,..T$1111MMM`'''N+N+N+b   4&&& 0 0 0 z  EGGGGG  r%