#
# Patchwork documentation build configuration file
+import os
+import sys
+
try:
import sphinx_rtd_theme
has_rtd_theme = True
except ImportError:
has_rtd_theme = False
+PATCHWORK_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+sys.path.insert(0, PATCHWORK_DIR)
+
+from patchwork import VERSION # noqa
+
+
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-# TODO(stephenfin): Eventually this should read the version programmatically
-#
# The short X.Y version.
-version = u'2.0-alpha'
+version = '.'.join((str(x) for x in VERSION[:3]))
# The full version, including alpha/beta/rc tags.
-release = u'2.0-alpha'
+release = '.'.join((str(x) for x in VERSION))
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.