From: david-sarah Date: Wed, 16 May 2012 02:41:49 +0000 (+0000) Subject: Require Python 2.5. X-Git-Url: https://git.rkrishnan.org/pf/content/simplejson/frontends/cyclelanguage?a=commitdiff_plain;h=0fc196ea5fa4ad2fba42e52927943c399a84a735;p=tahoe-lafs%2Ftahoe-lafs.git Require Python 2.5. --- diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 4ddea757..6356bacd 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -360,24 +360,15 @@ def check_all_requirements(): errors = [] - # we require 2.4.4 on non-UCS-2, non-Redhat builds to avoid - # we require 2.4.3 on non-UCS-2 Redhat, because 2.4.3 is common on Redhat-based distros and will have patched the above bug - # we require at least 2.4.2 in any case to avoid a bug in the base64 module: - if sys.maxunicode == 65535: - if sys.version_info < (2, 4, 2) or sys.version_info[0] > 2: - errors.append("Tahoe-LAFS current requires Python v2.4.2 or greater " - "for a UCS-2 build (but less than v3), not %r" % - (sys.version_info,)) - elif platform.platform().lower().find('redhat') >= 0: - if sys.version_info < (2, 4, 3) or sys.version_info[0] > 2: - errors.append("Tahoe-LAFS current requires Python v2.4.3 or greater " - "on Redhat-based distributions (but less than v3), not %r" % - (sys.version_info,)) - else: - if sys.version_info < (2, 4, 4) or sys.version_info[0] > 2: - errors.append("Tahoe-LAFS current requires Python v2.4.4 or greater " - "for a non-UCS-2 build (but less than v3), not %r" % - (sys.version_info,)) + # We require at least 2.5 on all platforms. + # (On Python 3, we'll have failed long before this point.) + if sys.version_info < (2, 5): + try: + version_string = ".".join(map(str, sys.version_info)) + except Exception: + version_string = repr(sys.version_info) + errors.append("Tahoe-LAFS current requires Python v2.5 or greater (but less than v3), not %s" + % (version_string,)) vers_and_locs = dict(_vers_and_locs_list) for requirement in install_requires: