automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-205-gd5bec12
Date: Sun, 26 Oct 2008 09:34:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d5bec12a1fed7ccadec4885adea35c97e149e720

The branch, master has been updated
       via  d5bec12a1fed7ccadec4885adea35c97e149e720 (commit)
      from  78ed77404a3f3a35b9f02a4902e61857be669386 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5bec12a1fed7ccadec4885adea35c97e149e720
Author: Johan Dahlin <address@hidden>
Date:   Sun Oct 26 10:28:40 2008 +0100

    Support for Python 3.0, drop support for pre-2.0.
    
    * lib/py-compile: Do not import string; use sys.stdout.write
    instead of print, files.split instead of string.split.
    * m4/python.m4 (AM_PATH_PYTHON): Also look for python3 and
    phython3.0; do not look for python1.5.  Use sys.stdout.write.
    (AM_PYTHON_CHECK_VERSION): Do not use string; adjust to xrange
    removal in Python 3.0, and changed semantics of map.
    * doc/automake.texi (Python, Hard-Coded Install Paths): Update
    Python versions mentioned in the manual, using 2.5 everywhere.
    * NEWS, THANKS: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |   13 +++++++++++++
 NEWS              |    3 +++
 THANKS            |    1 +
 doc/automake.texi |   10 +++++-----
 lib/py-compile    |   29 +++++++++++++++--------------
 m4/python.m4      |   27 +++++++++++++--------------
 6 files changed, 50 insertions(+), 33 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0037946..2c0a326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-10-26  Johan Dahlin  <address@hidden>
+
+       Support for Python 3.0, drop support for pre-2.0.
+       * lib/py-compile: Do not import string; use sys.stdout.write
+       instead of print, files.split instead of string.split.
+       * m4/python.m4 (AM_PATH_PYTHON): Also look for python3 and
+       phython3.0; do not look for python1.5.  Use sys.stdout.write.
+       (AM_PYTHON_CHECK_VERSION): Do not use string; adjust to xrange
+       removal in Python 3.0, and changed semantics of map.
+       * doc/automake.texi (Python, Hard-Coded Install Paths): Update
+       Python versions mentioned in the manual, using 2.5 everywhere.
+       * NEWS, THANKS: Update.
+
 2008-10-22  Ralf Wildenhues  <address@hidden>
 
        * lib/Automake/Channels.pm (@chain): Drop unused variable.
diff --git a/NEWS b/NEWS
index 1a14ec6..42107a2 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,9 @@ New in 1.10a:
 
   - Files with extension .sx are also treated as preprocessed assembler.
 
+  - Python 3.0 is supported now, Python releases prior to 2.0 are no
+    longer supported.
+
 * Miscellaneous changes:
 
   - Automake development is done in a git repository on Savannah now, see
diff --git a/THANKS b/THANKS
index 18a1ece..f79a7a0 100644
--- a/THANKS
+++ b/THANKS
@@ -142,6 +142,7 @@ Jim Meyering                address@hidden
 Jochen Kuepper         address@hidden
 Joel N. Weber II       address@hidden
 Joerg-Martin Schwarz   address@hidden
+Johan Dahlin           address@hidden
 Johan Danielsson       address@hidden
 Johannes Nicolai       address@hidden
 John F Trudeau         address@hidden
diff --git a/doc/automake.texi b/doc/automake.texi
index c2e0be5..122b977 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7380,11 +7380,11 @@ AM_PATH_PYTHON([2.2])
 
 @noindent
 This is fine when Python is an absolute requirement for the package.
-If Python >= 2.2 was only @emph{optional} to the package,
+If Python >= 2.5 was only @emph{optional} to the package,
 @code{AM_PATH_PYTHON} could be called as follows.
 
 @example
-AM_PATH_PYTHON([2.2],, [:])
+AM_PATH_PYTHON([2.5],, [:])
 @end example
 
 @code{AM_PATH_PYTHON} creates the following output variables based on
@@ -7408,7 +7408,7 @@ as follows.
 
 @item PYTHON_VERSION
 The Python version number, in the form @address@hidden
-(e.g., @samp{1.5}).  This is currently the value of
+(e.g., @samp{2.5}).  This is currently the value of
 @samp{sys.version[:3]}.
 
 @item PYTHON_PREFIX
@@ -10983,7 +10983,7 @@ where to install the library, it will answer something 
like this:
 @example
 % @kbd{python -c 'from distutils import sysconfig;
              print sysconfig.get_python_lib(1,0)'}
-/usr/lib/python2.3/site-packages
+/usr/lib/python2.5/site-packages
 @end example
 
 If you indeed use this absolute path to install your shared library,
@@ -10997,7 +10997,7 @@ installation prefix.
 @example
 % @kbd{python -c 'from distutils import sysconfig;
              print sysconfig.get_python_lib(1,0,"address@hidden@}")'}
address@hidden@}/lib/python2.3/site-packages
address@hidden@}/lib/python2.5/site-packages
 @end example
 
 You can also use this new path.  If you do
diff --git a/lib/py-compile b/lib/py-compile
index 865cda8..88776bc 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -1,9 +1,10 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2005-05-14.22
+scriptversion=2008-10-26.11
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008  Free Software
+# Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -101,38 +102,38 @@ else
 fi
 
 $PYTHON -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
 
 files = '''$files'''
 
-print 'Byte-compiling python modules...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+           continue
+    sys.stdout.write(file)
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+sys.stdout.write('\n')" || exit $?
 
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
 
 files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+           continue
+    sys.stdout.write(file)
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || :
 
 # Local Variables:
 # mode: shell-script
diff --git a/m4/python.m4 b/m4/python.m4
index 229fd55..3adf87b 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -3,7 +3,7 @@
 ## From Andrew Dalke
 ## Updated by James Henstridge
 ## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -34,13 +34,11 @@
 # numbers and dots only.
 AC_DEFUN([AM_PATH_PYTHON],
  [
-  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
-  dnl supported because the default installation locations changed from
-  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
-  dnl in 1.5.
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0 python1.6 python1.5])
+                    [python python2 python3 python3.0 python2.5 python2.4 
python2.3 python2.2 dnl
+python2.1 python2.0])
 
   m4_if([$1],[],[
     dnl No version check is needed.
@@ -87,7 +85,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl library.
 
   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
-    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+    [am_cv_python_version=`$PYTHON -c "import sys; 
sys.stdout.write(sys.version[[:3]])"`])
   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
 
   dnl Use the values of $prefix and $exec_prefix for the corresponding
@@ -102,7 +100,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl to know which OS platform Python thinks this is.
 
   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
-    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+    [am_cv_python_platform=`$PYTHON -c "import sys; 
sys.stdout.write(sys.platform)"`])
   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
 
 
@@ -155,14 +153,15 @@ python2.1 python2.0 python1.6 python1.5])
 # Run ACTION-IF-FALSE otherwise.
 # This test uses sys.hexversion instead of the string equivalent (first
 # word of sys.version), in order to cope with versions such as 2.2c1.
-# hexversion has been introduced in Python 1.5.2; it's probably not
-# worth to support older versions (1.5.1 was released on October 31, 1998).
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys, string
+ [prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
 minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])


hooks/post-receive
--
GNU Automake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]