diff options
Diffstat (limited to 'setup.py')
-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', |