build: Raise minimum python version to 2.5.0 for samba build
authorAndrew Bartlett <abartlet@samba.org>
Mon, 8 Apr 2013 07:25:27 +0000 (17:25 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 11 Apr 2013 06:44:46 +0000 (16:44 +1000)
RHEL5 has a python26 package for a modern python, and was the main reason we
kept python 2.5 support.

However, this support never actually worked for AD DC installations,
as samba-tool uses a feature only in 2.5 and above.  Very few folks
noticed and those were on RHEL5, and moving to 2.5 allows us to remove
some other workarounds.

Andrew Bartlett

Reviewed-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_python.py
m4/check_python.m4
wscript

index 847b431f7d578b70c910308a416639f85852b833..aee9547e398884bc4aba09279c8ff0954d6e23fb 100644 (file)
@@ -7,13 +7,13 @@ from samba_autoconf import *
 from Configure import conf
 
 @conf
-def SAMBA_CHECK_PYTHON(conf, mandatory=True):
+def SAMBA_CHECK_PYTHON(conf, mandatory=True, version=(2,4,2)):
     # enable tool to build python extensions
     conf.find_program('python', var='PYTHON', mandatory=mandatory)
     conf.check_tool('python')
     path_python = conf.find_program('python')
     conf.env.PYTHON_SPECIFIED = (conf.env.PYTHON != path_python)
-    conf.check_python_version((2,4,2))
+    conf.check_python_version(version)
 
 @conf
 def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True):
index 9d0524a8e85e37db426e4d7788281738ce0d125c..66dadbdbaab86cecf3086b554328fce9fc309378 100644 (file)
@@ -43,7 +43,7 @@ dnl $PYTHON_LDFLAGS
 AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
 [
        if test -z "$PYTHON_VER"; then
-               AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
+               AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python])
        else
                AC_PATH_PROG([PYTHON],[python[$PYTHON_VER]])
        fi
@@ -91,9 +91,9 @@ AC_DEFUN([AC_SAMBA_PYTHON_DEVEL],
                                                        sysconfig.get_config_var('LIBPL'))"`
                TRY_LINK_PYTHON($DISTUTILS_LDFLAGS, $DISTUTILS_CFLAGS)
 
-               if `$PYTHON -c "import sys; sys.exit(sys.version_info.__getslice__(0, 2) >= (2, 4))"`
+               if `$PYTHON -c "import sys; sys.exit(sys.version_info.__getslice__(0, 2) >= (2, 5))"`
                then
-                       AC_MSG_WARN([Python ($PYTHON) is too old. At least version 2.4 is required])
+                       AC_MSG_WARN([Python ($PYTHON) is too old. At least version 2.5 is required])
                        working_python=no
                fi
        fi
diff --git a/wscript b/wscript
index 1ef55abc89e290b6e9a0cbd4fd593e86bdbf1eb8..4944a72bc33358518d9f3e54f91e4f91c1d93a03 100644 (file)
--- a/wscript
+++ b/wscript
@@ -85,7 +85,7 @@ def configure(conf):
     conf.find_program('perl', var='PERL', mandatory=True)
     conf.find_program('xsltproc', var='XSLTPROC')
 
-    conf.SAMBA_CHECK_PYTHON(mandatory=True)
+    conf.SAMBA_CHECK_PYTHON(mandatory=True, version=(2,5,0))
     conf.SAMBA_CHECK_PYTHON_HEADERS(mandatory=True)
 
     if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']: