-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
43 lines (37 loc) · 1.43 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[tox]
envlist = py3-html
skipsdist = true
[testenv]
deps =
-r requirements/build.txt
[testenv:py3-intl]
commands =
sphinx-build -b gettext source build/locale
# Do now wrap lines in the .pot files
sphinx-intl update -p build/locale -l zh_CN --line-width=10000
sphinx-build -E -W --keep-going -b html -D language=zh_CN source build/html/zh_CN -j auto
[testenv:py3-html]
commands =
sphinx-build -E -W --keep-going -b html source build/html -j auto
[testenv:py3-pdf]
allowlist_externals =
sh
commands =
# Builds are not only handled by sphinx, so we need to clean the build dir.
sh -c 'find build/latex -type f -delete 2>/dev/null || true'
sphinx-build -M latex -d build -D language=en source build/latex/en -W --keep-going -j auto
sphinx-build -M latex -d build -D language=zh_CN source build/latex/zh_CN -W --keep-going -j auto
sh -c 'make -C build/latex/en -j $(nproc) --keep-going LATEXMKOPTS="-silent"'
sh -c 'make -C build/latex/zh_CN -j $(nproc) --keep-going LATEXMKOPTS="-silent"'
sh -c 'mkdir -p build/html/_static'
sh -c 'cp build/latex/en/*.pdf build/html/_static/'
sh -c 'mkdir -p build/html/zh_CN/_static'
sh -c 'cp build/latex/zh_CN/*.pdf build/html/zh_CN/_static/'
[testenv:py3-linkcheck]
commands =
sphinx-build -b linkcheck source build/linkcheck -j auto
[testenv:py3-spellcheck]
deps =
-r requirements/checks.txt
commands =
codespell source/ -I .codespellignore