diff options
Diffstat (limited to 'BuildTools/SCons')
| -rw-r--r-- | BuildTools/SCons/Tools/WindowsBundle.py | 8 | ||||
| -rw-r--r-- | BuildTools/SCons/Tools/wix.py | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py index 4d73fa3..9781deb 100644 --- a/BuildTools/SCons/Tools/WindowsBundle.py +++ b/BuildTools/SCons/Tools/WindowsBundle.py @@ -31,13 +31,17 @@ def generate(env) : if p: stdout, stderr = p.communicate() mappings = [] - p = re.compile(r'"([^\"]*)" "([^\"]*)"') + regex = re.compile(r'"([^\"]*)" "([^\"]*)"') + + if SCons.Util.PY3: + matches = re.findall(regex, stdout.decode('utf8')) + else: + matches = re.findall(regex, stdout) - matches = re.findall(p, stdout) for match in matches: mappings.append(match) return mappings else: return False diff --git a/BuildTools/SCons/Tools/wix.py b/BuildTools/SCons/Tools/wix.py index 889afe4..986ea23 100644 --- a/BuildTools/SCons/Tools/wix.py +++ b/BuildTools/SCons/Tools/wix.py @@ -13,11 +13,14 @@ def generate(env) : env['WIX_LIGHT'] = wixPath + 'light.exe' env['WIX_LIGHT_OPTIONS'] = '-nologo -ext WixUIExtension' def WiX_IncludeScanner(source, env, path, arg): wixIncludeRegexp = re.compile(r'^\s*\<\?include (\S+.wxs)\s*\?\>\S*', re.M) - contents = source.get_contents() + if SCons.Util.PY3: + contents = source.get_contents().decode("utf8") + else: + contents = source.get_contents() includes = wixIncludeRegexp.findall(contents) return [ "" + include for include in includes ] heat_builder = SCons.Builder.Builder( action = '"$WIX_HEAT" dir "$WIX_SOURCE_OBJECT_DIR" -cg Files $WIX_HEAT_OPTIONS -o ${TARGET} -t Swift\\Packaging\\WiX\\include.xslt', |
Swift