From fa46e4a70080dcec8031fa446ddb529cc5fc8f0d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 25 Aug 2014 19:34:09 +0400 Subject: [PATCH] Improve error reporting for docutils. When docutils is not configured at all, produce an error message as opposed to trying to invoke Python without providing a script to run. Even better would be to search for docutils in common places, and do so even without explicit 'using', but that's beyond 30 mins I have right now. --- src/tools/docutils.jam | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/tools/docutils.jam b/src/tools/docutils.jam index fc775b6fc..02b2794b2 100644 --- a/src/tools/docutils.jam +++ b/src/tools/docutils.jam @@ -13,6 +13,7 @@ import toolset ; import path ; import feature : feature ; import property ; +import errors ; .initialized = ; @@ -65,6 +66,19 @@ rule html ( target : source : properties * ) if ! [ on $(target) return $(RST2XXX) ] { local python-cmd = [ property.select : $(properties) ] ; + if ! $(.tools-dir) { + errors.user-error + "The docutils module is used, but not configured. " + : "" + : "Please modify your user-config.jam or project-config.jam to contain:" + : "" + : " using docutils : ;" + : "" + : "On Ubuntu, 'docutils-common' package will create /usr/share/docutils." + : "Other flavours of Linux likely have docutils as package as well." + : "On Windows, you can install from http://docutils.sourceforge.net/." + ; + } RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.tools-dir)/rst2html.py ; } }