Skip to content

Commit c0c633b

Browse files
committed
Configuration to properly generate french and japanese PDF.
This will have to be ported to cpython Doc/conf.py, if we find a way to do it cleanly. For the moment, it looks like we don't know the language in conf.py so it's hard.
1 parent 2d5ce62 commit c0c633b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

build_docs.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@
5353
'ko'
5454
]
5555

56+
SPHINXOPTS = {
57+
'ja': ['-D latex_engine=platex',
58+
'-D latex_elements.inputenc=',
59+
'-D latex_elements.fontenc='],
60+
'fr': ['-D latex_engine=xelatex',
61+
'-D latex_elements.inputenc=',
62+
'-D latex_elements.fontenc='],
63+
'en': ['-D latex_engine=xelatex',
64+
'-D latex_elements.inputenc=',
65+
'-D latex_elements.fontenc=']
66+
}
67+
5668

5769
def _file_unchanged(old, new):
5870
with open(old, "rb") as fp1, open(new, "rb") as fp2:
@@ -163,7 +175,8 @@ def build_one(version, git_branch, isdev, quick, venv, build_root, www_root,
163175
lang=language if language != 'en' else ''))
164176
logging.info("Build start for version: %s, language: %s",
165177
str(version), language)
166-
sphinxopts = ['-j4']
178+
sphinxopts = SPHINXOPTS[language].copy()
179+
sphinxopts.append('-j4')
167180
if language == 'en':
168181
target = os.path.join(www_root, str(version))
169182
else:

0 commit comments

Comments
 (0)