ax_python* : adding support for python 3.4
consultit <[email protected]>
| Newsgroups | gmane.comp.sysutils.autoconf.archive-maintainers |
|---|---|
| Message-ID | <[email protected]> |
I'm a user of ax_python and ax_python_embed macros. I made (on debian jessie) 3.4 version my default (by adding a custom alternative). Then I have had to patch the above macros just to work for my projects. So it would be nice if support for version 3.4 (and 3.5) could be added to the overall ax_python* macro family. Thanks. PS: I attached a patch got from "git diff" on latest source tree.
ax_python-autoconf-archive.patch
(text/x-patch, 1.6 KB)
diff --git a/m4/ax_python.m4 b/m4/ax_python.m4
index ebfb8d6..2b9dd81 100644
--- a/m4/ax_python.m4
+++ b/m4/ax_python.m4
@@ -51,12 +51,12 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 14
+#serial 15
AC_DEFUN([AX_PYTHON],
[AC_MSG_CHECKING(for python build information)
AC_MSG_RESULT([])
-for python in python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
+for python in python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python; do
AC_CHECK_PROGS(PYTHON_BIN, [$python])
ax_python_bin=$PYTHON_BIN
if test x$ax_python_bin != x; then
diff --git a/m4/ax_python_embed.m4 b/m4/ax_python_embed.m4
index 31f3547..98da30a 100644
--- a/m4/ax_python_embed.m4
+++ b/m4/ax_python_embed.m4
@@ -120,7 +120,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 8
+#serial 9
# AX_PYTHON_DEFAULT( )
# -----------------
@@ -397,10 +397,10 @@ AC_DEFUN([AX_PYTHON_VERSION_CHECK],
then
AC_MSG_CHECKING([whether $PYTHON version >= $1])
AX_PYTHON_RUN([
-import sys, string
+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('$1', '.')) + [[0, 0, 0]]
+minver = map(int, '$1'.split('.')) + [[0, 0, 0]]
minverhex = 0
for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
if sys.hexversion >= minverhex: