YfP @sdZddlZddlZddlZddlZddlmZejjej Z ejjej Z ejjej ZejjejZdejkrejjejdZn!ejjejjejZejdkr(ejjd,r(ejjejjeZd d Zeed dZerejdkrejjd-rejjejjeZd d ZeZdZyesejZWne k rYnXddZ!ddddZ"dddddZ#ddZ$ddZ%ddZ&dddZ'ej(dZ)ej(dZ*ej(dZ+dd d!Z,d"d#Z-da.d$d%Z/d&d'Z0d(d)Z1d*d+Z2dS).aProvide 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_BASEnt\pcbuild\win32\pcbuild\amd64cCs=x6dD].}tjjtjj|d|rdSqWdS)N Setup.dist Setup.localModulesTF)rr)ospathisfilejoin)dfnr8/opt/alt/python35/lib64/python3.5/distutils/sysconfig.py_is_python_source_dir)s $r_homecCstrttSttS)N) _sys_homer project_baserrrr _python_build2s rcCstjddS)zReturn a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. N)sysversionrrrrget_python_versionDsrcCs|dkr|rtpt}tjdkrtrn|rCtpBtStjjt dd}tjj |Sdt t }tjj|d|Stjdkrtjj|dSt dtjdS) 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'. NposixsrcdirZIncludepythonincluderzFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIX BASE_PREFIXr name python_buildrrr r get_config_varnormpathr build_flagsr) plat_specificprefixZincdirZ python_dirrrrget_python_incLs  r)cCs|dkr9|r'|rtp!t}n|r3tp6t}tjdkr|sT|r]d}nd}tjj||dt}|r|Stjj|dSnTtjdkr|rtjj|dStjj|ddSnt d tjdS) 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'. Nrlib64librz site-packagesrZLibz?I don't know where Python installs its library on platform '%s') r r! EXEC_PREFIXPREFIXr r"r r rr)r' standard_libr(r+Z libpythonrrrget_python_libos(    r/cCs|jdkrtjdkrMtdsMddl}|jtdtdrAZccZcxxZoptZcflagsZccsharedZldsharedZ shlib_suffixarZar_flagsZnewccZcppr?Zcc_cmdrrrrBs\    0      rBcCsdtrBtjdkr3tjjtp'td}qQtp<t}ntdd}tjj|dS)z2Return full pathname of installed pyconfig.h file.rPCr'rz pyconfig-64.h)r#r r"r r rrr))inc_dirrrrget_config_h_filenames rKcCs_trtjjtptdStdddd}djtt }tjj||dS)zAReturn full pathname of installed Makefile from the Python build.Makefiler'rr.rz config-{}{}) r#r r r rrr/formatrr&)Zlib_dirZ config_filerrrget_makefile_filenames rNc Cs|dkri}tjd}tjd}x|j}|sFP|j|}|r|jdd\}}yt|}Wntk rYnX||| sZ    !      #+ I m  $  J