From a685566cd545285b5984512f7858d80e2e8229a1 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Wed, 11 Jul 2018 21:51:05 +0800 Subject: [PATCH] Throw all warnings from git describe in setup.py.in Convert all values to string --- python/setup.py.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/setup.py.in b/python/setup.py.in index 52138b414e3..ee4bbf6febc 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 -- GitLab