Fix: make-mode didn't work on Win32 platform if sphinx was installed by wheel package.

This commit is contained in:
Takayuki Shimizukawa 2014-12-19 01:14:57 +09:00
parent 8d514be7a8
commit d4c127d93c
2 changed files with 12 additions and 1 deletions

View File

@ -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)

View File

@ -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)])