summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setup.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 6e63976c1..62da3b787 100644
--- a/setup.py
+++ b/setup.py
@@ -6,12 +6,6 @@ from fnmatch import fnmatch
from glob import glob
import os.path
-try:
- import lxml.etree
-except ImportError:
- pass
-
-
class BuildDTDDoc (Command):
"""Build DTD documentation"""
@@ -113,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",