From 2baf31dc8ae450e9bd2d68ff5fc269144687118e Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 21 Feb 2019 10:07:54 +0100 Subject: [PATCH] add default_python replacement to sphinx and get docs version from the package so it doesn't get out of date --- docs/source/conf.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 31384737..db48d094 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -80,9 +80,19 @@ author = 'Project Jupyter' # built documents. # # The short X.Y version. -version = '0.1' +import repo2docker +version = repo2docker.__version__ # The full version, including alpha/beta/rc tags. -release = '0.1' +release = version + +from repo2docker.buildpacks.conda import CondaBuildPack + +default_python = CondaBuildPack.major_pythons['3'] + +rst_prolog = """ +.. |default_python| replace:: **Python {default_python}** +.. |default_python_version| replace:: {default_python} +""".format(default_python=default_python) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.