From f65546ba6b13590515a6ea1e20b883454f3d1e1d Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sat, 24 Mar 2012 10:37:46 -0500 Subject: Fix build errors We only need M2Crypto when using python 2.5 or less. Other versions include python ssl. Signed-off-by: Sol Jerome --- setup.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'setup.py') 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', -- cgit v1.2.3-1-g7c22