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


Python _manylinux.manylinux1_compatible方法代码示例

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


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

示例1: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # Only Linux, and only x86-64 / i686
    if get_platform() not in ("linux_x86_64", "linux_i686"):
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return have_compatible_glibc(2, 5)


# Separated out from have_compatible_glibc for easier unit testing 
开发者ID:awemulya,项目名称:kobo-predict,代码行数:20,代码来源:pep425tags.py

示例2: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # type: () -> bool
    # Only Linux, and only x86-64 / i686
    if get_platform() not in {"linux_x86_64", "linux_i686"}:
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return pip._internal.utils.glibc.have_compatible_glibc(2, 5) 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:18,代码来源:pep425tags.py

示例3: _pep425_supports_manylinux

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def _pep425_supports_manylinux():
    """
    :return:
        A boolean indicating if the machine can use manylinux1 packages
    """

    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        pass

    # Check for glibc 2.5
    try:
        proc = ctypes.CDLL(None)
        gnu_get_libc_version = proc.gnu_get_libc_version
        gnu_get_libc_version.restype = ctypes.c_char_p

        ver = gnu_get_libc_version()
        if not isinstance(ver, str_cls):
            ver = ver.decode('ascii')
        match = re.match(r'(\d+)\.(\d+)', ver)
        return match and match.group(1) == '2' and int(match.group(2)) >= 5

    except (AttributeError):
        return False 
开发者ID:wbond,项目名称:oscrypto,代码行数:28,代码来源:_pep425.py

示例4: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # Only Linux, and only x86-64 / i686
    if get_platform() not in ("linux_x86_64", "linux_i686"):
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return pip.utils.glibc.have_compatible_glibc(2, 5) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:17,代码来源:pep425tags.py

示例5: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # Only Linux, and only x86-64 / i686
    if get_platform() not in ("linux_x86_64", "linux_i686"):
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return have_compatible_glibc(2, 5) 
开发者ID:jpush,项目名称:jbox,代码行数:17,代码来源:pep425tags.py

示例6: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # Only Linux, and only x86-64 / i686
    if get_platform() not in {"linux_x86_64", "linux_i686"}:
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return glibc.have_compatible_glibc(2, 5) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:17,代码来源:pep425tags.py

示例7: is_manylinux1_compatible

# 需要导入模块: import _manylinux [as 别名]
# 或者: from _manylinux import manylinux1_compatible [as 别名]
def is_manylinux1_compatible():
    # Only Linux, and only x86-64 / i686
    if get_platform() not in {"linux_x86_64", "linux_i686"}:
        return False

    # Check for presence of _manylinux module
    try:
        import _manylinux
        return bool(_manylinux.manylinux1_compatible)
    except (ImportError, AttributeError):
        # Fall through to heuristic check below
        pass

    # Check glibc version. CentOS 5 uses glibc 2.5.
    return pip._internal.utils.glibc.have_compatible_glibc(2, 5) 
开发者ID:HaoZhang95,项目名称:Python24,代码行数:17,代码来源:pep425tags.py


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