@@ -38,13 +38,13 @@ endef
38
38
export PRINT_HELP_PYSCRIPT # End of python section
39
39
40
40
CPYTHON_CLONE := ../cpython
41
+ VERSION := $(or $(VERSION ) , 3.12)
41
42
SPHINX_CONF := $(CPYTHON_CLONE ) /Doc/conf.py
42
43
LANGUAGE := zh_TW
43
44
LC_MESSAGES := $(CPYTHON_CLONE ) /Doc/locales/$(LANGUAGE ) /LC_MESSAGES
44
45
VENV := ~/.venvs/python-docs-i18n/
45
46
PYTHON := $(shell which python3)
46
47
MODE := autobuild-dev-html
47
- BRANCH := $(or $(VERSION ) , $(shell git describe --contains --all HEAD) )
48
48
JOBS := 4
49
49
50
50
.PHONY : all
82
82
83
83
clone : # # Clone latest cpython repository to `../cpython/` if it doesn't exist
84
84
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE ) || echo " cpython exists"
85
- cd $(CPYTHON_CLONE ) && git checkout $(BRANCH )
85
+ cd $(CPYTHON_CLONE ) && git checkout $(VERSION )
86
86
87
87
88
88
$(VENV ) /bin/activate :
@@ -119,9 +119,6 @@ todo: ## List remaining tasks
119
119
120
120
.PHONY : merge
121
121
merge : upgrade_venv # # To merge pot from upstream
122
- ifneq "$(shell cd $(CPYTHON_CLONE ) 2>/dev/null && git describe --contains --all HEAD) " "$(BRANCH ) "
123
- $(error "You're merging from a different branch")
124
- endif
125
122
(cd $( CPYTHON_CLONE) /Doc; rm -f build/NEWS)
126
123
(cd $( CPYTHON_CLONE) /Doc; $( VENV) /bin/sphinx-build -Q -b gettext -D gettext_compact=0 . locales/pot/)
127
124
find $(CPYTHON_CLONE ) /Doc/locales/pot/ -name ' *.pot' | \
@@ -140,7 +137,7 @@ endif
140
137
141
138
.PHONY : update_txconfig
142
139
update_txconfig :
143
- curl -L https://rawgit.com/python-doc-ja/cpython-doc-catalog/catalog-$(BRANCH ) /Doc/locales/.tx/config | \
140
+ curl -L https://rawgit.com/python-doc-ja/cpython-doc-catalog/catalog-$(VERSION ) /Doc/locales/.tx/config | \
144
141
grep --invert-match ' ^file_filter = *' | \
145
142
sed -e ' s/source_file = pot\/\(.*\)\.pot/trans.zh_TW = \1.po/' | \
146
143
sed -n ' w .tx/config'
0 commit comments