aboutsummaryrefslogtreecommitdiffstats
path: root/extras/swig.py
diff options
context:
space:
mode:
Diffstat (limited to 'extras/swig.py')
-rw-r--r--extras/swig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/swig.py b/extras/swig.py
index fd3d6d2..740ab46 100644
--- a/extras/swig.py
+++ b/extras/swig.py
@@ -17,10 +17,10 @@ tasks have to be added dynamically:
SWIG_EXTS = ['.swig', '.i']
-re_module = re.compile('%module(?:\s*\(.*\))?\s+(.+)', re.M)
+re_module = re.compile(r'%module(?:\s*\(.*\))?\s+(.+)', re.M)
re_1 = re.compile(r'^%module.*?\s+([\w]+)\s*?$', re.M)
-re_2 = re.compile('[#%]include [<"](.*)[">]', re.M)
+re_2 = re.compile(r'[#%](?:include|import(?:\(module=".*"\))+|python(?:begin|code)) [<"](.*)[">]', re.M)
class swig(Task.Task):
color = 'BLUE'