diff options
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/conf.py b/docs/conf.py index ee5a7c5..91fe9c9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,8 +22,16 @@ copyright = '2019, Thomas Touhey' author = 'Thomas Touhey' # The full version, including alpha/beta/rc tags -release = '0.3' +def _get_release(): + from os.path import dirname, join + from pkg_resources import find_distributions as find_dist + + module_path = join(dirname(__file__), '..') + dist = next(find_dist(module_path, True)) + return dist.version + +release = _get_release() # -- General configuration --------------------------------------------------- |