diff options
| author | Tobias Markmann <tm@ayena.de> | 2018-10-01 10:04:11 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2018-10-01 10:04:11 (GMT) |
| commit | 78373f300882ebad10eda79eab7ee1e8a8d82b93 (patch) | |
| tree | 41fe3f05990b79ee4d2c013f0d208c3d917171e8 /BuildTools | |
| parent | abd5ca5d4960765f25da426c3dd20e2316d75b59 (diff) | |
| download | swift-78373f300882ebad10eda79eab7ee1e8a8d82b93.zip swift-78373f300882ebad10eda79eab7ee1e8a8d82b93.tar.bz2 | |
Change ur literals to r, as ur is unsupported in Python 3
r literal is supported by both Python 2 and Python 3.
Test-Information:
Builds on Windows 10 with Python 3 and VS 2015.
Change-Id: I2210a1ba01a4bf3c175634adeb067f1f939a7e61
Diffstat (limited to 'BuildTools')
| -rwxr-xr-x | BuildTools/Copyrighter.py | 2 | ||||
| -rwxr-xr-x | BuildTools/ProjectCopyrightSummary.py | 2 | ||||
| -rw-r--r-- | BuildTools/SCons/Tools/WindowsBundle.py | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/BuildTools/Copyrighter.py b/BuildTools/Copyrighter.py index cfde98f..4c7bfeb 100755 --- a/BuildTools/Copyrighter.py +++ b/BuildTools/Copyrighter.py @@ -6,11 +6,11 @@ import os, re, datetime, sys, subprocess DEFAULT_LICENSE = "gpl3" CONTRIBUTOR_LICENSE = "mit" LICENSE_DIR = "Documentation/Licenses" # The following regex parses license comment blocks and its part out of a complete source file. -reParseLicenseCommentBlocks = re.compile(ur'(\/\*\n\s\*\sCopyright \(c\) (?P<startYear>\d\d\d\d)(-(?P<endYear>\d\d\d\d))? (?P<author>[^\n\.]*)\.?\n.\* (?P<license>[^\n]*)\n \* (?P<seeMore>[^\n]+)\n *\*\/)') +reParseLicenseCommentBlocks = re.compile(r'(\/\*\n\s\*\sCopyright \(c\) (?P<startYear>\d\d\d\d)(-(?P<endYear>\d\d\d\d))? (?P<author>[^\n\.]*)\.?\n.\* (?P<license>[^\n]*)\n \* (?P<seeMore>[^\n]+)\n *\*\/)') class License : def __init__(self, name, file) : self.name = name self.file = file diff --git a/BuildTools/ProjectCopyrightSummary.py b/BuildTools/ProjectCopyrightSummary.py index 6e2d824..f6b18a0 100755 --- a/BuildTools/ProjectCopyrightSummary.py +++ b/BuildTools/ProjectCopyrightSummary.py @@ -15,11 +15,11 @@ for directory in ['Documentation', 'Limber', 'Packages', 'QA', 'Slimber', 'Sluif def CopyrightNames(filename): names = [] with open(filename, 'r') as file: data = file.read() - p = re.compile(ur'\* Copyright.*\d\d\d\d (.*?)\.?$', re.MULTILINE) + p = re.compile(r'\* Copyright.*\d\d\d\d (.*?)\.?$', re.MULTILINE) names = re.findall(p, data) return names names = Set() diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py index b0f7772..4d73fa3 100644 --- a/BuildTools/SCons/Tools/WindowsBundle.py +++ b/BuildTools/SCons/Tools/WindowsBundle.py @@ -31,11 +31,11 @@ def generate(env) : if p: stdout, stderr = p.communicate() mappings = [] - p = re.compile(ur'"([^\"]*)" "([^\"]*)"') + p = re.compile(r'"([^\"]*)" "([^\"]*)"') matches = re.findall(p, stdout) for match in matches: mappings.append(match) return mappings @@ -95,11 +95,11 @@ def generate(env) : if os.path.isfile(dependency_from_path): qtmappings.append((dependency_from_path, dependency)) break # handle core DLLs - qt_corelib_regex = re.compile(ur".*bin.*\\(.*)\.dll") + qt_corelib_regex = re.compile(r".*bin.*\\(.*)\.dll") for qtlib in qtlibs: if qtlib.startswith("Qt5"): (src_path, target_path) = next(((src_path, target_path) for (src_path, target_path) in qtmappings if qt_corelib_regex.match(src_path) and qt_corelib_regex.match(src_path).group(1) == qtlib), (None, None)) if src_path != None: @@ -109,11 +109,11 @@ def generate(env) : for (src_path, target_path) in qtmappings: if qt_corelib_regex.match(src_path) and not qt_corelib_regex.match(src_path).group(1).startswith("Qt5"): all_files += env.Install(bundle, src_path) # handle plugins - qt_plugin_regex = re.compile(ur".*plugins.*\\(.*)\\(.*)\.dll") + qt_plugin_regex = re.compile(r".*plugins.*\\(.*)\\(.*)\.dll") for (src_path, target_path) in qtmappings: if qt_plugin_regex.match(src_path): plugin_folder, filename = qt_plugin_regex.match(src_path).groups() try: if plugin_folder in ["audio"] or filename[1:] in qtplugins[plugin_folder]: |
Swift