← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~raoul-snyman/openlp/make-api-docs-easier-to-build into lp:openlp/documentation

 

Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/make-api-docs-easier-to-build into lp:openlp/documentation.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/make-api-docs-easier-to-build/+merge/274780

Added an environment variable to the API confi.py script so that it makes it easier to build on different machines.
-- 
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/make-api-docs-easier-to-build into lp:openlp/documentation.
=== modified file 'api/source/conf.py'
--- api/source/conf.py	2015-09-11 11:17:57 +0000
+++ api/source/conf.py	2015-10-16 20:40:30 +0000
@@ -19,8 +19,11 @@
 # 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.
-path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0],
-                                            '..', '..', '..', '..', 'openlp', 'trunk'))
+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):
     print('Incorrect path to code, expecting "%s"' % path_to_code)
     sys.exit(1)


Follow ups