o Xai~Tã@s¶dZddlZddlZddlZddlZddlmZdejvZej   ej ¡Z ej   ej ¡Zej   ej¡Zej   ej¡ZdejvrHej  ejd¡ZnejrWej  ej  ej¡¡Zne ¡Zdd„Zeed dƒZejd krvd d „ZeeƒZeeƒZd d„ZeƒZdZ zes…ej!Z Wn e"yYnwdd„Z#d-dd„Z$d.dd„Z%dd„Z&dd„Z'dd„Z(d/dd„Z)e *d¡Z+e *d¡Z,e *d ¡Z-d/d!d"„Z.d#d$„Z/da0d%d&„Z1d'd(„Z2d)d*„Z3d+d,„Z4dS)0aProvide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are also available. Written by: Fred L. Drake, Jr. Email: éNé)ÚDistutilsPlatformErrorZ__pypy__Z_PYTHON_PROJECT_BASEcCs,dD]}tj tj |d|¡¡rdSqdS)N)ÚSetupz Setup.localÚModulesTF)ÚosÚpathÚisfileÚjoin)ÚdÚfn©r ú˜/builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-4.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/_distutils/sysconfig.pyÚ_is_python_source_dir,s ÿrÚ_homeÚntcCs0|rtj |¡ tj tj td¡¡¡rtS|S)NZPCbuild)rrÚnormcaseÚ startswithr ÚPREFIX)r r r r Ú _fix_pcbuild5s ÿrcCstrttƒSttƒS©N)Ú _sys_homerÚ project_baser r r r Ú _python_build=srÚcCsdtjdd…S)z–Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. z%d.%dNé)ÚsysÚ version_infor r r r Úget_python_versionQsrcCsà|dur |rtp t}tjdkrItrtjdkrtj |d¡St r4|r%t p$t Stj t dƒd¡}tj  |¡Str8dnd}|tƒt}tj |d|¡Stjd krit rbtj |d¡tjjtj |d ¡Stj |d¡Std tjƒ‚) a¤Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. NÚposix©ééÚincludeÚsrcdirÚIncludeÚpypyÚpythonrÚPCzFI don't know where Python installs its C header files on platform '%s')ÚBASE_EXEC_PREFIXÚ BASE_PREFIXrÚnameÚIS_PYPYrrrr Ú python_buildrrÚget_config_varÚnormpathrÚ build_flagsÚpathsepr)Ú plat_specificÚprefixÚincdirÚimplementationÚ python_dirr r r Úget_python_incYs0      ÿÿÿr6cCsþtr!tjdkr!|dur t}|rtj |dtjd¡Stj |d¡S|dur4|r.|r+tp,t }n|r2t p3t}tj dkrb|s=|rDt tddƒ}nd}trJd nd }tj |||t ƒ¡}|r[|Stj |d¡Stj d krx|rptj |d ¡Stj |d d¡Std tj ƒ‚)aSReturn the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing platform-specific modules, i.e. any module from a non-pure-Python module distribution; otherwise, return the platform-shared library directory. If 'standard_lib' is true, return the directory containing standard Python library modules; otherwise, return the directory for site-specific modules. If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. rNz lib-pythonrz site-packagesrÚ platlibdirÚlibr%r&rÚLibz?I don't know where Python installs its library on platform '%s')r+rrrrrr Úversionr(r)Ú EXEC_PREFIXr*Úgetattrrr)r1Ú standard_libr2Úlibdirr4Ú libpythonr r r Úget_python_lib„s<    ÿ ÿÿr@c Cs|jdkrtjdkrtdƒsddl}| t¡dtd<tddd d d d d dƒ\}}}}}}}} dtj vrOtj d} d tj vrM|  |¡rM| |t |ƒd…}| }dtj vrYtj d}d tj vrctj d }dtj vrntj d} n|d} dtj vr€|dtj d}d tj vr—|dtj d }|dtj d }dtj vr·| dtj d} |dtj d}|dtj d}d tj vrÁtj d }dtj vrÐ|dtj d} n|d| } |d|} |j | | | d||||| ddtj vr|j  dd¡r|j tj dd||_dSdS)zÄDo any platform-specific customization of a CCompiler instance. Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. ÚunixÚdarwinÚCUSTOMIZED_OSX_COMPILERrNÚTrueÚCCÚCXXÚCFLAGSÚCCSHAREDÚLDSHAREDÚ SHLIB_SUFFIXÚARÚARFLAGSÚCPPz -EÚLDFLAGSú ÚCPPFLAGS)Ú preprocessorÚcompilerÚ compiler_soÚ compiler_cxxÚ linker_soÚ linker_exeÚarchiverZRANLIBÚranlib)rX)Ú compiler_typerÚplatformr-Ú _osx_supportÚcustomize_compilerÚ _config_varsÚget_config_varsrÚenvironrÚlenÚset_executablesZ executablesÚgetÚshared_lib_extension)rRr[ÚccÚcxxÚcflagsÚccsharedÚldsharedÚ shlib_suffixÚarÚar_flagsÚnewccÚcpprWÚcc_cmdr r r r\¼sh     ÿÿ   ÿ               ù  ¾r\cCsDtrtjdkrtj tp td¡}n tpt}ntdd}tj |d¡S)z2Return full pathname of installed pyconfig.h file.rr'r©r1z pyconfig.h)r,rr*rr rrr6)Úinc_dirr r r Úget_config_h_filenames    rqcCs\tr tj tptd¡Stddd}d tƒt ¡}t t j dƒr&|dt j j 7}tj ||d¡S)zAReturn full pathname of installed Makefile from the Python build.ÚMakefilerr©r1r=z config-{}{}Ú _multiarchz-%s)r,rrr rrr@Úformatrr/Úhasattrrr4rt)Úlib_dirÚ config_filer r r Úget_makefile_filenames  rycCsš|duri}t d¡}t d¡} | ¡}|s |S| |¡}|r>| dd¡\}}zt|ƒ}Wn ty8Ynw|||<n| |¡}|rLd|| d¡<q)zÌParse 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. Nz"#define ([A-Z][A-Za-z0-9_]+) (.*) z&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/ Trrr)ÚreÚcompileÚreadlineÚmatchÚgroupÚintÚ ValueError)ÚfpÚgÚ define_rxÚundef_rxÚlineÚmÚnÚvr r r Úparse_config_hs&   ö  ó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_]*)}c Cs¤ddlm}||ddddd}|duri}i}i} | ¡}|dur#n?t |¡}|ra| dd¡\}} |  ¡} |  d d ¡} d | vrE| ||<nzt| ƒ} Wnt y\|  d d ¡||<Ynw| ||<qd } |r1t |ƒD]Ã} || } t   | ¡pzt   | ¡}|r+| d¡}d}||vrt||ƒ}n>||vr—d }n7|tjvr¢tj|}n,|| vrÈ|  d¡r¶| dd…| vr¶d }nd||vr¿d }nt|d|ƒ}nd ||<}|r*| | ¡d…}| d| ¡…||} d |vrî| || <qkzt| ƒ} Wnt y|  ¡|| <Ynw| || <|| =|  d¡r*| dd…| vr*| dd…} | |vr*| || <qk|| =qk|sg| ¡| ¡D]\}} t| tƒrI|  ¡||<q9| |¡|S)zÌParse 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. r)ÚTextFilerÚsurrogateescape)Ústrip_commentsÚ skip_blanksÚ join_linesÚerrorsNTrz$$rú$)rGrNrPFÚPY_r )Údistutils.text_filerŠr|Ú _variable_rxr}r~ÚstripÚreplacerr€ÚlistÚ _findvar1_rxÚsearchÚ _findvar2_rxÚstrrr_rÚendÚstartÚcloseÚitemsÚ isinstanceÚupdate)r r‚rŠrÚdoneÚnotdoner…r†r‡rˆÚtmpvÚrenamed_variablesr*ÚvalueÚfoundÚitemÚafterÚkr r r Úparse_makefileBsŽ      þì       ÿ   €Ð2  € rªcCsX t |¡p t |¡}|r(| ¡\}}|d|…| | d¡¡||d…}n |Sq)a¨Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in 'string' according to 'vars' (a dictionary mapping variable names to values). Variables not present in 'vars' are silently expanded to the empty string. The variable values in 'vars' should not contain further variable expansions; if 'vars' is the output of 'parse_makefile()', you're fine. Returns a variable-expanded version of 's'. TrrN)r—r˜r™Úspanrbr~)ÚsÚvarsr†Úbegr›r r r Úexpand_makefile_vars¬s *ùr¯c Cs„tj ddjtjtjttjddƒd¡}z t |t ƒt ƒdgdƒ}Wnt y5t dt ƒt ƒdgdƒ}Ynw|j }iat |¡d S) z7Initialize the module as appropriate for POSIX systems.Ú_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rtr)ÚabirZÚ multiarchÚbuild_time_varsrZ_sysconfigdataN)rr_rbrurÚabiflagsrZr<r4Ú __import__ÚglobalsÚlocalsÚ ImportErrorr³r]r )r*Ú_tempr³r r r Ú _init_posixÇs" ýÿ ÿþrºcCs~i}tddd|d<tddd|d<tdd|d<t ¡d|d<d |d <tƒ d d ¡|d <tj tj  t j ¡¡|d<|a dS)z+Initialize the module as appropriate for NTrrrsÚLIBDESTÚ BINLIBDESTroÚ INCLUDEPYÚ EXT_SUFFIXz.exeÚEXEÚ.rÚVERSIONÚBINDIRN) r@r6Ú_impÚextension_suffixesrr•rrÚdirnameÚabspathrÚ executabler])r‚r r r Ú_init_ntÜsrÈcGsLtdur‘tƒ dtj¡}|r|ƒniattd<ttd<tsƒt d¡}|dur,|td<t dt¡}tjdkrOt rHtj   t ƒ¡}tj   ||¡}ntj   t ƒ¡}tj  tj  |¡¡td<t rƒtjdkrƒt}tj  td¡sƒ|t ¡krƒtj   |td¡}tj  |¡td<tjd kr‘d dl}| t¡|r¤g}|D] }| t |¡¡q—|StS) aßWith no arguments, return a dictionary of all configuration variables relevant for the current platform. Generally this includes everything needed to build extensions and install both pure modules and extensions. 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. NZ_init_r2Ú exec_prefixr¾ÚSOr#rrBr)r]r¶rbrr*rr;r+rr,rrÅryr rÆr.ÚisabsÚgetcwdrrZr[Úcustomize_config_varsÚappend)ÚargsÚfuncrÊr#Úbaser[Úvalsr*r r r r^ïsB       r^cCs*|dkrddl}| dtd¡tƒ |¡S)z“Return the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) rÊrNz SO is deprecated, use EXT_SUFFIXr)ÚwarningsÚwarnÚDeprecationWarningr^rb)r*rÓr r r r-:s r-)rN)rrNr)5Ú__doc__rÃrrzrrrÚbuiltin_module_namesr+rr.r2rrÉr;Ú base_prefixr)Úbase_exec_prefixr(r_rÆrrÇrÅrÌrr<rr*rrr,r/r´ÚAttributeErrorrr6r@r\rqryr‰r{r“r—r™rªr¯r]rºrÈr^r-r r r r Úsb      € ý  +8K    j K