aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-21 23:25:25 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-21 23:25:25 +0300
commitd01bc613eacb1c2e20088782566dd46fcfe173d1 (patch)
tree8adc21cf92342400b52f8eb83b2374341e8c29ae /build/plugins
parentd8b7fbd32069dda0983d4e0047b080d7c8c2c090 (diff)
downloadydb-d01bc613eacb1c2e20088782566dd46fcfe173d1.tar.gz
intermediate changes
ref:30ff16a27e264ce77a857e4b8947c893c3f87d17
Diffstat (limited to 'build/plugins')
-rw-r--r--build/plugins/pybuild.py15
-rw-r--r--build/plugins/ytest.py4
2 files changed, 17 insertions, 2 deletions
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index f32a2d39a0..b3f8b3ad7c 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -10,6 +10,7 @@ YA_IDE_VENV_VAR = 'YA_IDE_VENV'
PY_NAMESPACE_PREFIX = 'py/namespace'
BUILTIN_PROTO = 'builtin_proto'
+
def is_arc_src(src, unit):
return (
src.startswith('${ARCADIA_ROOT}/') or
@@ -17,6 +18,7 @@ def is_arc_src(src, unit):
unit.resolve_arc_path(src).startswith('$S/')
)
+
def is_extended_source_search_enabled(path, unit):
if not is_arc_src(path, unit):
return False
@@ -24,17 +26,20 @@ def is_extended_source_search_enabled(path, unit):
return False
return True
+
def to_build_root(path, unit):
if is_arc_src(path, unit):
return '${ARCADIA_BUILD_ROOT}/' + rootrel_arc_src(path, unit)
return path
+
def uniq_suffix(path, unit):
upath = unit.path()
if '/' not in path:
return ''
return '.{}'.format(pathid(path)[:4])
+
def pb2_arg(suf, path, mod, unit):
return '{path}__int__{suf}={mod}{modsuf}'.format(
path=stripext(to_build_root(path, unit)),
@@ -43,18 +48,23 @@ def pb2_arg(suf, path, mod, unit):
modsuf=stripext(suf)
)
+
def proto_arg(path, mod, unit):
return '{}.proto={}'.format(stripext(to_build_root(path, unit)), mod)
+
def pb_cc_arg(suf, path, unit):
return '{}{suf}'.format(stripext(to_build_root(path, unit)), suf=suf)
+
def ev_cc_arg(path, unit):
return '{}.ev.pb.cc'.format(stripext(to_build_root(path, unit)))
+
def ev_arg(path, mod, unit):
return '{}__int___ev_pb2.py={}_ev_pb2'.format(stripext(to_build_root(path, unit)), mod)
+
def mangle(name):
if '.' not in name:
return name
@@ -104,12 +114,15 @@ def parse_pyx_includes(filename, path, source_root, seen=None):
else:
ymake.report_configure_error("'{}' includes missing file: {} ({})".format(path, incfile, abs_path))
+
def has_pyx(args):
return any(arg.endswith('.pyx') for arg in args)
+
def get_srcdir(path, unit):
return rootrel_arc_src(path, unit)[:-len(path)].rstrip('/')
+
def add_python_lint_checks(unit, py_ver, files):
def get_resolved_files():
resolved_files = []
@@ -622,6 +635,7 @@ def onpy_constructor(unit, arg):
arg[arg.index(':')] = '='
unit.onresource(['-', 'py/constructors/{}'.format(arg)])
+
def onpy_enums_serialization(unit, *args):
ns = ''
args = iter(args)
@@ -638,6 +652,7 @@ def onpy_enums_serialization(unit, *args):
else:
onpy_srcs(unit, filename)
+
def oncpp_enums_serialization(unit, *args):
args = iter(args)
for arg in args:
diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py
index ba6d2b233a..00b3458a0b 100644
--- a/build/plugins/ytest.py
+++ b/build/plugins/ytest.py
@@ -17,7 +17,7 @@ import ymake
MDS_URI_PREFIX = 'https://storage.yandex-team.ru/get-devtools/'
-MDS_SHEME = 'mds'
+MDS_SCHEME = 'mds'
CANON_DATA_DIR_NAME = 'canondata'
CANON_OUTPUT_STORAGE = 'canondata_storage'
CANON_RESULT_FILE_NAME = 'result.json'
@@ -1070,7 +1070,7 @@ def _get_resource_from_uri(uri):
m = CANON_MDS_RESOURCE_REGEX.match(uri)
if m:
res_id = m.group(1)
- return "{}:{}".format(MDS_SHEME, res_id)
+ return "{}:{}".format(MDS_SCHEME, res_id)
m = CANON_SBR_RESOURCE_REGEX.match(uri)
if m: