File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -7,22 +7,23 @@ set -xeu
77
88# Fail earlier if required variables are not set
99test -n ${PYDOC_LANGUAGE+x}
10+ test -n ${PYDOC_VERSION+x}
1011
1112cd " $( dirname $0 ) /.."
1213mkdir -p logs
1314
1415# If version is 3.12 or older, set gettext_compact.
1516# This confval is not needed since 3.12.
1617# In 3.13, its presence messes 3.13's syntax checking (?)
18+ minor_version=${PYDOC_VERSION##* .}
1719opts=" -D language=${PYDOC_LANGUAGE} --keep-going -w ../../logs/sphinxwarnings.txt"
18- minor_version=$( git -C cpython/Doc branch --show-current | sed ' s|^3\.||' )
1920if [ $minor_version -lt 12 ]; then
2021 opts=" $opts -D gettext_compact=False"
2122fi
2223
2324make -C cpython/Doc html SPHINXOPTS=" ${opts} "
2425
25- # Remove empty file
26+ # Remove sphinxwarnings.txt if empty file
2627if [ ! -s logs/sphinxwarnings.txt ]; then
2728 rm logs/sphinxwarnings.txt
2829fi
Original file line number Diff line number Diff line change @@ -13,10 +13,18 @@ set -xeu
1313# Fail earlier if required variables are not set (do not expose TX_TOKEN)
1414test -n ${PYDOC_TX_PROJECT+x}
1515test -n ${PYDOC_LANGUAGE+x}
16+ test -n ${PYDOC_VERSION+x}
1617
1718# Make sure to run all commands from CPython docs locales directory
1819cd $( dirname $0 ) /../cpython/Doc/locales
1920
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+
2028# Generate message catalog template (.pot) files
2129# TODO: use `make -C .. gettext` when there are only Python >= 3.12
2230opts=' -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
3232pip install -r requirements.txt
3333make -C cpython/Doc venv
3434
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+
3552if ! command -v tx > /dev/null; then
3653 echo " WARNING: Transifex CLI tool was not found."
3754 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