+def git_describe(repo_path):
+ '''Use git describe --tags command to return tag description of the git repository"
+ :param repo_path str: The git repository to describe
+ '''
+ git_cmd="cd %s;git describe --tags" % repo_path
+ p = subprocess.Popen(git_cmd, shell=True,
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ p.wait()
+ if p.returncode != 0:
+ return False
+ else:
+ return p.stdout.readlines()[0].strip()
+