← Back to team overview

kicad-developers team mailing list archive

swig 4.0.0 patch

 

Sorry about that, here's the patch



From e7586acb334955de22786d76e28f5374d2446d2c Mon Sep 17 00:00:00 2001
From: Mark <mark.vandoesburg@xxxxxxxxx>
Date: Thu, 9 May 2019 09:53:46 +0200
Subject: [PATCH] Fix for SWIG 4.0.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.21.0"

This is a multi-part message in MIME format.
--------------2.21.0
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit

---
 scripting/build_tools/fix_swig_imports.py | 3 +++
 1 file changed, 3 insertions(+)


--------------2.21.0
Content-Type: text/x-patch; name="0001-Fix-for-SWIG-4.0.0.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-for-SWIG-4.0.0.patch"

diff --git a/scripting/build_tools/fix_swig_imports.py b/scripting/build_tools/fix_swig_imports.py
index 160d7e2d9..4f97df079 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

--------------2.21.0--



Follow ups