2015-04-02 16:38:25 +08:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import py
|
|
|
|
|
|
|
|
def get_version_string():
|
|
|
|
fn = py.path.local(__file__).join("..", "..", "..",
|
|
|
|
"_pytest", "__init__.py")
|
|
|
|
for line in fn.readlines():
|
2015-08-23 22:20:34 +08:00
|
|
|
if "version" in line and not line.strip().startswith('#'):
|
2015-04-02 16:38:25 +08:00
|
|
|
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())
|