summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2012-03-24 10:37:46 -0500
committerSol Jerome <sol.jerome@gmail.com>2012-03-24 10:37:46 -0500
commitf65546ba6b13590515a6ea1e20b883454f3d1e1d (patch)
treee94d1bd192842487609e102fd532d410d15d0544 /setup.py
parent32cf8f8268a20fe7f8257964128927305a3c9ffe (diff)
downloadbcfg2-f65546ba6b13590515a6ea1e20b883454f3d1e1d.tar.gz
bcfg2-f65546ba6b13590515a6ea1e20b883454f3d1e1d.tar.bz2
bcfg2-f65546ba6b13590515a6ea1e20b883454f3d1e1d.zip
Fix build errors
We only need M2Crypto when using python 2.5 or less. Other versions include python ssl. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
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',