diff options
| author | georg.brandl <devnull@localhost> | 2008-09-06 17:39:32 +0000 |
|---|---|---|
| committer | georg.brandl <devnull@localhost> | 2008-09-06 17:39:32 +0000 |
| commit | 52a3b148a8a1bd829d77d8f7bc81f10a2ac4fabc (patch) | |
| tree | 1f6b6d1973f7bade74da7fef53059907a87d16d7 /setup.py | |
| parent | e1f6a59d933a08be9cff31d714832c7dd79a500d (diff) | |
| download | sphinx-52a3b148a8a1bd829d77d8f7bc81f10a2ac4fabc.tar.gz | |
Fix warning when json is not available.
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -5,6 +5,7 @@ ez_setup.use_setuptools() import os import sys from setuptools import setup +from distutils import log import sphinx @@ -63,14 +64,16 @@ cmdclass = {} try: from babel.messages.pofile import read_po from babel.messages.frontend import compile_catalog - from simplejson import dump - from distutils import log + try: + from simplejson import dump + except ImportError: + from json import dump except ImportError: class compile_catalog_plusjs(compile_catalog): def run(self): compile_catalog.run(self) - log.warning('simplejson or babel is not available; not writing ' - 'JavaScript translation files.') + log.warn('simplejson/json or babel is not available; not writing ' + 'JavaScript translation files.') else: class compile_catalog_plusjs(compile_catalog): """ |
