提交 e83731b9 authored 作者: David Warde-Farley's avatar David Warde-Farley

Write certain info to version.py even if it is a release.

上级 7b8bf66d
......@@ -36,13 +36,16 @@ PLATFORMS = ["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"]
MAJOR = 0
MINOR = 3
MICRO = 0
ISRELEASED = False
SUFFIX = "rc1" # Should be blank except for rc's, betas, etc.
ISRELEASED = True
if MICRO > 0:
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
else:
VERSION = "%d.%d" % (MAJOR, MINOR)
VERSION += SUFFIX
# Return the hg revision as a string -- borrowed from hg_version in NumPy's
# setup.py file
def hg_version():
......@@ -83,16 +86,15 @@ if not release:
version = full_version
"""
FULL_VERSION = VERSION
if not ISRELEASED:
if os.path.exists('.hg'):
HG_REVISION = hg_version()
elif os.path.exists(filename):
# must be a source distribution, use existing version file
from theano.version import hg_revision as HG_REVISION
else:
HG_REVISION = "unknown-hg"
if os.path.exists('.hg'):
HG_REVISION = hg_version()
elif os.path.exists(filename):
# must be a source distribution, use existing version file
from theano.version import hg_revision as HG_REVISION
else:
HG_REVISION = "unknown-hg"
FULL_VERSION += '.dev-' + HG_REVISION
FULL_VERSION += '.dev-' + HG_REVISION
a = open(filename, 'w')
try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论