From 078da5dee81af1258f84c6e4458e15a9c3429bcf Mon Sep 17 00:00:00 2001 From: minqiyang Date: Tue, 3 Jul 2018 14:20:05 +0800 Subject: [PATCH] Remove MAJOR, MINOR, PATCH and add comment for assert --- python/setup.py.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/setup.py.in b/python/setup.py.in index 081c12a5cf..e6170a574a 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -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: -- GitLab