Skip to content

Port other changes to build blurbified Docs #3340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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
Expand Down
17 changes: 16 additions & 1 deletion Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
Changelog
+++++++++

.. miscnews:: ../../Misc/NEWS
.. miscnews:: ../build/NEWS