Skip to content

Commit 749c02f

Browse files
committed
Include version number automatically in documentation.
1 parent f2eff65 commit 749c02f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/source/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import sys
1616
import os
1717

18+
__here__ = os.path.abspath(os.path.dirname(__file__))
19+
1820
# If extensions (or modules to document with autodoc) are in another directory,
1921
# add these directories to sys.path here. If the directory is relative to the
2022
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -55,10 +57,11 @@
5557
# |version| and |release|, also used in various other places throughout the
5658
# built documents.
5759
#
60+
exec(open(os.path.join(__here__, '..', '..', 'pytest_ordering', '_version.py')).read())
5861
# The short X.Y version.
59-
version = '0.1'
62+
version = __version__
6063
# The full version, including alpha/beta/rc tags.
61-
release = '0.1'
64+
release = __version__
6265

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

0 commit comments

Comments
 (0)