summaryrefslogtreecommitdiff
path: root/doc/_getdoctarget.py
blob: 1199221d20233f1c597e10f7ba92cf1bebef6ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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())