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