Skip to content

Commit 328bfbe

Browse files
authored
Merge pull request #165 from christopheNan/upgrade_venv
Makefile enhancement:
2 parents 146fb49 + e50f6b6 commit 328bfbe

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# - make merge # To merge pot from upstream
88
# - make fuzzy # To find fuzzy strings
99
# - make progress # To compute current progression
10+
# - make upgrade_venv # To upgrade the venv that compiles the doc
1011
#
1112
# Modes are: autobuild-stable, autobuild-dev, and autobuild-html,
1213
# documented in gen/src/3.6/Doc/Makefile as we're only delegating the
@@ -19,13 +20,14 @@ VENV := ~/.venvs/python-docs-i18n/
1920
PYTHON := $(shell which python3)
2021
MODE := autobuild-dev-html
2122
BRANCH = $(shell git describe --contains --all HEAD)
23+
JOBS = 1
2224

2325

2426
.PHONY: all
2527
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb $(SPHINX_CONF)
2628
mkdir -p $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/
2729
ln -nfs $(shell readlink -f .) $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
28-
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE)
30+
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE)
2931

3032

3133
$(SPHINX_CONF):
@@ -45,6 +47,11 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate
4547
. $(VENV)/bin/activate; python3 -m pip install blurb
4648

4749

50+
.PHONY: upgrade_venv
51+
upgrade_venv: $(VENV)/bin/activate
52+
. $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx blurb
53+
54+
4855
.PHONY: progress
4956
progress:
5057
@python3 -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \

0 commit comments

Comments
 (0)