summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaul Cuza <raulcuza@gmail.com>2011-01-31 12:25:48 -0500
committerRaul Cuza <raulcuza@gmail.com>2011-01-31 12:25:48 -0500
commite2e3f50705bd550285f78f40215ef3d80ba2c945 (patch)
tree1a4086bb1992ff29ddabbfb671fa3eedc4e24315
parent3af8bf0c6b69809b63d4b7c2d97b50161f92f6f2 (diff)
downloadbcfg2-e2e3f50705bd550285f78f40215ef3d80ba2c945.tar.gz
bcfg2-e2e3f50705bd550285f78f40215ef3d80ba2c945.tar.bz2
bcfg2-e2e3f50705bd550285f78f40215ef3d80ba2c945.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.
-rw-r--r--setup.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 9eaa6f626..6e63976c1 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,12 @@ from distutils.core import Command
from fnmatch import fnmatch
from glob import glob
import os.path
-import lxml.etree
+
+try:
+ import lxml.etree
+except ImportError:
+ pass
+
class BuildDTDDoc (Command):
"""Build DTD documentation"""