aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakhropov <akhropov@yandex-team.com>2024-02-13 20:51:54 +0300
committerakhropov <akhropov@yandex-team.com>2024-02-13 21:05:29 +0300
commit5b1c50adb58a15059b0510a4930fbb8429795976 (patch)
tree82ec626c2de27f1e40fe43b889655399ecb2cd56
parentd72f9e0e5c5e4f6e9b0a1bb96cd5723016c42468 (diff)
downloadydb-5b1c50adb58a15059b0510a4930fbb8429795976.tar.gz
Fix in regexps for 'ar' versions - use raw strings. Curiously enough they worked correctly either way but the old version produces a warning on python 3.12
-rw-r--r--build/export_generators/hardcoded-cmake/build/scripts/create_recursive_library_for_cmake.py4
-rw-r--r--build/scripts/create_recursive_library_for_cmake.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/build/export_generators/hardcoded-cmake/build/scripts/create_recursive_library_for_cmake.py b/build/export_generators/hardcoded-cmake/build/scripts/create_recursive_library_for_cmake.py
index 33805d18d8..11c80fb0d2 100644
--- a/build/export_generators/hardcoded-cmake/build/scripts/create_recursive_library_for_cmake.py
+++ b/build/export_generators/hardcoded-cmake/build/scripts/create_recursive_library_for_cmake.py
@@ -130,9 +130,9 @@ class FilesCombiner(object):
archiver_tool_path = 'libtool'
elif opts.is_msvc_compatible_linker:
arch_type = 'LIB'
- elif re.match('^(|.*/)llvm\-ar(\-[\d])?', opts.parsed_args.cmake_ar):
+ elif re.match(r'^(|.*/)llvm\-ar(\-[\d])?', opts.parsed_args.cmake_ar):
arch_type = 'LLVM_AR'
- elif re.match('^(|.*/)(gcc\-)?ar(\-[\d])?', opts.parsed_args.cmake_ar):
+ elif re.match(r'^(|.*/)(gcc\-)?ar(\-[\d])?', opts.parsed_args.cmake_ar):
arch_type = 'GNU_AR'
else:
raise Exception('Unsupported arch type for CMAKE_AR={}'.format(opts.parsed_args.cmake_ar))
diff --git a/build/scripts/create_recursive_library_for_cmake.py b/build/scripts/create_recursive_library_for_cmake.py
index 33805d18d8..11c80fb0d2 100644
--- a/build/scripts/create_recursive_library_for_cmake.py
+++ b/build/scripts/create_recursive_library_for_cmake.py
@@ -130,9 +130,9 @@ class FilesCombiner(object):
archiver_tool_path = 'libtool'
elif opts.is_msvc_compatible_linker:
arch_type = 'LIB'
- elif re.match('^(|.*/)llvm\-ar(\-[\d])?', opts.parsed_args.cmake_ar):
+ elif re.match(r'^(|.*/)llvm\-ar(\-[\d])?', opts.parsed_args.cmake_ar):
arch_type = 'LLVM_AR'
- elif re.match('^(|.*/)(gcc\-)?ar(\-[\d])?', opts.parsed_args.cmake_ar):
+ elif re.match(r'^(|.*/)(gcc\-)?ar(\-[\d])?', opts.parsed_args.cmake_ar):
arch_type = 'GNU_AR'
else:
raise Exception('Unsupported arch type for CMAKE_AR={}'.format(opts.parsed_args.cmake_ar))