Fix script fix_swig_imports.py to work with swig version 3.0.9.

This commit is contained in:
jean-pierre charras 2016-06-20 16:50:39 -04:00 committed by Wayne Stambaugh
parent 1e7ba6c644
commit c980e6999a
1 changed files with 7 additions and 1 deletions

View File

@ -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