From 17c649da3d406f72907f46acc9473bbeebb30d91 Mon Sep 17 00:00:00 2001
From: omtinez <omtinez@gmail.com>
Date: Thu, 29 Oct 2015 19:16:48 -0700
Subject: [PATCH] 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.
---
 py/makeversionhdr.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py
index e95e0c607..1d8f59bd2 100644
--- a/py/makeversionhdr.py
+++ b/py/makeversionhdr.py
@@ -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("'")
-- 
GitLab