py/makeversionhdr.py: Work with backslashes in paths.

This script may be called by Windows IDEs (e.g. Visual Studio) and be passed
paths with backslashes.
pull/1557/head
omtinez 2015-10-29 19:16:48 -07:00 zatwierdzone przez Paul Sokolovsky
rodzic 6f70283909
commit 17c649da3d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -57,7 +57,7 @@ def get_version_info_from_git():
return git_tag, git_hash, ver
def get_version_info_from_docs_conf():
with open("%s/docs/conf.py" % sys.argv[0].rsplit("/", 2)[0]) as f:
with open(os.path.join(os.path.dirname(sys.argv[0]), "..", "docs", "conf.py")) as f:
for line in f:
if line.startswith("release = '"):
ver = line.strip()[10:].strip("'")