Clean up trailing whitespace.

This commit is contained in:
Elliott Sales de Andrade
2016-05-18 05:47:34 -04:00
parent 15fcf1ed85
commit 28b722b92d
8 changed files with 119 additions and 119 deletions

View File

@ -24,7 +24,7 @@
"""
update_doc.py for Gramps API(s) documentation.
Examples:
Examples:
python update_doc.py -t
Tests if 'sphinx' and 'python' are well configured.
@ -39,7 +39,7 @@ from argparse import ArgumentParser
# You can set these variables from the command line.
SPHINXBUILD = 'sphinx-build'
if sys.platform == 'win32':
if sys.platform == 'win32':
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
@ -60,7 +60,7 @@ def tests():
os.system('''%(program)s -V''' % {'program': pythonCmd})
except:
print ('Please, install python')
try:
print("\n=================='Shpinx-build'=============================\n")
os.system('''%(program)s''' % {'program': sphinxCmd})
@ -72,38 +72,38 @@ def main():
The utility for handling documentation stuff.
What is need by Gramps, nothing more.
"""
parser = ArgumentParser(
description='This program aims to handle manual'
' and translated version.',
parser = ArgumentParser(
description='This program aims to handle manual'
' and translated version.',
)
parser.add_argument("-t", "--test",
action="store_true", dest="test", default=True,
help="test if 'python' and 'sphinx' are properly installed")
parser.add_argument("-b", "--build",
action="store_true", dest="build", default=True,
help="build documentation")
args = parser.parse_args()
if args.test:
tests()
if args.build:
build()
def build():
"""
Build documentation.
"""
# testing stage
os.system('''%(program)s -b html . _build/html''' % {'program': sphinxCmd})
os.system('''%(program)s -b changes . _build/changes''' % {'program': sphinxCmd})
os.system('''%(program)s -b linkcheck . _build/linkcheck''' % {'program': sphinxCmd})
if __name__ == "__main__":
main()