[gimp] Bug 735828 - configure fails for python < 2.7.



commit d249ec348bda3eab2128fb893b95a8037f55d88d
Author: Jehan <jehan girinstud io>
Date:   Sun Sep 7 16:31:12 2014 +0200

    Bug 735828 - configure fails for python < 2.7.
    
    sys.version_info named components only available since 2.7, though GIMP
    is supposed to support 2.5.0 and over. Used numerical tuple index
    instead.

 m4macros/pythondev.m4 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/m4macros/pythondev.m4 b/m4macros/pythondev.m4
index 6b6d6f3..7bfbb0a 100644
--- a/m4macros/pythondev.m4
+++ b/m4macros/pythondev.m4
@@ -202,7 +202,10 @@ minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
 minverhex = 0
 # 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.version_info.major != 2 or sys.hexversion < minverhex)"
+# sys.version_info.major only available since Python 2.7.
+# use sys.version_info[0] instead.
+# Double the square brackets for M4 syntax.
+sys.exit(sys.version_info[[0]] != 2 or sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
 


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