Nfh}dZddlZddlZddlmZmZgdZdhZdddd d d d d dddddd d d d dddddd d dddddddddd d ddddddddd ddddd d d d d ddddddddd ddZej d kr ed!ed"<n ed#ed"<d$Z e duZ e r!ed%d%d&d&d'd(d)d*d+d+d,d,d-d.d)d*d/d/d0d0d-d.d)d*d1zZd*Z ej dZejdd2ejd3Zejdejd3ZejejZejejZejejZejejZdadZd4Zd5Z d6Z!d7Z"ej#r)ej$e"ej#Z%ne"ej&Z%e'ed8dZ(e(re(Z%ej d kr,e"e%)e"ed9reZ%d:ej*vre"ej*d:Z%d]d;Z+e+Z,e,r#d<d?e-d=<d@e-dA< [-dBZ.dCZ/dDZ0dEZ1dFZ2dGZ3d^dIZ4dJZ5dKZ6dLZ7dMZ8dNZ9d]dOZ:dPZ;dQZe3ddHfdTZ?dUZ@dVZAdWZBdXZCdYZDdZZEd[ZFeGd\kr eFdSdS)_z-Access to Python's configuration information.N)pardirrealpath) get_config_h_filenameget_config_varget_config_varsget_makefile_filenameget_pathget_path_names get_paths get_platformget_python_versionget_scheme_namesparse_config_hMACOSX_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/python{py_version_short}z'{platbase}/lib/python{py_version_short}z {base}/lib/python3/dist-packagesz${platbase}/lib/python3/dist-packagesz7{base}/local/lib/python{py_version_short}/dist-packagesz;{platbase}/local/lib/python{py_version_short}/dist-packagesz{base}/local/binz {base}/localz{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 deb_system posix_local posix_homent posix_venvnt_venvrrvenvrc tjdd}|r|StjdvrdSd}tjdkr-tjdpd}||dStjdkrItjr=|dd tjtjd d tjd S|dd S)NPYTHONUSERBASE>wasivxworks emscriptencbtjtjj|SN)ospath expanduserjoin)argss /usr/lib/python3.11/sysconfig.pyjoinuserz_getuserbase..joinusers!w!!"',"5666rAPPDATA~PythondarwinLibraryr.z.local)r(environgetsysplatformname _framework version_info)env_baser.bases r- _getuserbaser@sz~~.55H |888t777 w$z~~i((/Cxh''' |xCNxY+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_userr5r6z"([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_]*)}cF t|S#t$r|cYSwxYwr')rOSError)r)s r-_safe_realpathrFs7~~  s   _homez\PCbuild_PYTHON_PROJECT_BASEc|!ddl}|dtddD]H}tjtjtd|rdSIdS) Nrz.check_home argument is deprecated and ignored.) stacklevel)Setupz Setup.localModulesTF)warningswarnDeprecationWarningr(r)isfiler+ _PROJECT_BASE) check_homerNfns r-is_python_buildrUs| F(Q  8 8 8& 7>>"',,}iDD E E 44  5r/)rrrrrheadersz{srcdir}/Includez{projectbase}/.rc |jdi|S#t$rA} |jditjcYd}~S#t$rt |dwxYwd}~wwxYw)N)formatKeyErrorr(r7AttributeError)s local_varsvars r- _subst_varsr_ s5qx%%*%%% 555 518))bj)) ) ) ) ) ) ) 5 5 5 C** 4 55s#  A6AAAAcv|}|D]\}}||vr |||<dSr')keysitems) target_dict other_dict target_keyskeyvalues r- _extend_dictrhsW""$$K &&((!! U +    C!!r/c|i}|i}t|ttjdkr|ddiz}t|D]b\}}tjdvrtj|}tjt||||<c|S)Nr platlibdirlib)posixr) rhrr(r;_INSTALL_SCHEMESrbr)r*normpathr_)schemevarsresrfrgs r- _expand_varsrrs C |(())) w$|U++&v.4466>> U 7o % %G&&u--E7##Kt$<$<==C Jr/c4tjdkrddddStjdkrtjrddddStjtjksttdrd}n)tj d d }|d vrd }nd }|dd dS)NrrrA)prefixhomeuserr3rrC real_prefixDEB_PYTHON_INSTALL_LAYOUTr)debrrrB) r(r;r9r:r< base_prefixrthasattrr7r8) prefix_scheme deb_builds r-_get_preferred_schemesr~/s w$     |xCN$ (    #*$$](C(C$& JNN#> NN - - -(MM)M   r/c|dkrtjtjkrdSt|}|tvrt |d|d|S)Nrtr z returned z., which is not a valid scheme on this platform)r9rtrzr~rm ValueError)rfros r-get_preferred_schemerOsq h3:88v # % %c *F %%%         Mr/c tdS)Nrt)rrXr/r-get_default_schemer[s  ) ))r/TcPddl}|i}i}i}t|tjd5}|}dddn #1swxYwY|D]}|ds|dkr0|t|} | r| dd\} } | } | d d} d | vr| || < | tvrtt| } | || <#t$r| d d || <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|dr|dd|vrd}n*d| z|vrd }n t-|d| z}ndx|| <}|r|| d}|d| |z|z}d |vr|||<s |tvrtt|}|||<n'#t$r|||<YnwxYw| ||dr|dd|vr|dd}||vr|||< |r|||<| |)t!| dkL|D]1\}} t9| t,r| ||<2|||S)zParse a Makefile-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. rNsurrogateescape)encodingerrors#r6rJz$$$)CFLAGSLDFLAGSCPPFLAGSTFPY_)reopenr9getfilesystemencoding readlines startswithstripmatch _variable_rxgroupreplace _ALWAYS_STRrintlistralentuplesearch _findvar1_rx _findvar2_rxstartstrr(r7endremoverb isinstanceupdate)filenamerpkeep_unresolvedrdonenotdoneflineslinemnvtmpv variablesrenamed_variablesr;rgm1m2founditemafterks r-_parse_makefiler_sIII | DG h!:!s1<>>> 7<<**OZ H HHr/cttjdd}tjddtjd|S)Nrr_PYTHON_SYSCONFIGDATA_NAME_sysconfigdata__)getattrr9rr(r7r8r) multiarchs r-_get_sysconfigdata_namersF*L"==I :>>$4#,4444  r/cddl}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 tdr| dz } t'j| dt&j| |dz} t| dd5}|d|d|||dddn #1swxYwYtddd5}|| ddddS#1swxYwYdS)z;Generate the Python module containing build-time variables.rNz,invalid Python installation: unable to open strerrorz ()zutf-8)rLDSHARED BLDSHAREDr3z build/lib.rgettotalrefcountz-pydebugT)exist_okz.pywutf8zB# system configuration generated and used by the sysconfig module zbuild_time_vars = )streamzpybuilddir.txt)pprintrrrEr{rrrrrrr9r:types ModuleTypebuild_time_varsmodulesr rr(makedirsr)r+write) rrpmakefileemsgconfig_hrr;rmodule pybuilddirdestfiles r-_generate_posix_varsrs}MMM 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'9B3 B' B3'B++B3.B+/B33 C3=1C..C3AHH#&H#<II#&I#ct}t|ttdgd}|j}||dS)z7Initialize the module as appropriate for POSIX systems.rrN)r __import__globalslocalsrr)rpr;_temprs r- _init_posixr3sP # $ $D tWYY3D2Eq I IE+OKK     r/cNddl}td|d<td|d<td|d<|d|d <d |d <t|d <tjttj |d <d|d<dS)z+Initialize the module as appropriate for NTrNrLIBDESTr BINLIBDESTr INCLUDEPY EXT_SUFFIXz.exeEXEVERSIONBINDIRrTZPATH) _impr extension_suffixes_PY_VERSION_SHORT_NO_DOTr(r)dirnamerFr9 executable)rprs r-_init_non_posixr;sKKKx((DO!,//D ++D002215DDK.DOW__^CN%C%CDDDNDNNNr/c|i}ddl}|d}|d} |}|sn||}|rP|dd\}} |t vrt t|}n#t $rYnwxYw|||<n/||}|rd||d<|S)zParse a config.h-style file. A dictionary containing name/value pairs is returned. If an optional dictionary is passed in as the second argument, it is used instead of a new dictionary. Nrz"#define ([A-Z][A-Za-z0-9_]+) (.*) z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/ Tr6rJ)rcompilereadlinerrrrr) fprpr define_rxundef_rxrrrrs r-rrMs  | III @AAIzzCDDH%{{}}   OOD ! ! %771a==DAq  ##$$FF    DGGt$$A %#$QWWQZZ #%$ Ks<B B)(B)ctr>tjdkr&tjt d}nt }nt dd}tj|dS)zReturn the path of pyconfig.h.rPCrrz pyconfig.h)rr(r;r)r+rRr )inc_dirs r-rrosX: 7d??gll=$77GG#GG=.99 7<< . ..r/cDtttS)z,Return a tuple containing the schemes names.)rsortedrmrXr/r-rr{s ()) * **r/ctS)z*Return a tuple containing the paths names.) _SCHEME_KEYSrXr/r-r r s r/c@|rt||St|S)zReturn a mapping containing an install scheme. ``scheme`` is the install scheme name. If not provided, it will return the default scheme for the current platform. )rrrm)rorpexpands r-r r s' (FD)))''r/c0t||||S)z[Return a path corresponding to the scheme. ``scheme`` is the install scheme name. )r )r;rorpr s r-r r s VT6 * *4 00r/ctiattd<ttd<ttd<ttd<t td<t td<ttd<ttd <ttd <ttd <tj td < tj td <n#t$r dtd <YnwxYw tj ddtd<n#t$r dtd<YnwxYwtjdkr(t#ttjtd<tjdkrt'tt(rt+td<t-d}|rd|ztd<n dtd<tdt}tjdkr~t0rLtjt7}tj||}n+tjt7}t;|td<tjdkrddl}| t|r6g}|D]/}|!t|0|StS)anWith no arguments, return a dictionary of all configuration variables relevant for the current platform. On Unix, this means every variable defined in Python's installed Makefile; On Windows it's a much smaller set. With arguments, return a list of values that result from looking up each argument in the configuration variable dictionary. Nrt exec_prefix py_versionpy_version_shortpy_version_nodotinstalled_baser?installed_platbaseplatbase projectbaserjrrr5py_version_nodot_platrVPATHrluserbase MULTIARCH/multiarchsubdirsrcdirr3r)" _CONFIG_VARS_PREFIX _EXEC_PREFIX _PY_VERSIONrr _BASE_PREFIX_BASE_EXEC_PREFIXrRr9rjrr[winverrr(r;r_vpathr_HAS_USER_BASEr@rr8rr)rrr+rFr: _osx_supportcustomize_config_varsappend)r,rrr?r$valsr;s 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 $";//  1.1IoL* + +.0L* +!!(M:: 7g   Bw'<'>'>??dF33 )>)@)@AA!/!7!7 X <8 # #      . .| < < <  0 0D KK ((.. / / / / s$6C C"!C"&(DD&%D&cDt|S)zReturn the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) )rr8)r;s r-rrs     & &&r/ctjdkrrdtjvrdSdtjvrdSdtjvrdStjStjdkst 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|ddd krGd }ddl}|d!}||} | r| }n:|ddd"kr,ddl} | t)|||\}}}|d|d|S)#aReturn a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; on Linux, the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. ramd64z win-amd64z(arm)z win-arm32z(arm64)z win-arm64rluname_PYTHON_HOST_PLATFORMrr rrNlinuxsunosr5solarisrr5rJ32bit64bit)ilaix) aix_platformcygwinz[\d.]+r3)r(r;r9versionlowerr:r{r7r+rrmaxsize _aix_supportr6rrrrr$get_platform_osxr) osnamehostreleaser9machinebitnessr6rrel_rerr$s r-r r s* w$ ck'')) ) ); ck'')) ) );  ))++ + +;| w'W!5!5|"*,,z122/1hjj+FD'7G\\^^ # #C , ,Fooc3''Gooc3''G bqbzW%%G%%% w   1:  FWQZ1,<>&&|U A:: U,,,    $3$$E$$$%%%%&&r/cdtjvrtdStdt dtdt dtdt dttdtttdtdS) z*Display all information sysconfig detains.z--generate-posix-varsNz Platform: "rKzPython version: "zCurrent installation scheme: "Paths Variables) r9argvrrMr r rrPr rrXr/r-_mainrUns#(** )  ) ) )*** 5022 5 5 5666 B+=+?+? B B BCCC GGG%%% GGG _../////r/__main__r')NT)H__doc__r(r9os.pathrr__all__rrmr;r@r#rr9splitrr=rrr)rnrtrrzrr rbase_exec_prefixr r _USER_BASErrrrFrrrRgetcwdr _sys_homerr7rUrror_rhrrr~rrrrrrrrrrrr r r rrr r rHrPrU__name__rXr/r-r`sQ33 $$$$$$$$     KHFS I M   B?59 I M   B?LP I M%   0)&&48   )"---1# 8KHFS I M   )"---1#   m``F7d??/ :V/ =V ###,,..,ADOOII ILNND' .1<<D' )># k!!!$ '*BBS-=a-@BB!.q1H33CA3FHH '  3: & &w00 w00 G$$S%9::  5 / -  >0GOONN3>$B$BCCMM#N929;;//M GC$ ' '  M7d?? ~m$$// Nl555 6 688%$ RZ''"N2:.D#EFFM !!  M22 "&)"9-y.y 1}555!!!$@   ***}}}}@ I I I===~!!!   $D / / /+++  ('))T ( ( ( (-,..T$1111SSSl'''N+N+N+b   4&&& 0 0 0 z EGGGGGr/