B
DŔ @ s d Z ddlZddlZddlZddlZddlmZ ejej Z
ejejZejej
ZejejZdejkrejejd Zn&ejrejejejZne Zdd ZeeddZejd krd
d ZeeZeeZdd
Ze ZdZyesejZW n e k
r Y nX dd Z!d,ddZ"d-ddZ#dd Z$dd Z%dd Z&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 )0a Provide 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_BASEc C s. x(dD ] }t jt j| d|rdS qW dS )N)z
Setup.distzSetup.localZModulesTF)ospathisfilejoin)dfn r
8/opt/alt/python37/lib64/python3.7/distutils/sysconfig.py_is_python_source_dir, s
r _homentc C s0 | r,t j| t jt jtdr,tS | S )NZPCbuild)r r normcase
startswithr PREFIX)r r
r
r _fix_pcbuild5 s r c C s t rtt S ttS )N) _sys_homer project_baser
r
r
r
_python_build= s r c C s dt jdd S )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 )sysversion_infor
r
r
r get_python_versionQ s r c C s |dkr| rt pt}tjdkrjtrL| r.tp,tS tjt dd}tj
|S dt t }tj|d|S tjdkrtrtj|dtjj
tj|d S tj|dS td 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'.
NposixsrcdirZIncludepythonZincluder PCzFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIXBASE_PREFIXr namepython_buildr r r r get_config_varnormpathr build_flagspathsepr )
plat_specificprefixZincdirZ
python_dirr
r
r get_python_incY s$
r) c C s |dkr&|r| rt pt}n| r"tp$t}tjdkrp| s8|r>d}nd}tj||dt }|r`|S tj|dS n