diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2012-03-24 10:37:46 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2012-03-24 10:37:46 -0500 |
commit | f65546ba6b13590515a6ea1e20b883454f3d1e1d (patch) | |
tree | e94d1bd192842487609e102fd532d410d15d0544 | |
parent | 32cf8f8268a20fe7f8257964128927305a3c9ffe (diff) | |
download | bcfg2-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>
-rwxr-xr-x | setup.py | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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', |