def write_version_py(filename):
# Adding the git rev number needs to be done inside write_version_py(),
# otherwise the import of numpy.version messes up the build under Python 3.
git_version_code = inspect.getsource(get_git_version)
if os.path.exists('.git'):
GIT_REVISION = get_git_version()
else:
GIT_REVISION = 'Unknown'
content = VERSION_PY_CONTENT % {
'version': PACKAGE_VERSION,
'git_revision': GIT_REVISION,
'is_release': str(IS_RELEASE),
'git_version_code': str(git_version_code)
}
with open(filename, 'w') as version_file:
version_file.write(content)
################################################################################
# Installation
################################################################################
评论列表
文章目录