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 /sphinx | |
parent | bb294c74d8d52beac5fba6f7d5313d01a457713f (diff) | |
download | sphinx-10df6cc5a0304e3bc5d01ab0a47f1d63e6bc3d57.tar.gz |
Fix: make-mode didn't work on Win32 platform if sphinx was installed by wheel package.
Diffstat (limited to 'sphinx')
-rw-r--r-- | sphinx/make_mode.py | 11 |
1 files changed, 10 insertions, 1 deletions
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)]) |