Fix platform detection on OSX
'darwin' is returned by sys.platform, not os.name. svn: r21180
This commit is contained in:
parent
c4802bd210
commit
2f77462320
@ -52,11 +52,11 @@ SPHINXBUILD = 'sphinx-build'
|
|||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
|
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
|
||||||
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
|
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
|
||||||
elif sys.platform == 'linux2' or os.name == 'darwin':
|
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
|
||||||
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
||||||
sphinxCmd = SPHINXBUILD
|
sphinxCmd = SPHINXBUILD
|
||||||
else:
|
else:
|
||||||
print ("ERROR: unknown system, don't know sphinx, ... commands")
|
print ("Update Man ERROR: unknown system, don't know sphinx, ... commands")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
def tests():
|
def tests():
|
||||||
|
@ -42,11 +42,11 @@ SPHINXBUILD = 'sphinx-build'
|
|||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
|
pythonCmd = os.path.join(sys.prefix, 'bin', 'python.exe')
|
||||||
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
|
sphinxCmd = os.path.join(sys.prefix, 'bin', 'sphinx-build.exe')
|
||||||
elif sys.platform == 'linux2' or os.name == 'darwin':
|
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
|
||||||
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
||||||
sphinxCmd = SPHINXBUILD
|
sphinxCmd = SPHINXBUILD
|
||||||
else:
|
else:
|
||||||
print ("ERROR: unknown system, don't know sphinx, ... commands")
|
print ("Update Docs ERROR: unknown system, don't know sphinx, ... commands")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
def tests():
|
def tests():
|
||||||
|
@ -65,14 +65,15 @@ if sys.platform == 'win32':
|
|||||||
|
|
||||||
# Others OS
|
# Others OS
|
||||||
|
|
||||||
elif sys.platform == 'linux2' or os.name == 'darwin':
|
elif sys.platform in ['linux2', 'darwin', 'cygwin']:
|
||||||
msgmergeCmd = 'msgmerge'
|
msgmergeCmd = 'msgmerge'
|
||||||
msgfmtCmd = 'msgfmt'
|
msgfmtCmd = 'msgfmt'
|
||||||
msgattribCmd = 'msgattrib'
|
msgattribCmd = 'msgattrib'
|
||||||
xgettextCmd = 'xgettext'
|
xgettextCmd = 'xgettext'
|
||||||
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
pythonCmd = os.path.join(sys.prefix, 'bin', 'python')
|
||||||
else:
|
else:
|
||||||
print ("ERROR: unknown system, don't know msgmerge, ... commands")
|
print("Found platform %s, OS %s" % (sys.platform, os.name))
|
||||||
|
print ("Update PO ERROR: unknown system, don't know msgmerge, ... commands")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# List of available languages, useful for grouped actions
|
# List of available languages, useful for grouped actions
|
||||||
|
Loading…
Reference in New Issue
Block a user