Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit fcd97d4

Browse files
committedSep 5, 2017
Include additional changes to support blurbified NEWS (python#3340)
1 parent e295b82 commit fcd97d4

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed
 

‎.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ matrix:
4343
- cd Doc
4444
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
4545
# (Updating the version is fine as long as no warnings are raised by doing so.)
46-
- python -m pip install sphinx~=1.6.1
46+
- python -m pip install sphinx~=1.6.1 blurb
4747
script:
4848
- make check suspicious html SPHINXOPTS="-q -W -j4"
4949
- os: linux

‎Doc/Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# You can set these variables from the command line.
77
PYTHON = python3
88
SPHINXBUILD = sphinx-build
9+
BLURB = $(PYTHON) -m blurb
910
PAPER =
1011
SOURCES =
1112
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
@@ -38,6 +39,20 @@ help:
3839
@echo " serve to serve the documentation on the localhost (8000)"
3940

4041
build:
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

108123
venv:
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

112127
dist:
113128
rm -rf dist

‎Doc/whatsnew/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
Changelog
55
+++++++++
66

7-
.. miscnews:: ../../Misc/NEWS
7+
.. miscnews:: ../build/NEWS

0 commit comments

Comments
 (0)
Please sign in to comment.