diff --git a/python/setup.py.in b/python/setup.py.in index 38a3873430505936a1058359e61140dd302d3e3f..a064f36cc19dbc626dd85d76290280a01fa57215 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -42,12 +42,12 @@ def get_patch(): def is_taged(): try: - cmd = ['git', 'describe', '--exact-match', '--tags'] + cmd = ['git', 'describe', '--exact-match', '--tags', 'HEAD', '2>/dev/null'] git_tag = subprocess.Popen(cmd, stdout = subprocess.PIPE).communicate()[0].strip() except: return False - if git_tag.replace('v', '') == '@PADDLE_VERSION@': + if str(git_tag).replace('v', '') == '@PADDLE_VERSION@': return True else: return False