summaryrefslogtreecommitdiffstats
path: root/waflib/extras/swig.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-03-17 17:31:03 +0100
committerDavid Robillard <d@drobilla.net>2019-03-17 18:14:27 +0100
commitdc15972a98d7b60bd81f9a6b456ecccaeb7c654d (patch)
tree1bb62d4a902388d4a0440c4524ab838a03aee9ea /waflib/extras/swig.py
parentccc9b971ab206fa3dc32a432a3e76db976192f58 (diff)
parent8cb9c6430dc0056f8d40b4d8e0bdc616ff397e1f (diff)
downloadganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.tar.gz
ganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.tar.bz2
ganv-dc15972a98d7b60bd81f9a6b456ecccaeb7c654d.zip
Update autowaf and adapt to new API
Diffstat (limited to 'waflib/extras/swig.py')
-rw-r--r--waflib/extras/swig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/waflib/extras/swig.py b/waflib/extras/swig.py
index fd3d6d2..740ab46 100644
--- a/waflib/extras/swig.py
+++ b/waflib/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'