Add buildtools.printVersion()

This commit is contained in:
Robin Dunn
2016-12-02 15:55:07 -08:00
parent a862b70c65
commit 63145ef959

View File

@@ -0,0 +1,11 @@
# Just a little convenience function that can be used by other build scripts
# or whatever to get the complete current version number.
def printVersion():
from . import config
oldval = config.runSilently
config.runSilently = True
cfg = config.Config(True)
config.runSilently = oldval
print(cfg.VERSION)