diff --git a/python/setup.py.in b/python/setup.py.in index 081c12a5cf2d3f95442380c175b830c7e0fe0b60..e6170a574aa5c1361928cd93e2396c172ad4bde6 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: