提交 078da5de 编写于 作者: M minqiyang

Remove MAJOR, MINOR, PATCH and add comment for assert

上级 037f9ae9
......@@ -18,7 +18,8 @@ def git_commit():
return git_commit
def _get_version_detail(idx):
assert idx < 3
assert idx < 3, "vesion info consists of %(major)d.%(minor)d.%(patch)d, \
so detail index must less than 3"
version_details = '@PADDLE_VERSION@'.split('.')
if len(version_details) == 3:
......@@ -32,21 +33,21 @@ def get_major():
if major is not None:
return major
return MAJOR
return 0
def get_minor():
minor = _get_version_detail(1)
if minor is not None:
return minor
return MINOR
return 0
def get_patch():
patch = _get_version_detail(2)
if patch is not None:
return patch
return PATCH
return 0
def is_taged():
try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册