From 5685174808f5ca973e916a10f9f93660ee4dc4f2 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 9 May 2019 09:53:46 +0200 Subject: [PATCH] Fix for SWIG 4.0.0 --- scripting/build_tools/fix_swig_imports.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripting/build_tools/fix_swig_imports.py b/scripting/build_tools/fix_swig_imports.py index 160d7e2d90..4f97df079f 100644 --- a/scripting/build_tools/fix_swig_imports.py +++ b/scripting/build_tools/fix_swig_imports.py @@ -40,6 +40,9 @@ if (len(lines)<4000): txt = b"" for l in lines: + if l.startswith(b"if _swig_python_version_info < (2, 7, 0):"): # ok with swig version >= 4.0.0 + l = l.replace(b"_swig_python_version_info < (2, 7, 0)", b"False") + doneOk = True if l.startswith(b"if _swig_python_version_info >= (2, 7, 0):"): # ok with swig version >= 3.0.10 l = l.replace(b"_swig_python_version_info >= (2, 7, 0)", b"False") doneOk = True