a ª‡Ù`˜Pã@s°dZddlZddlZddlZddlZddlmZej ej ¡Z ej ej ¡Z ej ej ¡Zej ej¡Zdejvr†ej ejd¡Zn&ejr¤ej ej ej¡¡Zne ¡Zdd„ZeeddƒZejd krâd d „ZeeƒZeeƒZd d „ZeƒZdZzesejZWne yYn0dd„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-da.d$d%„Z/d&d'„Z0d(d)„Z1d*d+„Z2dS)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_PYTHON_PROJECT_BASEcCs,dD]"}tj tj |d|¡¡rdSqdS)N)ÚSetupz Setup.localÚModulesTF)ÚosÚpathÚisfileÚjoin)ÚdÚfn©r ú6/usr/local/src/Python-3.9.6/Lib/distutils/sysconfig.pyÚ_is_python_source_dir*srÚ_homeÚntcCs0|r,tj |¡ tj tj td¡¡¡r,tS|S)NÚPCbuild)rrÚnormcaseÚ startswithr ÚPREFIX)r r r r Ú _fix_pcbuild3s ÿrcCstr ttƒ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_versionOsrcCs¼|dur|rtpt}tjdkrjtrL|r.tp,tStj t dƒd¡}tj  |¡Sdt ƒt }tj |d|¡Stjdkrªtrœtj |d¡tjj tj |d¡Stj |d¡Std tjƒ‚dS) 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ÚsrcdirZIncludeÚpythonÚincluderÚPCzFI don't know where Python installs its C header files on platform '%s')ÚBASE_EXEC_PREFIXÚ BASE_PREFIXrÚnameÚ python_buildrrrr Úget_config_varÚnormpathrÚ build_flagsÚpathsepr)Ú plat_specificÚprefixZincdirZ python_dirr r r Úget_python_incWs*      ÿÿÿr-cCs²|dur&|r|rtpt}n |r"tp$t}tjdkrr|s8|r@tj}nd}tj  ||dt ƒ¡}|rb|Stj  |d¡SnTFÚPY_é)Údistutils.text_filerir[Ú _variable_rxr\r]ÚstripÚreplacer^r_ÚlistÚ _findvar1_rxÚsearchÚ _findvar2_rxÚstrrrGrÚendÚstartÚcloseÚitemsÚ isinstanceÚupdate)r rarir`ÚdoneÚnotdonerdrerfrgÚtmpvÚrenamed_variablesr%ÚvalueÚfoundÚitemÚafterÚkr r r Úparse_makefile1s‚                 ÿ      rŠcCsVt |¡pt |¡}|rR| ¡\}}|d|…| | d¡¡||d…}qqRq|S)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'. rrN)rwrxryÚspanÚgetr])ÚsÚvarsreÚbegr{r r r Úexpand_makefile_vars›s  *rc CsVtj ddjtjtjttjddƒd¡}t |t ƒt ƒdgdƒ}|j }ia t  |¡dS) z7Initialize the module as appropriate for POSIX systems.Ú_PYTHON_SYSCONFIGDATA_NAMEz+_sysconfigdata_{abi}_{platform}_{multiarch}rSr)ÚabirBÚ multiarchÚbuild_time_varsrN)rrGrŒrTrÚabiflagsrBÚgetattrrVÚ __import__ÚglobalsÚlocalsr”rEr€)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 NTrrrRÚLIBDESTÚ BINLIBDESTrNÚ INCLUDEPYÚ EXT_SUFFIXz.exeÚEXEÚ.rÚVERSIONÚBINDIRN) r3r-Ú_impÚextension_suffixesrrurrÚdirnameÚabspathrÚ executablerE)rar r r Ú_init_ntÆsr©cGs\tdur*tƒ dtj¡}|r(|ƒniattd<ttd<t d¡}|durV|td<t dt¡}tjdkrœtrŽtj   t ƒ¡}tj   ||¡}ntj   t ƒ¡}tj   tj  |¡¡td<tr tjdkr t}tj  td¡s |t ¡kr tj   |td¡}tj  |¡td<tjd kr*d dl}| t¡|rTg}|D]}| t |¡¡q8|StSdS) 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_r,Ú exec_prefixrŸÚSOrrr4r)rEr˜rŒrr%rr/rr&rr¦rXr r§r(ÚisabsÚgetcwdrrBrCÚcustomize_config_varsÚappend)ÚargsÚfuncr«rÚbaserCÚvalsr%r r r rFÙsB     ÿ  rFcCs*|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ÚDeprecationWarningrFrŒ)r%r´r r r r'#sr')rN)rrN)N)N)3Ú__doc__r¤rrYrrnrrr(r,rrªr/Ú base_prefixr$Úbase_exec_prefixr#rGr§rr¨r¦r­rr–rr%rrr&r)r•ÚAttributeErrorrr-r3rDrPrXrhrZrsrwryrŠrrEr›r©rFr'r r r r ÚsZ       ( .I      jJ