Skip to content

Commit 2baf31d

Browse files
committed
add default_python replacement to sphinx
and get docs version from the package so it doesn't get out of date
1 parent 6d14754 commit 2baf31d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/source/conf.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,19 @@ def setup(app):
8080
# built documents.
8181
#
8282
# The short X.Y version.
83-
version = '0.1'
83+
import repo2docker
84+
version = repo2docker.__version__
8485
# The full version, including alpha/beta/rc tags.
85-
release = '0.1'
86+
release = version
87+
88+
from repo2docker.buildpacks.conda import CondaBuildPack
89+
90+
default_python = CondaBuildPack.major_pythons['3']
91+
92+
rst_prolog = """
93+
.. |default_python| replace:: **Python {default_python}**
94+
.. |default_python_version| replace:: {default_python}
95+
""".format(default_python=default_python)
8696

8797
# The language for content autogenerated by Sphinx. Refer to documentation
8898
# for a list of supported languages.

0 commit comments

Comments
 (0)