From 47778d9c8f2548693ce710311f05e3bc4b4b042c Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Thu, 29 Apr 2021 04:33:07 +0200 Subject: [PATCH] swig: skip CR (\r) if present in module name Handles presence of \r in module name (ie. DOS mode swig .i files) Should fix #2350 --- waflib/extras/swig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waflib/extras/swig.py b/waflib/extras/swig.py index 740ab46d..967caeb5 100644 --- a/waflib/extras/swig.py +++ b/waflib/extras/swig.py @@ -17,7 +17,7 @@ tasks have to be added dynamically: SWIG_EXTS = ['.swig', '.i'] -re_module = re.compile(r'%module(?:\s*\(.*\))?\s+(.+)', re.M) +re_module = re.compile(r'%module(?:\s*\(.*\))?\s+([^\r\n]+)', re.M) re_1 = re.compile(r'^%module.*?\s+([\w]+)\s*?$', re.M) re_2 = re.compile(r'[#%](?:include|import(?:\(module=".*"\))+|python(?:begin|code)) [<"](.*)[">]', re.M)