-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·28 lines (22 loc) · 743 Bytes
/
build.sh
File metadata and controls
executable file
·28 lines (22 loc) · 743 Bytes
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
#!/bin/sh
# Build translated docs to pop up errors
#
# SPDX-License-Identifier: CC0-1.0
set -xeu
# Fail earlier if required variables are not set
test -n ${PYDOC_LANGUAGE+x}
cd "$(dirname $0)/.."
mkdir -p logs
# If version is 3.12 or older, set gettext_compact.
# This confval is not needed since 3.12.
# In 3.13, its presence messes 3.13's syntax checking (?)
opts="-D language=${PYDOC_LANGUAGE} --keep-going -w ../../logs/sphinxwarnings.txt"
minor_version=$(git -C cpython/Doc branch --show-current | sed 's|^3\.||')
if [ $minor_version -lt 12 ]; then
opts="$opts -D gettext_compact=False"
fi
make -C cpython/Doc html SPHINXOPTS="${opts}"
# Remove empty file
if [ ! -s logs/sphinxwarnings.txt ]; then
rm logs/sphinxwarnings.txt
fi