当前位置: 首页>>代码示例>>Python>>正文


Python sysconfig.get_paths方法代码示例

本文整理汇总了Python中sysconfig.get_paths方法的典型用法代码示例。如果您正苦于以下问题:Python sysconfig.get_paths方法的具体用法?Python sysconfig.get_paths怎么用?Python sysconfig.get_paths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sysconfig的用法示例。


在下文中一共展示了sysconfig.get_paths方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: expanduser

# 需要导入模块: import sysconfig [as 别名]
# 或者: from 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 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:19,代码来源:__init__.py

示例2: __init__

# 需要导入模块: import sysconfig [as 别名]
# 或者: from sysconfig import get_paths [as 别名]
def __init__(self, path):
        # type: (str) -> None
        self.path = path
        self.setup = False
        self.bin_dir = get_paths(
            'nt' if os.name == 'nt' else 'posix_prefix',
            vars={'base': path, 'platbase': path}
        )['scripts']
        # Note: prefer distutils' sysconfig to get the
        # library paths so PyPy is correctly supported.
        purelib = get_python_lib(plat_specific=False, prefix=path)
        platlib = get_python_lib(plat_specific=True, prefix=path)
        if purelib == platlib:
            self.lib_dirs = [purelib]
        else:
            self.lib_dirs = [purelib, platlib] 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:18,代码来源:build_env.py


注:本文中的sysconfig.get_paths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。