Subject: bug#10226: Drop redundant Python 1.5 support?

From: Reuben Thomas <[email-masked]>
Date: Thu, 8 Dec 2011 01:24:50 +0100

On 7 December 2011 23:31, Stefano Lattarini <[email-masked]> wrote:
> severity 10226 minor
>>
> I'd be interested in such a patch; unfortunately, the one you've sent
> is completely garbled.  Would you mind to re-send it as an attachement?

Attached. I apologise in advance that it will have an unhelpful MIME
type (hence my originally sending it inline).

-- 
http://rrt.sc3d.org
From 159eee8f676f41aa4619d074e2bb8a01d102e4a8 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <[email-masked]>
Date: Mon, 5 Dec 2011 23:40:48 +0100
Subject: [PATCH] Remove Python 1.5 support.

---
 m4/python.m4 |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/m4/python.m4 b/m4/python.m4
index a7c1dd7..642b498 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -115,9 +115,7 @@ AC_DEFUN([AM_PATH_PYTHON],
   dnl   site-packages directory, not the python standard library
   dnl   directory like in previous automake betas.  This behavior
   dnl   is more consistent with lispdir.m4 for example.
-  dnl Query distutils for this directory.  distutils does not exist in
-  dnl Python 1.5, so we fall back to the hardcoded directory if it
-  dnl doesn't work.
+  dnl Query distutils for this directory.
   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
     [am_cv_python_pythondir],
     [if test "x$prefix" = xNONE
@@ -126,8 +124,7 @@ AC_DEFUN([AM_PATH_PYTHON],
      else
        am_py_prefix=$prefix
      fi
-     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
-     echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
      case $am_cv_python_pythondir in
      $am_py_prefix*)
        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
@@ -153,9 +150,7 @@ AC_DEFUN([AM_PATH_PYTHON],
 
   dnl pyexecdir -- directory for installing python extension modules
   dnl   (shared libraries)
-  dnl Query distutils for this directory.  distutils does not exist in
-  dnl Python 1.5, so we fall back to the hardcoded directory if it
-  dnl doesn't work.
+  dnl Query distutils for this directory.
   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
     [am_cv_python_pyexecdir],
     [if test "x$exec_prefix" = xNONE
@@ -164,8 +159,7 @@ AC_DEFUN([AM_PATH_PYTHON],
      else
        am_py_exec_prefix=$exec_prefix
      fi
-     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
-     echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
+     am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
      case $am_cv_python_pyexecdir in
      $am_py_exec_prefix*)
        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-- 
1.7.5.4