File tree 3 files changed +28
-2
lines changed
3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -7,22 +7,23 @@ set -xeu
7
7
8
8
# Fail earlier if required variables are not set
9
9
test -n ${PYDOC_LANGUAGE+x}
10
+ test -n ${PYDOC_VERSION+x}
10
11
11
12
cd " $( dirname $0 ) /.."
12
13
mkdir -p logs
13
14
14
15
# If version is 3.12 or older, set gettext_compact.
15
16
# This confval is not needed since 3.12.
16
17
# In 3.13, its presence messes 3.13's syntax checking (?)
18
+ minor_version=${PYDOC_VERSION##* .}
17
19
opts=" -D language=${PYDOC_LANGUAGE} --keep-going -w ../../logs/sphinxwarnings.txt"
18
- minor_version=$( git -C cpython/Doc branch --show-current | sed ' s|^3\.||' )
19
20
if [ $minor_version -lt 12 ]; then
20
21
opts=" $opts -D gettext_compact=False"
21
22
fi
22
23
23
24
make -C cpython/Doc html SPHINXOPTS=" ${opts} "
24
25
25
- # Remove empty file
26
+ # Remove sphinxwarnings.txt if empty file
26
27
if [ ! -s logs/sphinxwarnings.txt ]; then
27
28
rm logs/sphinxwarnings.txt
28
29
fi
Original file line number Diff line number Diff line change @@ -13,10 +13,18 @@ set -xeu
13
13
# Fail earlier if required variables are not set (do not expose TX_TOKEN)
14
14
test -n ${PYDOC_TX_PROJECT+x}
15
15
test -n ${PYDOC_LANGUAGE+x}
16
+ test -n ${PYDOC_VERSION+x}
16
17
17
18
# Make sure to run all commands from CPython docs locales directory
18
19
cd $( dirname $0 ) /../cpython/Doc/locales
19
20
21
+ # Python 3.7: Add missing sections to satisfy Blurb's check
22
+ # Useful if setup.sh was not ran
23
+ if [[ ${PYDOC_VERSION} == ' 3.7' ]] && [ ! -f ../../114553.patch ]; then
24
+ curl -L https://github.com/python/cpython/pull/114553.patch -o ../../114553.patch
25
+ git apply ../../114553.patch
26
+ fi
27
+
20
28
# Generate message catalog template (.pot) files
21
29
# TODO: use `make -C .. gettext` when there are only Python >= 3.12
22
30
opts=' -E -b gettext -D gettext_compact=0 -d build/.doctrees . build/gettext'
Original file line number Diff line number Diff line change @@ -32,6 +32,23 @@ set -u
32
32
pip install -r requirements.txt
33
33
make -C cpython/Doc venv
34
34
35
+
36
+ if [[ ${PYDOC_VERSION} == ' 3.7' ]]; then
37
+ # Fixes circular dependencies that affects Python 3.7, see:
38
+ # https://github.com/sphinx-doc/sphinx/issues/11567
39
+ # https://github.com/bazelbuild/rules_python/pull/1166
40
+ cpython/Doc/venv/bin/pip install \
41
+ sphinxcontrib-applehelp==1.0.4 \
42
+ sphinxcontrib-devhelp==1.0.2 \
43
+ sphinxcontrib-htmlhelp==2.0.1 \
44
+ sphinxcontrib-qthelp==1.0.3 \
45
+ sphinxcontrib-serializinghtml==1.1.5 \
46
+ alabaster==0.7.13
47
+ # Add missing sections to satisfy Blurb's check
48
+ curl -L https://github.com/python/cpython/pull/114553.patch -o ../../114553.patch
49
+ git apply ../../114553.patch
50
+ fi
51
+
35
52
if ! command -v tx > /dev/null; then
36
53
echo " WARNING: Transifex CLI tool was not found."
37
54
echo " If going to pull translations it is needed, can be ignored otherwise."
You can’t perform that action at this time.
0 commit comments