From 36fa8d40d0f9fa11af8fa2734ac8dfa5fcc3239a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 30 Dec 2015 10:28:50 -0600 Subject: [PATCH] When possible, directly exec rst2html script to allow system installs of docutils. --- src/tools/docutils.jam | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tools/docutils.jam b/src/tools/docutils.jam index bf68df1fa..d5c99b184 100644 --- a/src/tools/docutils.jam +++ b/src/tools/docutils.jam @@ -89,7 +89,18 @@ rule html ( target : source : properties * ) if $(RST2XXX_PY) { - RST2XXX on $(target) = $(python-cmd:G=:E="python") $(RST2XXX_PY) ; + if $(RST2XXX_PY:D) + { + # If we have a path to the rst2html.py script, we need to use + # the python interpreter to load it up. + RST2XXX on $(target) = $(python-cmd:G=:E="python") $(RST2XXX_PY) ; + } + else + { + # Otherwise, bare rst2html.py, we can just exec that directly. + # This work for both Nix, and the standard Windows Python installs. + RST2XXX on $(target) = $(RST2XXX_PY) ; + } } else {