summaryrefslogtreecommitdiff
path: root/doc/_getdoctarget.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/_getdoctarget.py')
-rwxr-xr-xdoc/_getdoctarget.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/_getdoctarget.py b/doc/_getdoctarget.py
new file mode 100755
index 0000000..1199221
--- /dev/null
+++ b/doc/_getdoctarget.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+import py
+
+def get_version_string():
+ fn = py.path.local(__file__).join("..", "..",
+ "tox", "__init__.py")
+ for line in fn.readlines():
+ if "version" in line and not line.strip().startswith('#'):
+ return eval(line.split("=")[-1])
+
+def get_minor_version_string():
+ return ".".join(get_version_string().split(".")[:2])
+
+if __name__ == "__main__":
+ print (get_minor_version_string())