[python,python3] Handle shell script sphinx-build
commitd75881a403b59ade7e01a431a308849ed897534d
authorOlly Betts <olly@survex.com>
Mon, 5 Dec 2016 16:52:38 +0000 (6 05:52 +1300)
committerOlly Betts <olly@survex.com>
Tue, 6 Dec 2016 04:42:02 +0000 (6 17:42 +1300)
treeabc12a67ad92729152f7656a52e4cf1d9bedbf49
parent54429c70f03bfbbe436b1cb877da5bc6952d58ec
[python,python3] Handle shell script sphinx-build

We need to run Sphinx for the right version of Python here, so we can't
just run sphinx-build as that might be for a different version.

Previously we ran $(PYTHON2) $(SPHINX_BUILD)/$(PYTHON3) $(SPHINX_BUILD)
but that fails for homebrew where sphinx-build is actually a shell
script.  Instead invoke sphinx.main() from an inline code snippet.

Fixes https://github.com/xapian/xapian/pull/126, reported by Alex Dunn.

(cherry picked from commit ec4028ce75ea265bae38b23b019254921607c3cc)
xapian-bindings/python/Makefile.am
xapian-bindings/python3/Makefile.am