← 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:
  Jonathan Springer (springermac)
  Tim Bentley (trb143)

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

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 subscribed to branch 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:45:18 +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)

=== modified file 'api/source/scan.py'
--- api/source/scan.py	2015-09-08 21:28:08 +0000
+++ api/source/scan.py	2015-10-16 20:45:18 +0000
@@ -82,8 +82,11 @@
 def main():
     modules = []
 
-    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)
@@ -118,3 +121,4 @@
 
 if __name__ == '__main__':
     main()
+


Follow ups