diff options
author | shimizukawa <shimizukawa@gmail.com> | 2014-12-19 01:14:57 +0900 |
---|---|---|
committer | shimizukawa <shimizukawa@gmail.com> | 2014-12-19 01:14:57 +0900 |
commit | 10df6cc5a0304e3bc5d01ab0a47f1d63e6bc3d57 (patch) | |
tree | 800a802c5a432b5611bda65c3de4c2e6e80d6747 | |
parent | bb294c74d8d52beac5fba6f7d5313d01a457713f (diff) | |
download | sphinx-10df6cc5a0304e3bc5d01ab0a47f1d63e6bc3d57.tar.gz |
Fix: make-mode didn't work on Win32 platform if sphinx was installed by wheel package.
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | sphinx/make_mode.py | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -39,6 +39,8 @@ Bugs fixed * #1607: Fix a crash when building latexpdf with "howto" class * #1251: Fix again. Sections which depth are lower than :tocdepth: should not be shown on localtoc sidebar. +* make-mode didn't work on Win32 platform if sphinx was installed by wheel + package. Release 1.3b1 (released Oct 10, 2014) diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py index d95c848b..7b5e75aa 100644 --- a/sphinx/make_mode.py +++ b/sphinx/make_mode.py @@ -249,7 +249,16 @@ class Make(object): opts.extend(['-D', 'latex_paper_size=' + papersize]) if doctreedir is None: doctreedir = self.builddir_join('doctrees') - return call([sys.executable, sys.argv[0], '-b', builder] + opts + + + orig_cmd = sys.argv[0] + if orig_cmd.endswith('.exe'): + cmd = [orig_cmd] + elif sys.platform == 'win32': + cmd = [orig_cmd + '.exe'] + else: # ex. 'sphinx-build' or 'sphinx-build.py' + cmd = [sys.executable, orig_cmd] + + return call(cmd + ['-b', builder] + opts + ['-d', doctreedir, self.srcdir, self.builddir_join(builder)]) |