Skip to content
Snippets Groups Projects
Commit 1d36c197 authored by Anton Joubert's avatar Anton Joubert
Browse files

Fix doc build

Importing `ska.base.release` causes `ska.base.__init__.py` to be
imported first.  That in turn needs dependencies like PyTango to
be installed, which we don't have in the RTD environment.  The
workaround is to read the file directly, similar to what is
done in the `setup.py`.
parent d877800d
Branches
Tags
No related merge requests found
......@@ -47,7 +47,6 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../src'))
from ska.base import release
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
......@@ -77,16 +76,24 @@ master_doc = 'index'
# General information about the project.
project = u'LMC Base Classes'
copyright = u'2019, NCRA India'
copyright = u'2019, NCRA India and SARAO'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
def get_release_version():
release_filename = os.path.join("..", "..", "src", "ska", "base", "release.py")
exec(open(release_filename).read())
return locals()["version"]
release_version = get_release_version()
# The short X.Y version.
version = release.version
version = release_version
# The full version, including alpha/beta/rc tags.
release = release.version
release = release_version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment