Sphinx not found patch for make.bat

124 views
Skip to first unread message

anatoly techtonik

unread,
Oct 22, 2012, 10:32:18 AM10/22/12
to sphin...@googlegroups.com
The attached patch instructs Windows users what to do in case 'sphinx-build' is not found and where to get it.

# HG changeset patch
# User anatoly techtonik <tech...@gmail.com>
# Date 1350916093 -10800
# Node ID eca7146dc07ed4d2ccbcece31cef89ef19eee452
# Parent  1f3a2749df398b4893bff71b0b243fad1851f093
Provide instructions for make.bat in case sphinx-build is not found

diff -r 1f3a2749df39 -r eca7146dc07e sphinx/quickstart.py
--- a/sphinx/quickstart.py Sun Jul 29 19:27:36 2012 +0200
+++ b/sphinx/quickstart.py Mon Oct 22 17:28:13 2012 +0300
@@ -414,6 +414,20 @@
 clean:
 \t-rm -rf $(BUILDDIR)/*
 
+
+%SPHINXBUILD% 2> nul     
+if errorlevel 9009 (
+    echo.
+    echo.'sphinx-build' command is not found. Make sure you have Sphinx
+    echo.installed, then set SPHINXBUILD environment variable to point
+    echo.to a full path of 'sphinx-build' executable. Alternatively you
+    echo.may add Sphinx directory to PATH.
+    echo.
+    echo.If you don't have Sphinx installed, grab it from
+    exit /b 1
+)
+
 html:
 \t$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 \t@echo

anatoly techtonik

unread,
Oct 22, 2012, 10:34:42 AM10/22/12
to sphin...@googlegroups.com
I don't know why, but I can not attach files to posts, so I've pasted it as-is.

BTW, windows .bat files are not tab-sensitive, so there is no point in keeping \t chars in template.

anatoly techtonik

unread,
Oct 22, 2012, 10:36:21 AM10/22/12
to sphin...@googlegroups.com

anatoly techtonik

unread,
Oct 22, 2012, 11:48:59 AM10/22/12
to sphin...@googlegroups.com
Failed to attach, I've created 1k issue at https://bitbucket.org/birkenfeld/sphinx/issue/1024/patch-makebat-improve-error-message-if
There were 256 open issues before mine. Nice coincidence. =)
Reply all
Reply to author
Forward
0 new messages