]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Ensure Doc build has Misc/NEWS for changelog
authorNed Deily <nad@python.org>
Thu, 7 Sep 2017 02:17:08 +0000 (19:17 -0700)
committerNed Deily <nad@python.org>
Thu, 7 Sep 2017 02:31:55 +0000 (19:31 -0700)
Doc/Makefile
Doc/whatsnew/changelog.rst

index 82f5bef0fab04102a984aae3f3a4bc1cfaf421c8..036c5bcf96faa2fc9611b55ca45fadd2f39780df 100644 (file)
@@ -5,6 +5,7 @@
 
 # You can set these variables from the command line.
 PYTHON       = python
+BLURB        = blurb
 SVNROOT      = http://svn.python.org/projects
 SPHINXOPTS   =
 PAPER        =
@@ -60,6 +61,19 @@ update: clean checkout
 
 build: checkout
        mkdir -p build/$(BUILDER) build/doctrees
+# 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
        $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
        @echo
 
index 57e2dabffaa3e39f53b863a557789b2e9ffc7aa0..db72e07ea68966cbd3c6360feb0e9136fad9a175 100644 (file)
@@ -2,5 +2,5 @@
 Changelog
 +++++++++
 
-.. miscnews:: ../../Misc/NEWS
+.. miscnews:: ../build/NEWS