|
|
@ -60,6 +60,9 @@ copyright = u'2017, OpenMW Team'
|
|
|
|
# The short X.Y version.
|
|
|
|
# The short X.Y version.
|
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
release = version = "UNRELEASED"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_openmw_version(haystack):
|
|
|
|
def get_openmw_version(haystack):
|
|
|
|
needle = 'OPENMW_VERSION_MAJOR'
|
|
|
|
needle = 'OPENMW_VERSION_MAJOR'
|
|
|
|
line_counter = 0
|
|
|
|
line_counter = 0
|
|
|
@ -68,9 +71,6 @@ def get_openmw_version(haystack):
|
|
|
|
break
|
|
|
|
break
|
|
|
|
line_counter += 1
|
|
|
|
line_counter += 1
|
|
|
|
|
|
|
|
|
|
|
|
if line_counter == 0:
|
|
|
|
|
|
|
|
raise ImportError('Unable to find OpenMW Version')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version = '.'.join([haystack[line_counter][1][1].contents,
|
|
|
|
version = '.'.join([haystack[line_counter][1][1].contents,
|
|
|
|
haystack[line_counter+1][1][1].contents,
|
|
|
|
haystack[line_counter+1][1][1].contents,
|
|
|
|
haystack[line_counter+2][1][1].contents])
|
|
|
|
haystack[line_counter+2][1][1].contents])
|
|
|
@ -83,9 +83,9 @@ try:
|
|
|
|
cmake_data = parsing.parse(cmake_raw)
|
|
|
|
cmake_data = parsing.parse(cmake_raw)
|
|
|
|
release = version = get_openmw_version(cmake_data)
|
|
|
|
release = version = get_openmw_version(cmake_data)
|
|
|
|
|
|
|
|
|
|
|
|
except ImportError:
|
|
|
|
except Exception as ex:
|
|
|
|
release = "UNRELEASED"
|
|
|
|
print("WARNING: Version will be set to '{0}' because: '{1}'.".format(release, str(ex)))
|
|
|
|
print("WARNING: Unable to import parse_cmake, version will be set to: {0}.".format(release))
|
|
|
|
import traceback; traceback.print_exc()
|
|
|
|
|
|
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
|
# for a list of supported languages.
|
|
|
|
# for a list of supported languages.
|
|
|
|