Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite54aa0a

Browse files
committed
refactor(make): make 3.12 as default build version
1 parentc1af59e commite54aa0a

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

‎Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ endef
3838
exportPRINT_HELP_PYSCRIPT# End of python section
3939

4040
CPYTHON_CLONE := ../cpython
41+
VERSION :=$(or$(VERSION), 3.12)
4142
SPHINX_CONF :=$(CPYTHON_CLONE)/Doc/conf.py
4243
LANGUAGE := zh_TW
4344
LC_MESSAGES :=$(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
4445
VENV := ~/.venvs/python-docs-i18n/
4546
PYTHON :=$(shell which python3)
4647
MODE := autobuild-dev-html
47-
BRANCH :=$(or$(VERSION),$(shell git describe --contains --all HEAD))
4848
JOBS := 4
4949

5050
.PHONY: all
@@ -82,7 +82,7 @@ help:
8282

8383
clone:## Clone latest cpython repository to `../cpython/` if it doesn't exist
8484
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)
8686

8787

8888
$(VENV)/bin/activate:
@@ -119,9 +119,6 @@ todo: ## List remaining tasks
119119

120120
.PHONY: merge
121121
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
125122
(cd$(CPYTHON_CLONE)/Doc; rm -f build/NEWS)
126123
(cd$(CPYTHON_CLONE)/Doc;$(VENV)/bin/sphinx-build -Q -b gettext -D gettext_compact=0. locales/pot/)
127124
find$(CPYTHON_CLONE)/Doc/locales/pot/ -name'*.pot'|\
@@ -140,7 +137,7 @@ endif
140137

141138
.PHONY: update_txconfig
142139
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|\
144141
grep --invert-match'^file_filter = *'|\
145142
sed -e's/source_file = pot\/\(.*\)\.pot/trans.zh_TW = \1.po/'|\
146143
sed -n'w .tx/config'

‎README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,17 @@ the PSF for inclusion in the documentation.
142142

143143
3. 存檔以後,執行以下列指令編譯輸出完整文件,以確保你的修改沒有 reST 的語法錯誤或警告 ::
144144

145-
VERSION=3.12make all
145+
make all
146146

147147
或者只想快速檢查是否有 reST 語法錯誤 ::
148148

149-
VERSION=3.12make lint
149+
make lint
150150

151151
確保輸出中沒有任何關於正在翻譯的檔案的警告訊息。
152152

153153
在 ``make all`` 後,可以使用 ``make build`` 來只對單一 ``.po`` 檔進行編譯,可以節省較多的時間 ::
154154

155-
VERSION=3.12make build glossary.po
155+
make build glossary.po
156156

157157
如果你還沒有執行 `維護、預覽`_ 的 clone CPython 的動作,此指令會自動幫你 clone CPython,\
158158
並且會使用 Sphinx 幫你檢查 reST 語法錯誤,我們盡量保持沒有 warning \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp