Skip PDF building of manual for Chinese as it fails

This commit is contained in:
Kovid Goyal 2020-07-31 09:56:18 +05:30
parent 8861f5019a
commit 7da3dd1b66
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -40,7 +40,7 @@ def sphinx_build(language, base, builder='html', bdir='html', t=None, quiet=True
def build_manual(language, base): def build_manual(language, base):
sb = partial(sphinx_build, language, base) sb = partial(sphinx_build, language, base)
skip_pdf = language == 'tr' skip_pdf = language == 'tr' or 'zh' in language
onlinedir = sb(t='online') onlinedir = sb(t='online')
epubdir = sb('myepub', 'epub') epubdir = sb('myepub', 'epub')
latexdir = sb('mylatex', 'latex') latexdir = sb('mylatex', 'latex')
@ -73,7 +73,7 @@ def build_manual(language, base):
def build_pot(base): def build_pot(base):
cmd = [SPHINX_BUILD, '-b', 'gettext', '-t', 'online', '-t', 'gettext', '.', base] cmd = [SPHINX_BUILD, '-b', 'gettext', '-t', 'online', '-t', 'gettext', '.', base]
print (' '.join(cmd)) print(' '.join(cmd))
subprocess.check_call(cmd) subprocess.check_call(cmd)
os.remove(j(base, 'generated.pot')) os.remove(j(base, 'generated.pot'))
return base return base
@ -81,7 +81,7 @@ def build_pot(base):
def build_linkcheck(base): def build_linkcheck(base):
cmd = [SPHINX_BUILD, '-b', 'linkcheck', '-t', 'online', '-t', 'linkcheck', '.', base] cmd = [SPHINX_BUILD, '-b', 'linkcheck', '-t', 'online', '-t', 'linkcheck', '.', base]
print (' '.join(cmd)) print(' '.join(cmd))
subprocess.check_call(cmd) subprocess.check_call(cmd)
return base return base
@ -103,7 +103,7 @@ if __name__ == '__main__':
import json import json
os.environ['ALL_USER_MANUAL_LANGUAGES'] = ' '.join(json.load(open('locale/completed.json', 'rb'))) os.environ['ALL_USER_MANUAL_LANGUAGES'] = ' '.join(json.load(open('locale/completed.json', 'rb')))
sphinx_build(language, base, t='online', quiet=False) sphinx_build(language, base, t='online', quiet=False)
print ('Manual built in', j(base, 'html')) print('Manual built in', j(base, 'html'))
else: else:
p = argparse.ArgumentParser() p = argparse.ArgumentParser()
p.add_argument('language', help='The language to build for') p.add_argument('language', help='The language to build for')
@ -122,4 +122,4 @@ if __name__ == '__main__':
else: else:
os.environ['CALIBRE_OVERRIDE_LANG'] = language os.environ['CALIBRE_OVERRIDE_LANG'] = language
build_manual(language, base) build_manual(language, base)
print ('Manual for', language, 'built in', j(base, 'html')) print('Manual for', language, 'built in', j(base, 'html'))