本文整理匯總了Python中wheel.pep425tags.get_supported方法的典型用法代碼示例。如果您正苦於以下問題:Python pep425tags.get_supported方法的具體用法?Python pep425tags.get_supported怎麽用?Python pep425tags.get_supported使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wheel.pep425tags
的用法示例。
在下文中一共展示了pep425tags.get_supported方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_tag
# 需要導入模塊: from wheel import pep425tags [as 別名]
# 或者: from wheel.pep425tags import get_supported [as 別名]
def get_tag(self):
# bdist sets self.plat_name if unset, we should only use it for purepy
# wheels if the user supplied it.
if self.plat_name_supplied:
plat_name = self.plat_name
elif self.root_is_pure:
plat_name = "any"
else:
plat_name = self.plat_name or get_platform()
if (
plat_name in ("linux-x86_64", "linux_x86_64")
and sys.maxsize == 2147483647
):
plat_name = "linux_i686"
plat_name = plat_name.replace("-", "_").replace(".", "_")
if self.root_is_pure:
if self.universal:
impl = "py2.py3"
else:
impl = self.python_tag
tag = (impl, "none", plat_name)
else:
impl_name = get_abbr_impl()
impl_ver = get_impl_ver()
# PEP 3149
abi_tag = str(get_abi_tag()).lower()
tag = (impl_name + impl_ver, abi_tag, plat_name)
supported_tags = pep425tags.get_supported(
supplied_platform=plat_name if self.plat_name_supplied else None
)
# XXX switch to this alternate implementation for non-pure:
assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0])
return tag