Skip to content

Commit

Permalink
fixing sphinx config for Read the Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Feb 27, 2020
1 parent 8622adc commit e8e8fd0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/conf.py
Expand Up @@ -57,7 +57,16 @@
# built documents.
#
# The short X.Y version.
from migration_test_repo._version import __version__ as version
import re
filename = os.path.join(os.path.dirname(__file__), "..", "migration_test_repo", "_version.py")
if os.path.isfile(filename):
verstrline = open(filename, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
version = mo.group(1)
else:
version = None
# The full version, including alpha/beta/rc tags.
release = version

Expand Down

0 comments on commit e8e8fd0

Please sign in to comment.