summaryrefslogtreecommitdiff
blob: 9202acca9cb7585c1268ad7b19de913ba74a9116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff -Naur kicad-4.0.2-orig/scripting/build_tools/fix_swig_imports.py kicad-4.0.2/scripting/build_tools/fix_swig_imports.py
--- kicad-4.0.2-orig/scripting/build_tools/fix_swig_imports.py	2016-02-13 13:14:42.000000000 -0800
+++ kicad-4.0.2/scripting/build_tools/fix_swig_imports.py	2016-06-26 00:49:20.336661983 -0700
@@ -37,7 +37,19 @@
 txt = ""
 
 for l in lines:
-    if l.startswith("if version_info >= (2,6,0):"):     # ok with swig version <= 3.0.2
+    if l.startswith("if _swig_python_version_info >= (2, 7, 0):"):     # ok with swig version >= 3.0.10
+        l = l.replace("_swig_python_version_info >= (2, 7, 0)","False")
+        doneOk = True
+    elif l.startswith("elif _swig_python_version_info >= (2, 6, 0):"):  # needed with swig version >= 3.0.10
+        l = l.replace("_swig_python_version_info >= (2, 6, 0)","False")
+        doneOk = True
+    if l.startswith("if version_info >= (2, 7, 0):"):     # ok with swig version >= 3.0.9
+        l = l.replace("version_info >= (2, 7, 0)","False")
+        doneOk = True
+    elif l.startswith("elif version_info >= (2, 6, 0):"):  # needed with swig version >= 3.0.9
+        l = l.replace("version_info >= (2, 6, 0)","False")
+        doneOk = True
+    elif l.startswith("if version_info >= (2,6,0):"):     # ok with swig version <= 3.0.2
         l = l.replace("version_info >= (2,6,0)","False")
         doneOk = True
     elif l.startswith("if version_info >= (2, 6, 0):"): # needed with swig version 3.0.3
@@ -60,6 +72,3 @@
 
 
 exit(0)
-
-
-