Skip to content

Commit 36299e0

Browse files
committed
fix SyntaxWarning: invalid escape sequence '\('
1 parent 12561a1 commit 36299e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ def num_available_cpu_cores(ram_per_build_process_in_gb):
231231
def read_version_from_cmakelists(cmake_file):
232232
"""Read version information
233233
"""
234-
major = re.findall("set\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
235-
minor = re.findall("set\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
236-
patch = re.findall("set\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
234+
major = re.findall("set\\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
235+
minor = re.findall("set\\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
236+
patch = re.findall("set\\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
237237
return major + '.' + minor + '.' + patch
238238

239239
def read_entire_file(fname):

0 commit comments

Comments
 (0)