本文整理汇总了Python中distutils.sysconfig.get_paths方法的典型用法代码示例。如果您正苦于以下问题:Python sysconfig.get_paths方法的具体用法?Python sysconfig.get_paths怎么用?Python sysconfig.get_paths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类distutils.sysconfig
的用法示例。
在下文中一共展示了sysconfig.get_paths方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: expanduser
# 需要导入模块: from distutils import sysconfig [as 别名]
# 或者: from distutils.sysconfig import get_paths [as 别名]
def expanduser(path):
"""
Expand ~ and ~user constructions.
Includes a workaround for http://bugs.python.org/issue14768
"""
expanded = os.path.expanduser(path)
if path.startswith('~/') and expanded.startswith('//'):
expanded = expanded[1:]
return expanded
# packages in the stdlib that may have installation metadata, but should not be
# considered 'installed'. this theoretically could be determined based on
# dist.location (py27:`sysconfig.get_paths()['stdlib']`,
# py26:sysconfig.get_config_vars('LIBDEST')), but fear platform variation may
# make this ineffective, so hard-coding