diff options
author | Raul Cuza <raulcuza@gmail.com> | 2011-01-31 13:36:12 -0600 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-01-31 13:36:12 -0600 |
commit | 1d505209a66edc877b8e4d65ceae0dcaf15d7016 (patch) | |
tree | b55ac161785b7380ecb15e4b62b708dd3835ed5a | |
parent | 943322205d4576e5ff5d1ee01373762aa5b7c1af (diff) | |
download | bcfg2-1d505209a66edc877b8e4d65ceae0dcaf15d7016.tar.gz bcfg2-1d505209a66edc877b8e4d65ceae0dcaf15d7016.tar.bz2 bcfg2-1d505209a66edc877b8e4d65ceae0dcaf15d7016.zip |
Put lxml.etree import in a try block.
At this point bcfg2 does not have a hard dependency on lxml. Putting this
import in a try block means setup.py will work for people without lxml.
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
-rw-r--r-- | setup.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5,7 +5,6 @@ from distutils.core import Command from fnmatch import fnmatch from glob import glob import os.path -import lxml.etree class BuildDTDDoc (Command): """Build DTD documentation""" @@ -108,7 +107,11 @@ try: except ImportError: pass -cmdclass['build_dtddoc'] = BuildDTDDoc +try: + import lxml.etree + cmdclass['build_dtddoc'] = BuildDTDDoc +except ImportError: + pass setup(cmdclass=cmdclass, name="Bcfg2", |