special case release candidates

This commit is contained in:
Benjamin Peterson 2009-06-13 15:42:23 +00:00
parent 248886a0cd
commit fb23463139
1 changed files with 4 additions and 2 deletions

View File

@ -27,8 +27,10 @@ def _sphinx_version():
major, minor, micro, level, serial = sys.version_info
release = '%s%s' % (major, minor)
if micro:
release += '%s' % micro
if level != 'final':
release += '%s' % (micro,)
if level == 'candidate':
release += 'rc%s' % (serial,)
elif level != 'final':
release += '%s%s' % (level[0], serial)
return release