Skip to content

Commit 424eeda

Browse files
committed
Automatically pull version information for API docs from setup file
1 parent b04b846 commit 424eeda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import sys
1616
import os
17+
import pkg_resources
1718

1819
# If extensions (or modules to document with autodoc) are in another directory,
1920
# add these directories to sys.path here. If the directory is relative to the
@@ -64,9 +65,9 @@ def setup(app):
6465
# built documents.
6566
#
6667
# The short X.Y version.
67-
version = '0.0.2'
68+
version = pkg_resources.require("tincan")[0].version
6869
# The full version, including alpha/beta/rc tags.
69-
release = '0.0.2'
70+
release = pkg_resources.require("tincan")[0].version
7071

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

0 commit comments

Comments
 (0)