Switched OpenCV to a 3-component version number.

Epoch is gone; now the version component names in C++ and CMake
are consistent (except REVISION corresponds to PATCH).
This commit is contained in:
Roman Donchenko
2013-11-15 19:41:53 +04:00
parent b8c46f4cce
commit 615d6c22d1
11 changed files with 28 additions and 42 deletions

View File

@@ -61,19 +61,15 @@ copyright = u'2011-2013, opencv dev team'
# built documents.
version_file = open("../modules/core/include/opencv2/core/version.hpp", "rt").read()
version_epoch = re.search("^W*#\W*define\W+CV_VERSION_EPOCH\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_major = re.search("^W*#\W*define\W+CV_VERSION_MAJOR\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_minor = re.search("^W*#\W*define\W+CV_VERSION_MINOR\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_patch = re.search("^W*#\W*define\W+CV_VERSION_REVISION\W+(\d+)\W*$", version_file, re.MULTILINE).group(1)
version_status = re.search("^W*#\W*define\W+CV_VERSION_STATUS\W+\"(.*?)\"\W*$", version_file, re.MULTILINE).group(1)
# The short X.Y version.
version = version_epoch + '.' + version_major
version = version_major + '.' + version_minor
# The full version, including alpha/beta/rc tags.
release = version_epoch + '.' + version_major + '.' + version_minor
if version_patch:
release = release + '.' + version_patch
release += version_status
release = version_major + '.' + version_minor + '.' + version_patch + version_status
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.