diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:40 +0300 |
commit | 5d50718e66d9c037dc587a0211110b7d25a66185 (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /build/plugins | |
parent | a6a92afe03e02795227d2641b49819b687f088f8 (diff) | |
download | ydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'build/plugins')
-rw-r--r-- | build/plugins/cpp_style.py | 2 | ||||
-rw-r--r-- | build/plugins/pybuild.py | 6 | ||||
-rw-r--r-- | build/plugins/rodata.py | 12 | ||||
-rw-r--r-- | build/plugins/yql_python_udf.py | 56 |
4 files changed, 38 insertions, 38 deletions
diff --git a/build/plugins/cpp_style.py b/build/plugins/cpp_style.py index 22fa9777170..3ab78b7320c 100644 --- a/build/plugins/cpp_style.py +++ b/build/plugins/cpp_style.py @@ -14,6 +14,6 @@ def on_style(unit, *args): continue yield f - yield '/cpp_style/files/' + f + yield '/cpp_style/files/' + f unit.onresource(list(it())) diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index d9e09cb9dd1..f32a2d39a0e 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -34,7 +34,7 @@ def uniq_suffix(path, unit): 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)), @@ -42,7 +42,7 @@ def pb2_arg(suf, path, mod, unit): mod=mod, modsuf=stripext(suf) ) - + def proto_arg(path, mod, unit): return '{}.proto={}'.format(stripext(to_build_root(path, unit)), mod) @@ -208,7 +208,7 @@ def onpy_srcs(unit, *args): unit_needs_main = unit.get('MODULE_TYPE') in ('PROGRAM', 'DLL') if unit_needs_main: py_program(unit, py3) - + py_namespace_value = unit.get('PY_NAMESPACE_VALUE') if py_namespace_value == ".": ns = "" diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py index cff6481d233..3ecb0f9a839 100644 --- a/build/plugins/rodata.py +++ b/build/plugins/rodata.py @@ -81,7 +81,7 @@ class ROData(iw.CustomCommand): in_file = self.resolve_path(common.get(self.input, 0)) in_file_no_ext = common.stripext(in_file) file_name = os.path.basename(in_file_no_ext) - file_size = os.path.getsize(in_file) + file_size = os.path.getsize(in_file) tmp_file = self.resolve_path(common.get(self.output, 0) + '.asm') parser = argparse.ArgumentParser(prog='rodata.py', add_help=False) @@ -95,12 +95,12 @@ class ROData(iw.CustomCommand): f.write('SECTION .rodata ALIGN=16\n') f.write(self._prefix + file_name + ':\nincbin "' + in_file + '"\n') f.write('align 4, db 0\n') - f.write(self._prefix + file_name + 'Size:\ndd ' + str(file_size) + '\n') + f.write(self._prefix + file_name + 'Size:\ndd ' + str(file_size) + '\n') + + if self._fmt.startswith('elf'): + f.write('size ' + self._prefix + file_name + ' ' + str(file_size) + '\n') + f.write('size ' + self._prefix + file_name + 'Size 4\n') - if self._fmt.startswith('elf'): - f.write('size ' + self._prefix + file_name + ' ' + str(file_size) + '\n') - f.write('size ' + self._prefix + file_name + 'Size 4\n') - return self.do_run(binary, tmp_file) def do_run(self, binary, path): diff --git a/build/plugins/yql_python_udf.py b/build/plugins/yql_python_udf.py index 1454129724f..c4f949d8a94 100644 --- a/build/plugins/yql_python_udf.py +++ b/build/plugins/yql_python_udf.py @@ -1,42 +1,42 @@ -from _common import sort_by_keywords - - -def get_or_default(kv, name, default): - if name in kv: - return kv[name][0] - return default - - -def onregister_yql_python_udf(unit, *args): +from _common import sort_by_keywords + + +def get_or_default(kv, name, default): + if name in kv: + return kv[name][0] + return default + + +def onregister_yql_python_udf(unit, *args): flat, kv = sort_by_keywords({'NAME': 1, 'RESOURCE_NAME': 1, 'ADD_LIBRA_MODULES': 1}, args) - assert len(flat) == 0 - name = get_or_default(kv, 'NAME', 'CustomPython') - resource_name = get_or_default(kv, 'RESOURCE_NAME', name) + assert len(flat) == 0 + name = get_or_default(kv, 'NAME', 'CustomPython') + resource_name = get_or_default(kv, 'RESOURCE_NAME', name) add_libra_modules = get_or_default(kv, 'ADD_LIBRA_MODULES', 'no') == 'yes' - - use_arcadia_python = unit.get('USE_ARCADIA_PYTHON') == 'yes' + + use_arcadia_python = unit.get('USE_ARCADIA_PYTHON') == 'yes' py3 = unit.get('PYTHON3') == 'yes' - + unit.onyql_abi_version(['2', '9', '0']) unit.onpeerdir(['yql/udfs/common/python/python_udf']) unit.onpeerdir(['ydb/library/yql/public/udf']) - + if add_libra_modules: unit.onpeerdir(['quality/user_sessions/libra_arc/noyql']) unit.onpeerdir(['yql/udfs/quality/libra/module']) - if use_arcadia_python: - flavor = 'Arcadia' - unit.onpeerdir([ - 'library/python/runtime', + if use_arcadia_python: + flavor = 'Arcadia' + unit.onpeerdir([ + 'library/python/runtime', 'yql/udfs/common/python/main' ] if not py3 else [ 'library/python/runtime_py3', 'yql/udfs/common/python/main_py3' - ]) - else: - flavor = 'System' - + ]) + else: + flavor = 'System' + output_includes = [ 'yql/udfs/common/python/python_udf/python_udf.h', 'ydb/library/yql/public/udf/udf_registrator.h', @@ -44,12 +44,12 @@ def onregister_yql_python_udf(unit, *args): if add_libra_modules: output_includes.append('yql/udfs/quality/libra/module/module.h') - path = name + '.yql_python_udf.cpp' + path = name + '.yql_python_udf.cpp' libra_flag = '1' if add_libra_modules else '0' unit.onpython([ - 'build/scripts/gen_yql_python_udf.py', + 'build/scripts/gen_yql_python_udf.py', flavor, name, resource_name, path, libra_flag, - 'OUT', path, + 'OUT', path, 'OUTPUT_INCLUDES', ] + output_includes ) |