Skip to content

Commit c11e07e

Browse files
authored
lint.sh: run gettext builder instead if script
Running the script brings unneeded extra requirements
1 parent 8a98467 commit c11e07e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

scripts/lint.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,23 @@ cd "$rootdir"
1818
mkdir -p logs
1919
touch logs/sphinxlint.txt
2020

21-
# Disable literal blocks and update PO
22-
sed -i "/^\s*'literal-block',/s/ '/ #'/" cpython/Doc/conf.py
23-
./scripts/generate_templates.sh
24-
sphinx-intl update -d cpython/Doc/locale -p cpython/Doc/build/gettext -l pt_BR
21+
cd cpython/Doc
2522

26-
cd cpython/Doc/locale/${PYDOC_LANGUAGE}/LC_MESSAGES
23+
# Disable literal blocks and update PO
24+
sed -i "/^\s*'literal-block',/s/ '/ #'/" conf.py
25+
# TODO: use `make -C .. gettext` when there are only Python >= 3.12
26+
opts='-E -b gettext -D gettext_compact=0 -d build/.doctrees . build/gettext'
27+
make -C .. build ALLSPHINXOPTS="$opts"
28+
# Update translation files with latest POT
29+
sphinx-intl update -d locale -p build/gettext -l pt_BR
30+
31+
cd ${PYDOC_LANGUAGE}/LC_MESSAGES
2732
sphinx-lint | tee $(realpath "$rootdir/logs/sphinxlint.txt")
2833

2934
# Undo changes that disabled literal blocks
3035
git checkout *.po
3136

32-
cd $OLDPWD
37+
cd "$rootdir"
3338

3439
# Remove empty file
3540
if [ ! -s logs/sphinxlint.txt ]; then

0 commit comments

Comments
 (0)