summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2017-09-05 07:10:31 (GMT)
committerNed Deily <nad@python.org>2017-09-05 07:46:18 (GMT)
commitfcd97d44382df520e39de477a5ec99dd89c3fda8 (patch)
treea08ff5bf3750396cf3c35f087628fd3d4163cfeb
parente295b826099ecad6926d4f95e3f739b3ecdc3cc7 (diff)
downloadcpython-fcd97d44382df520e39de477a5ec99dd89c3fda8.zip
cpython-fcd97d44382df520e39de477a5ec99dd89c3fda8.tar.gz
cpython-fcd97d44382df520e39de477a5ec99dd89c3fda8.tar.bz2
Include additional changes to support blurbified NEWS (#3340)
-rw-r--r--.travis.yml2
-rw-r--r--Doc/Makefile17
-rw-r--r--Doc/whatsnew/changelog.rst2
3 files changed, 18 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index 65033fb..c4ae89c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,7 +43,7 @@ matrix:
- cd Doc
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
# (Updating the version is fine as long as no warnings are raised by doing so.)
- - python -m pip install sphinx~=1.6.1
+ - python -m pip install sphinx~=1.6.1 blurb
script:
- make check suspicious html SPHINXOPTS="-q -W -j4"
- os: linux
diff --git a/Doc/Makefile b/Doc/Makefile
index 526269d..63bbe1d 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -6,6 +6,7 @@
# You can set these variables from the command line.
PYTHON = python3
SPHINXBUILD = sphinx-build
+BLURB = $(PYTHON) -m blurb
PAPER =
SOURCES =
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
@@ -38,6 +39,20 @@ help:
@echo " serve to serve the documentation on the localhost (8000)"
build:
+ -mkdir -p build
+# Look first for a Misc/NEWS file (building from a source release tarball
+# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
+# (building from a newer repo) and use blurb to generate the NEWS file.
+ @if [ -f ../Misc/NEWS ] ; then \
+ echo "Using existing Misc/NEWS file"; \
+ cp ../Misc/NEWS build/NEWS; \
+ elif [ -d ../Misc/NEWS.d ]; then \
+ echo "Building NEWS from Misc/NEWS.d with blurb"; \
+ $(BLURB) merge -f build/NEWS; \
+ else \
+ echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
+ exit 1; \
+ fi
$(SPHINXBUILD) $(ALLSPHINXOPTS)
@echo
@@ -107,7 +122,7 @@ clean:
venv:
$(PYTHON) -m venv venv
- ./venv/bin/python3 -m pip install -U Sphinx
+ ./venv/bin/python3 -m pip install -U Sphinx blurb
dist:
rm -rf dist
diff --git a/Doc/whatsnew/changelog.rst b/Doc/whatsnew/changelog.rst
index 67a12f3..b435614 100644
--- a/Doc/whatsnew/changelog.rst
+++ b/Doc/whatsnew/changelog.rst
@@ -4,4 +4,4 @@
Changelog
+++++++++
-.. miscnews:: ../../Misc/NEWS
+.. miscnews:: ../build/NEWS