Add an environment variable to the API build process, to make it easier to biuld your own API docs

This commit is contained in:
Raoul Snyman 2015-10-16 22:24:24 +02:00
parent aae9ce667e
commit 03a7b3516b

View File

@ -19,6 +19,9 @@ import os
# If extensions (or modules to document with autodoc) are in another directory,
# 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.
if 'OPENLP_SOURCE' in os.environ:
path_to_code = os.path.abspath(os.environ['OPENLP_SOURCE'])
else:
path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0],
'..', '..', '..', '..', 'openlp', 'trunk'))
if not os.path.exists(path_to_code):