def get_version_info():
# Adding the git rev number needs to be done inside
# write_version_py(), otherwise the import of pyfunt.version messes
# up the build under Python 3.
FULLVERSION = VERSION
if os.path.exists('.git'):
GIT_REVISION = git_version()
elif os.path.exists('pyfunt/version.py'):
# must be a source distribution, use existing version file
# load it as a separate module to not load pyfunt/__init__.py
import imp
version = imp.load_source('pyfunt.version', 'pyfunt/version.py')
GIT_REVISION = version.git_revision
else:
GIT_REVISION = "Unknown"
if not ISRELEASED:
FULLVERSION += '.dev0+' + GIT_REVISION[:7]
return FULLVERSION, GIT_REVISION
评论列表
文章目录