# Version numbers.
try:
from renpy.vc_version import official, nightly, version_name, version
except ImportError:
import renpy.versions
version_dict = renpy.versions.get_version()
official = version_dict["official"]
nightly = version_dict["nightly"]
version_name = version_dict["version_name"]
version = version_dict["version"]
official = official and getattr(site, "renpy_build_official", False)
VersionTuple = namedtuple("VersionTuple", ["major", "minor", "patch", "commit"])
version_tuple = VersionTuple(*(int(i) for i in version.split(".")))
# A string giving the version number only (8.0.1.123), with a suffix if needed.
version_only = ".".join(str(i) for i in version_tuple)
if not official:
version_only += "+unofficial"
elif nightly:
version_only += "+nightly"
# A verbose string giving the version.
version = "Ren'Py " + version_only