summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaul Cuza <raulcuza@gmail.com>2011-01-31 13:36:12 -0600
committerSol Jerome <sol.jerome@gmail.com>2011-01-31 13:36:12 -0600
commit1d505209a66edc877b8e4d65ceae0dcaf15d7016 (patch)
treeb55ac161785b7380ecb15e4b62b708dd3835ed5a
parent943322205d4576e5ff5d1ee01373762aa5b7c1af (diff)
downloadbcfg2-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.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 9eaa6f626..62da3b787 100644
--- a/setup.py
+++ b/setup.py
@@ -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",