[S @sdZddlZddlZddlZddlmZejjejZ ejjej Z ejjej Z ejjejZdejkrejjejdZn!ejjejjejZejdkr/ded1djkr/ejjejjeejjZnejdkrd ed2djkrejjejjeejjejjZnejdkrd ed3djkrejjejjeejjejjZnd dZeeddZerlejdkrlejjd4rlejjeZejdrlejjeZqlnddZeZdZyesej ZnWne!k rYnXddZ"ddddZ#dddddZ$ddZ%ddZ&ddZ'dd d!Z(ej)d"Z*ej)d#Z+ej)d$Z,dd%d&Z-d'd(Z.da/d)d*Z0d+d,Z1d-d.Z2d/d0Z3dS)5aProvide 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_BASEntpcbuildz\pc\v z\pcbuild\amd64cCs=x6dD].}tjjtjj|d|rdSqWdS)N Setup.dist Setup.localZModulesTF)r r )ospathisfilejoin)dfnr)/usr/lib/python3.4/distutils/sysconfig.py_is_python_source_dir0s $rZ_home pcbuild\amd64cCstrttSttS)N) _sys_homer project_baserrrr _python_build;s 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_versionMsrcCs!|dkr!|rtpt}ntjdkrtrtp?t}|rL|Strptjjtt d}ntjjt dd}tjj |Sdt t }t r|rddl }|jdStjj|d |Stjd kr tjj|d Std 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'. NposixZ AST_H_DIRsrcdirZIncludepythonrZ platincludeZincluderzFI don't know where Python installs its C header files on platform '%s')BASE_EXEC_PREFIX BASE_PREFIXr name python_buildrrr rget_config_varnormpathr build_flags sysconfigZget_pathr) plat_specificprefixbaseZincdirZ python_dirr'rrrget_python_incUs*     r+cCs_| ptjj|dk}|dkr[|rF|r=tp@t}q[|rRtpUt}ntjdkrtjj|ddt }|r|S|rdtj krdtj krd t j krt j t jkrtjj|dd d Stjj|d SnTtjd krH|r/tjj|dStjj|dd SntdtjdS)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'. /usr /usr/localNrZlibrZPYTHONUSERBASEZ VIRTUAL_ENVZ real_prefixZpython3z dist-packagesz site-packagesrZLibz?I don't know where Python installs its library on platform '%s')r,r-)r r r%r r! EXEC_PREFIXPREFIXr"rrenvironr__dict__r) base_prefixr)r( standard_libr)Zis_default_prefixZ libpythonrrrget_python_lib~s0  r4cCsK|jdkrGtjdkrStdsSddl}|jtdtdZccZcxxZoptZcflagsZccsharedZldsharedZ shlib_suffixZarZar_flagsZconfigure_cppflagsZconfigure_cflagsZconfigure_ldflagsZnewccZcppr<Zcc_cmdrrrr?sp   3    r?cCsdtrBtjdkr3tjjtp'td}qQtp<t}ntdd}tjj|dS)z2Return full pathname of installed pyconfig.h file.rZPCr(rz pyconfig.h)r#r r"r rrrr+)Zinc_dirrrrget_config_h_filenames rDcCstrtjjtptdStdddd}djtt }t t j drr|dt j j 7}ntjj||dS) zAReturn full pathname of installed Makefile from the Python build.ZMakefiler(rr3rz config-{}{} _multiarchz-%s)r#r r rrrr4formatrr&hasattrrimplementationrE)Zlib_dirZ config_filerrrget_makefile_filename srIc Cs|dkri}ntjd}tjd}x|j}|sLPn|j|}|r|jdd\}}yt|}Wntk rYnX|||| || qAqKq@|| =q@Wq-W|jx<|jD].\}} t| trj| j||Zcustomize_config_varsappend)argsfuncr~rr*r>Zvalsr"rrrrAs@      "  rAcCs>|dkr.ddl}|jdtdntj|S)zReturn 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_SUFFIXrJ)warningswarnDeprecationWarningrArq)r"rrrrr$&s  r$iii)rr)4__doc__r rKrrZrr r%r)r/r}r.r2r!base_exec_prefixr r0rzrryr{r"lowerrpardirrgetattrrendswithrr#r&abiflagsAttributeErrorrr+r4r?rDrIrXrLr]rarcrortr@rvr|rAr$rrrr sf   !+*++     ). T j   J