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

Commit59b919b

Browse files
[3.13]GH-125722: Use long options for Sphinx (GH-129039) (#129041)
GH-125722: Use long options for Sphinx (GH-129039)(cherry picked from commit4967fa6)Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent5fe7650 commit59b919b

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

‎.github/workflows/reusable-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
continue-on-error:true
6666
run:|
6767
set -Eeuo pipefail
68-
# Build docs with the'-n' (nit-picky) option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
68+
# Build docs with the nit-picky option; write warnings to file
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
7070
-name:'Check warnings'
7171
if:github.event_name == 'pull_request'
7272
run:|
@@ -101,4 +101,4 @@ jobs:
101101
run:make -C Doc/ PYTHON=../python venv
102102
# Use "xvfb-run" since some doctest tests open GUI windows
103103
-name:'Run documentation doctest'
104-
run:xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
104+
run:xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest

‎Doc/Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ PAPER =
1414
SOURCES =
1515
DISTVERSION =$(shell$(PYTHON) tools/extensions/patchlevel.py)
1616
REQUIREMENTS = requirements.txt
17-
SPHINXERRORHANDLING = -W
17+
SPHINXERRORHANDLING = --fail-on-warning
1818

1919
# Internal variables.
20-
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
21-
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
20+
PAPEROPT_a4 = --define latex_elements.papersize=a4paper
21+
PAPEROPT_letter = --define latex_elements.papersize=letterpaper
2222

23-
ALLSPHINXOPTS = -b$(BUILDER)\
24-
-d build/doctrees\
25-
-j$(JOBS)\
23+
ALLSPHINXOPTS = --builder$(BUILDER)\
24+
--doctree-dir build/doctrees\
25+
--jobs$(JOBS)\
2626
$(PAPEROPT_$(PAPER))\
2727
$(SPHINXOPTS)$(SPHINXERRORHANDLING)\
2828
. build/$(BUILDER)$(SOURCES)
@@ -144,7 +144,7 @@ pydoc-topics: build
144144

145145
.PHONY: gettext
146146
gettext: BUILDER = gettext
147-
gettext: override SPHINXOPTS := -d build/doctrees-gettext$(SPHINXOPTS)
147+
gettext: override SPHINXOPTS := --doctree-dir build/doctrees-gettext$(SPHINXOPTS)
148148
gettext: build
149149

150150
.PHONY: htmlview
@@ -300,20 +300,20 @@ serve:
300300
# By default, Sphinx only rebuilds pages where the page content has changed.
301301
# This means it doesn't always pick up changes to preferred link targets, etc
302302
# To ensure such changes are picked up, we build the published docs with
303-
# `-E` (to ignore the cached environment) and `-a` (to ignore already existing
304-
# output files)
303+
# ``--fresh-env`` (to ignore the cached environment) and ``--write-all``
304+
#(to ignore already existingoutput files)
305305

306306
# for development releases: always build
307307
.PHONY: autobuild-dev
308308
autobuild-dev: DISTVERSION =$(shell$(PYTHON) tools/extensions/patchlevel.py --short)
309309
autobuild-dev:
310-
$(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
310+
$(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION)
311311

312312
# for HTML-only rebuilds
313313
.PHONY: autobuild-dev-html
314314
autobuild-dev-html: DISTVERSION =$(shell$(PYTHON) tools/extensions/patchlevel.py --short)
315315
autobuild-dev-html:
316-
$(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
316+
$(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION)
317317

318318
# for stable releases: only build if not in pre-release stage (alpha, beta)
319319
# release candidate downloads are okay, since the stable tree can be in that stage

‎Doc/make.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ if exist ..\Misc\NEWS (
144144
)
145145

146146
ifdefined PAPER (
147-
setSPHINXOPTS=-D latex_elements.papersize=%PAPER%%SPHINXOPTS%
147+
setSPHINXOPTS=--define latex_elements.papersize=%PAPER%%SPHINXOPTS%
148148
)
149149
if"%1"EQU"htmlhelp" (
150-
setSPHINXOPTS=-D html_theme_options.body_max_width=none%SPHINXOPTS%
150+
setSPHINXOPTS=--define html_theme_options.body_max_width=none%SPHINXOPTS%
151151
)
152-
cmd /S /C"%SPHINXBUILD%%SPHINXOPTS% -b%1 -dbuild\doctrees ."%BUILDDIR%\%1"%2%3%4%5%6%7%8%9"
152+
cmd /S /C"%SPHINXBUILD%%SPHINXOPTS% --builder%1 --doctree-dir build\doctrees ."%BUILDDIR%\%1"%2%3%4%5%6%7%8%9"
153153

154154
if"%1"EQU"htmlhelp" (
155155
"%HTMLHELP%""%BUILDDIR%\htmlhelp\python%DISTVERSION:.=%.hhp"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp