File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ matrix:
4040 - cd Doc
4141 # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
4242 # (Updating the version is fine as long as no warnings are raised by doing so.)
43- - python -m pip install sphinx~=1.6.1
43+ - python -m pip install sphinx~=1.6.1 blurb
4444 script :
4545 - make check suspicious html SPHINXOPTS="-q -W -j4"
4646 - os : linux
Original file line number Diff line number Diff line change 66# You can set these variables from the command line.
77PYTHON = python3
88SPHINXBUILD = sphinx-build
9+ BLURB = $(PYTHON ) -m blurb
910PAPER =
1011SOURCES =
1112DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py)
3839 @echo " serve to serve the documentation on the localhost (8000)"
3940
4041build :
42+ -mkdir -p build
43+ # Look first for a Misc/NEWS file (building from a source release tarball
44+ # or old repo) and use that, otherwise look for a Misc/NEWS.d directory
45+ # (building from a newer repo) and use blurb to generate the NEWS file.
46+ @if [ -f ../Misc/NEWS ] ; then \
47+ echo "Using existing Misc/NEWS file"; \
48+ cp ../Misc/NEWS build/NEWS; \
49+ elif [ -d ../Misc/NEWS.d ]; then \
50+ echo "Building NEWS from Misc/NEWS.d with blurb"; \
51+ $(BLURB) merge -f build/NEWS; \
52+ else \
53+ echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
54+ exit 1; \
55+ fi
4156 $(SPHINXBUILD) $(ALLSPHINXOPTS)
4257 @echo
4358
@@ -107,7 +122,7 @@ clean:
107122
108123venv :
109124 $(PYTHON ) -m venv venv
110- ./venv/bin/python3 -m pip install -U Sphinx
125+ ./venv/bin/python3 -m pip install -U Sphinx blurb
111126
112127dist :
113128 rm -rf dist
Original file line number Diff line number Diff line change 44Changelog
55+++++++++
66
7- .. miscnews :: ../../Misc /NEWS
7+ .. miscnews :: ../build /NEWS
You can’t perform that action at this time.
0 commit comments