Re: ax_python* : adding support for python 3.4

consultit <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
Hi Peter,
I noticed there are still some little bugs (lack of square brackets) in
ax_python_embed.m4.
I attached a patch.

Bye

Il giorno dom, 30/08/2015 alle 20.31 +0200, Peter Simons ha scritto:
> Hi Consultit,
> 
>  > 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.
> 
> I pushed your changes to the archive in [1] and [2]. Thank you very much
> for sharing those patches.
> 
> Best regards,
> Peter
> 
> 
> [1] https://github.com/peti/autoconf-archive/commit/0b187666d9fea7b0bca31cf4aebb90c845f9c0c6
> [2] https://github.com/peti/autoconf-archive/commit/a68dc349ca1bd29b33d8728ca4eb2b4cbe1f39ce
ax_python_embed.patch (text/x-patch, 837 B)
diff --git a/m4/ax_python_embed.m4 b/m4/ax_python_embed.m4
index c57dad9..c9888d8 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 9
+#serial 10
 
 # AX_PYTHON_DEFAULT( )
 # -----------------
@@ -402,10 +402,10 @@ import sys
 # because we need at least 4 digits for the hex conversion.
 # It accepts a string like "X[.Y[.Z]]" with X,Y,Z=digits
 # and [] means optional.
-minver = list(map(int, '$1'.split('.'))) + [0, 0, 0]
+minver = list(map(int, '$1'.split('.'))) + [[0, 0, 0]]
 minver[3] = 255
 minverhex = 0
-for i in range(0, 4): minverhex = (minverhex << 8) + minver[i]
+for i in range(0, 4): minverhex = (minverhex << 8) + minver[[i]]
 if sys.hexversion >= minverhex:
     sys.exit( 0 )
 else:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.