commit 2d361840c3c24da5fa1ae02417de9567d2b9b745 Author: aagbsn aagbsn@extc.org Date: Tue May 28 14:53:48 2013 -0400
Fix circular import with setup.py dependencies --- setup.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/setup.py b/setup.py index a3289c9..e514ea0 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,17 @@ import distutils import subprocess from distutils.command.install_data import install_data as _install_data -from babel.messages import frontend as babel import os import sys - from setuptools import setup, Command, find_packages
+# Fix circular dependency with setup.py install +try: + from babel.messages.frontend import compile_catalog, extract_messages + from babel.messages.frontend import init_catalog, update_catalog +except ImportError: + compile_catalog = extract_messages = init_catalog = update_catalog = None + class installData(_install_data): def run(self): self.data_files = [] @@ -59,10 +64,10 @@ setup(name='BridgeDB', packages=find_packages('lib'), py_modules=['TorBridgeDB'], cmdclass={'test' : runTests, - 'compile_catalog': babel.compile_catalog, - 'extract_messages': babel.extract_messages, - 'init_catalog': babel.init_catalog, - 'update_catalog': babel.update_catalog, + 'compile_catalog': compile_catalog, + 'extract_messages': extract_messages, + 'init_catalog': init_catalog, + 'update_catalog': update_catalog, 'install_data': installData}, include_package_data=True, package_data={'bridgedb': ['i18n/*/LC_MESSAGES/*.mo',