mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix setup.py when babel is unavailable.
This commit is contained in:
parent
e8ba78c9d8
commit
b6ae85ec71
8
setup.py
8
setup.py
@ -59,8 +59,6 @@ if sys.version_info < (2, 5):
|
|||||||
# Provide a "compile_catalog" command that also creates the translated
|
# Provide a "compile_catalog" command that also creates the translated
|
||||||
# JavaScript files if Babel is available.
|
# JavaScript files if Babel is available.
|
||||||
|
|
||||||
cmdclass = {}
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from babel.messages.pofile import read_po
|
from babel.messages.pofile import read_po
|
||||||
from babel.messages.frontend import compile_catalog
|
from babel.messages.frontend import compile_catalog
|
||||||
@ -69,11 +67,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from json import dump
|
from json import dump
|
||||||
except ImportError:
|
except ImportError:
|
||||||
class compile_catalog_plusjs(compile_catalog):
|
pass
|
||||||
def run(self):
|
|
||||||
compile_catalog.run(self)
|
|
||||||
log.warn('simplejson/json or babel is not available; not writing '
|
|
||||||
'JavaScript translation files.')
|
|
||||||
else:
|
else:
|
||||||
class compile_catalog_plusjs(compile_catalog):
|
class compile_catalog_plusjs(compile_catalog):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user