當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。