mirror of
https://gitlab.com/openlp/documentation.git
synced 2024-12-22 12:32:48 +00:00
"Added an environment variable to the API confi.py script so that it makes it easier to build on different machines."
bzr-revno: 127
This commit is contained in:
commit
3fc96ed390
@ -19,7 +19,10 @@ import os
|
|||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# 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
|
# 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.
|
# 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],
|
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'))
|
'..', '..', '..', '..', 'openlp', 'trunk'))
|
||||||
if not os.path.exists(path_to_code):
|
if not os.path.exists(path_to_code):
|
||||||
print('Incorrect path to code, expecting "%s"' % path_to_code)
|
print('Incorrect path to code, expecting "%s"' % path_to_code)
|
||||||
|
@ -82,6 +82,9 @@ def progress(queue, number):
|
|||||||
def main():
|
def main():
|
||||||
modules = []
|
modules = []
|
||||||
|
|
||||||
|
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],
|
path_to_code = os.path.abspath(os.path.join(os.path.split(__file__)[0],
|
||||||
'..', '..', '..', '..', 'openlp', 'trunk'))
|
'..', '..', '..', '..', 'openlp', 'trunk'))
|
||||||
if not os.path.exists(path_to_code):
|
if not os.path.exists(path_to_code):
|
||||||
@ -118,3 +121,4 @@ def main():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user