Fix SyntaxWarning: invalid escape sequence '\.'

This commit is contained in:
Aleksei Nurmukhametov authored and Alexey Nurmukhametov committed 2023-11-07 13:25:03 +00:00
1 parent 5eb426df81
commit d096845375
2 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -24,8 +24,8 @@ target = re.sub(".*builtins/target-", "", src)
target = re.sub(r".*builtins\\target-", "", target)
target = re.sub(".*builtins/", "", target)
target = re.sub(r".*builtins\\", "", target)
target = re.sub("\.ll$", "", target)
target = re.sub("\.c$", "", target)
target = re.sub(r".ll$", "", target)
target = re.sub(r".c$", "", target)
target = re.sub("-", "_", target)
llvm_as="llvm-as"
+4 -4
View File
@@ -599,7 +599,7 @@ def file_check(results, host, target):
ispc_output = options.ispc_output
# Detect LLVM version
temp1 = common.take_lines(host.ispc_exe + " --version", "first")
temp2 = re.search('LLVM [0-9]*\.[0-9]*', temp1)
temp2 = re.search(r'LLVM [0-9]*.[0-9]*', temp1)
if temp2 != None:
llvm_version = temp2.group()
else:
@@ -607,11 +607,11 @@ def file_check(results, host, target):
# Detect compiler version
if OS != "Windows":
temp1 = common.take_lines(options.compiler_exe + " --version", "first")
temp2 = re.search("[0-9]*\.[0-9]*\.[0-9]", temp1)
temp2 = re.search(r"[0-9]*.[0-9]*.[0-9]", temp1)
if temp2 == None:
temp3 = re.search("[0-9]*\.[0-9]*", temp1)
temp3 = re.search(r"[0-9]*.[0-9]*", temp1)
else:
temp3 = re.search("[0-9]*\.[0-9]*", temp2.group())
temp3 = re.search(r"[0-9]*.[0-9]*", temp2.group())
compiler_version = options.compiler_exe + temp3.group()
else:
compiler_version = "cl"