diff --git a/scripting/build_tools/fix_swig_imports.py b/scripting/build_tools/fix_swig_imports.py index 47eb292dc9..e0d9bfc6ca 100644 --- a/scripting/build_tools/fix_swig_imports.py +++ b/scripting/build_tools/fix_swig_imports.py @@ -37,7 +37,13 @@ if (len(lines)<4000): 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 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