Commit 1d80353b authored by Matt Traudt's avatar Matt Traudt
Browse files

Switch back to finding sbws's version the hard way in docs

ReadTheDocs doesn't install sbws so we can't import the version.
So we have to essentially grep for it.
parent af7a4aca
......@@ -13,9 +13,13 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join('.' '../', '../')))
from sbws import version as __version__
def find_version():
with open(os.path.join("..", "..", "sbws", "__init__.py")) as fp:
for line in fp:
if "version" in line.strip():
version = line.split("=", 1)[1].strip().strip("'")
return version
# -- Project information -----------------------------------------------------
......@@ -24,7 +28,7 @@ copyright = 'Public Domain'
author = 'Matt Traudt'
# The short X.Y version
version = __version__
version = find_version()
# The full version, including alpha/beta/rc tags
release = version
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment