summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index ece7b4a24..69c67c0b1 100755
--- a/setup.py
+++ b/setup.py
@@ -8,6 +8,12 @@ import os
import os.path
import sys
+# we only need m2crypto on < python2.6
+need_m2crypto = False
+version = sys.version_info[:2]
+if version < (2, 6):
+ need_m2crypto = True
+
class BuildDTDDoc (Command):
"""Build DTD documentation"""
@@ -119,6 +125,10 @@ py3lib = 'src/lib/Bcfg2Py3Incompat.py'
if sys.hexversion < 0x03000000 and os.path.exists(py3lib):
os.remove(py3lib)
+inst_reqs = ["lxml"]
+if need_m2crypto:
+ inst_reqs.append("M2Crypto")
+
setup(cmdclass=cmdclass,
name="Bcfg2",
version="1.2.2",
@@ -140,9 +150,7 @@ setup(cmdclass=cmdclass,
"Bcfg2.Server.Reports.reports.templatetags",
"Bcfg2.Server.Snapshots",
],
- install_requires = ["lxml",
- "M2Crypto",
- ],
+ install_requires = inst_reqs,
package_dir = {'Bcfg2': 'src/lib'},
package_data = {'Bcfg2.Server.Reports.reports':['fixtures/*.xml',
'templates/*.html', 'templates/*/*.html',