a GgP@sdZddlZddlZddlZddlZddlmZejej Z ejej Z ejej ZejejZdejvrejejdZn&ejrejejejZneZddZeeddZejd krd d ZeeZeeZd d ZeZdZzesejZWne yYn0ddZ!d,ddZ"d-ddZ#ddZ$ddZ%ddZ&d.ddZ'e(dZ)e(dZ*e(dZ+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]"}tjtj|d|rdSqdS)N)ZSetupz Setup.localZModulesTF)ospathisfilejoin)dfnr +/usr/lib64/python3.9/distutils/sysconfig.py_is_python_source_dir*sr _homentcCs0|r,tj|tjtjtdr,tS|S)NZPCbuild)rrnormcase startswithrPREFIX)rr r r _fix_pcbuild3s rcCstr ttSttS)N) _sys_homer project_baser r r r _python_build;srcCsdtjddS)zReturn 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,tStjt dd}tj |Sdt t }tj|d|Stjdkrtrtj|dtjj tj|dStj|dStd tjdS) aReturn 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'. NposixsrcdirZIncludepythonZincluderPCzFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIX BASE_PREFIXrname python_buildrrrrget_config_varnormpathr build_flagspathsepr) plat_specificprefixZincdirZ 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 |dSnsZ       ( .I      jJ