本文整理汇总了Python中distutils.version.LooseVersion.parse方法的典型用法代码示例。如果您正苦于以下问题:Python LooseVersion.parse方法的具体用法?Python LooseVersion.parse怎么用?Python LooseVersion.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类distutils.version.LooseVersion
的用法示例。
在下文中一共展示了LooseVersion.parse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parse
# 需要导入模块: from distutils.version import LooseVersion [as 别名]
# 或者: from distutils.version.LooseVersion import parse [as 别名]
def parse(self, vstring):
LooseVersion.parse(self, vstring)
self.int_version = list(filter(lambda x:isinstance(x, int),
self.version))
示例2: LooseVersion
# 需要导入模块: from distutils.version import LooseVersion [as 别名]
# 或者: from distutils.version.LooseVersion import parse [as 别名]
master_doc = 'index'
# General information about the project.
project = u'Python-Tempo'
copyright = u'2015, Andrew Pashkin'
author = u'Andrew Pashkin'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
_version = LooseVersion()
_version.parse(open(os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, 'VERSION'
)).read().strip())
version = '.'.join([str(e) for e in _version.version][:2])
# The full version, including alpha/beta/rc tags.
release = _version.vstring
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used: