Commit 845474f1 authored by Thomas Vincent's avatar Thomas Vincent
Browse files

Sync with silx's version.py (fix bug in rc version naming

parent 4dfee82a
...@@ -53,7 +53,7 @@ from __future__ import absolute_import, print_function, division ...@@ -53,7 +53,7 @@ from __future__ import absolute_import, print_function, division
__authors__ = ["Jérôme Kieffer"] __authors__ = ["Jérôme Kieffer"]
__license__ = "MIT" __license__ = "MIT"
__copyright__ = "European Synchrotron Radiation Facility, Grenoble, France" __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
__date__ = "28/02/2018" __date__ = "30/09/2020"
__status__ = "production" __status__ = "production"
__docformat__ = 'restructuredtext' __docformat__ = 'restructuredtext'
__all__ = ["date", "version_info", "strictversion", "hexversion", "debianversion", __all__ = ["date", "version_info", "strictversion", "hexversion", "debianversion",
...@@ -85,9 +85,10 @@ version_info = _version_info(MAJOR, MINOR, MICRO, RELEV, SERIAL) ...@@ -85,9 +85,10 @@ version_info = _version_info(MAJOR, MINOR, MICRO, RELEV, SERIAL)
strictversion = version = debianversion = "%d.%d.%d" % version_info[:3] strictversion = version = debianversion = "%d.%d.%d" % version_info[:3]
if version_info.releaselevel != "final": if version_info.releaselevel != "final":
version += "-%s%s" % version_info[-2:] _prerelease = PRERELEASE_NORMALIZED_NAME[version_info[3]]
debianversion += "~adev%i" % version_info[-1] if RELEV == "dev" else "~%s%i" % version_info[-2:] version += "-%s%s" % (_prerelease, version_info[-1])
strictversion += PRERELEASE_NORMALIZED_NAME[version_info[3]] + str(version_info[-1]) debianversion += "~adev%i" % version_info[-1] if RELEV == "dev" else "~%s%i" % (_prerelease, version_info[-1])
strictversion += _prerelease + str(version_info[-1])
def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0): def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0):
...@@ -115,6 +116,5 @@ def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0): ...@@ -115,6 +116,5 @@ def calc_hexversion(major=0, minor=0, micro=0, releaselevel="dev", serial=0):
hexversion = calc_hexversion(*version_info) hexversion = calc_hexversion(*version_info)
if __name__ == "__main__": if __name__ == "__main__":
print(version) print(version)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment