From 59b493f6d3a44c16a597447c4b5f5af4e794b786 Mon Sep 17 00:00:00 2001 From: david-sarah <david-sarah@jacaranda.org> Date: Tue, 8 Jun 2010 17:36:46 -0700 Subject: [PATCH] _auto_deps.py: allow Python 2.4.3 on Redhat-based distributions. --- _auto_deps.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/_auto_deps.py b/_auto_deps.py index dfa8d7b3..aabda816 100644 --- a/_auto_deps.py +++ b/_auto_deps.py @@ -66,17 +66,25 @@ if hasattr(sys, 'frozen'): # for py2exe install_requires=[] def require_python_version(): - import sys + import sys, platform - # we require 2.4.4 on non-UCS-2 builds to avoid <http://www.python.org/news/security/PSF-2006-001/> + # we require 2.4.4 on non-UCS-2, non-Redhat builds to avoid <http://www.python.org/news/security/PSF-2006-001/> + # 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: <http://bugs.python.org/issue1171487> if sys.maxunicode == 65535: if sys.version_info < (2, 4, 2) or sys.version_info[0] > 2: - raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.2 or greater for a UCS-2 build (but less than v3), not %r" % + raise NotImplementedError("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: + raise NotImplementedError("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: - raise NotImplementedError("Tahoe-LAFS current requires Python v2.4.4 or greater for a non-UCS-2 build (but less than v3), not %r" % + raise NotImplementedError("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,)) def require_auto_deps(): -- 2.45.2