提交 a685566c 编写于 作者: M minqiyang

Throw all warnings from git describe in setup.py.in

Convert all values to string
上级 be2d9dc2
...@@ -42,12 +42,12 @@ def get_patch(): ...@@ -42,12 +42,12 @@ def get_patch():
def is_taged(): def is_taged():
try: 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() git_tag = subprocess.Popen(cmd, stdout = subprocess.PIPE).communicate()[0].strip()
except: except:
return False return False
if git_tag.replace('v', '') == '@PADDLE_VERSION@': if str(git_tag).replace('v', '') == '@PADDLE_VERSION@':
return True return True
else: else:
return False return False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册