mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix: on windows, make-mode didn't work on Win32 platform if sphinx was invoked as python sphinx-build.py
.
This commit is contained in:
parent
991d2455e8
commit
e722258079
2
CHANGES
2
CHANGES
@ -17,6 +17,8 @@ Bugs fixed
|
||||
|
||||
* LaTeX writer now generates correct markup for cells spanning multiple rows.
|
||||
* #1674: Do not crash if a module's ``__all__`` is not a list of strings.
|
||||
* On windows, make-mode didn't work on Win32 platform if sphinx was invoked as
|
||||
``python sphinx-build.py``.
|
||||
|
||||
|
||||
Release 1.3b2 (released Dec 5, 2014)
|
||||
|
@ -251,13 +251,18 @@ class Make(object):
|
||||
doctreedir = self.builddir_join('doctrees')
|
||||
|
||||
orig_cmd = sys.argv[0]
|
||||
if orig_cmd.endswith('.exe'):
|
||||
if sys.platform == 'win32' and orig_cmd.endswith('.exe'):
|
||||
# win32: 'sphinx-build.exe'
|
||||
cmd = [orig_cmd]
|
||||
elif sys.platform == 'win32':
|
||||
elif sys.platform == 'win32' and os.path.splitext(orig_cmd)[1] == '':
|
||||
# win32: 'sphinx-build' without extension
|
||||
cmd = [orig_cmd + '.exe']
|
||||
else: # ex. 'sphinx-build' or 'sphinx-build.py'
|
||||
else:
|
||||
# win32: 'sphinx-build.py'
|
||||
# linux, mac: 'sphinx-build' or 'sphinx-build.py'
|
||||
cmd = [sys.executable, orig_cmd]
|
||||
|
||||
print(cmd)
|
||||
return call(cmd + ['-b', builder] + opts +
|
||||
['-d', doctreedir, self.srcdir, self.builddir_join(builder)])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user