diff options
author | spreis <spreis@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
commit | bcd1126cbd5d445cd0665d295198aa39c6ab8cbe (patch) | |
tree | d41d29a041d5733ef148335290dbb817b197d4cd /build/plugins | |
parent | 986cb5d624f352524bfa0c42c9a7695235cdaa41 (diff) | |
download | ydb-bcd1126cbd5d445cd0665d295198aa39c6ab8cbe.tar.gz |
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins')
-rw-r--r-- | build/plugins/build_mn_files.py | 4 | ||||
-rw-r--r-- | build/plugins/bundle.py | 18 | ||||
-rw-r--r-- | build/plugins/gobuild.py | 4 | ||||
-rw-r--r-- | build/plugins/large_files.py | 46 | ||||
-rw-r--r-- | build/plugins/lib/ya.make | 14 | ||||
-rw-r--r-- | build/plugins/lj_archive.py | 20 | ||||
-rw-r--r-- | build/plugins/macros_with_error.py | 12 | ||||
-rw-r--r-- | build/plugins/mx_archive.py | 12 | ||||
-rw-r--r-- | build/plugins/pybuild.py | 96 | ||||
-rw-r--r-- | build/plugins/res.py | 26 | ||||
-rw-r--r-- | build/plugins/split_codegen.py | 20 | ||||
-rw-r--r-- | build/plugins/swig.py | 6 | ||||
-rw-r--r-- | build/plugins/ya.make | 4 | ||||
-rw-r--r-- | build/plugins/ytest.py | 2 |
14 files changed, 142 insertions, 142 deletions
diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py index 4da76f1852..30a5472062 100644 --- a/build/plugins/build_mn_files.py +++ b/build/plugins/build_mn_files.py @@ -1,7 +1,7 @@ from os.path import basename, splitext -def on_build_mns_files(unit, *args): +def on_build_mns_files(unit, *args): files = [] name = '' ranking_suffix = '' @@ -26,4 +26,4 @@ def on_build_mns_files(unit, *args): file_basename, _ = splitext(basename(filename)) asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename) output_name = 'mn.staticMn{0}{1}Ptr.cpp'.format(ranking_suffix, file_basename) - unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname]) + unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname]) diff --git a/build/plugins/bundle.py b/build/plugins/bundle.py index 0bec8254ee..392c246d4f 100644 --- a/build/plugins/bundle.py +++ b/build/plugins/bundle.py @@ -2,14 +2,14 @@ import os def onbundle(unit, *args): - """ - @usage BUNDLE(<Dir [NAME Name]>...) - - Brings build artefact from module Dir under optional Name to the current module (e.g. UNION) - If NAME is not specified, the name of the Dir's build artefact will be preserved - It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice. - Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one. - """ + """ + @usage BUNDLE(<Dir [NAME Name]>...) + + Brings build artefact from module Dir under optional Name to the current module (e.g. UNION) + If NAME is not specified, the name of the Dir's build artefact will be preserved + It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice. + Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one. + """ i = 0 while i < len(args): if i + 2 < len(args) and args[i + 1] == "NAME": @@ -19,4 +19,4 @@ def onbundle(unit, *args): target, name = args[i], os.path.basename(args[i]) i += 1 - unit.on_bundle_target([target, name]) + unit.on_bundle_target([target, name]) diff --git a/build/plugins/gobuild.py b/build/plugins/gobuild.py index 8df96ebc55..42d92e261c 100644 --- a/build/plugins/gobuild.py +++ b/build/plugins/gobuild.py @@ -258,7 +258,7 @@ def on_go_process_srcs(unit): import_runtime_cgo = 'false' if import_path in import_runtime_cgo_false[race_mode] else 'true' import_syscall = 'false' if import_path in import_syscall_false[race_mode] else 'true' args = [import_path] + cgo_files + ['FLAGS', '-import_runtime_cgo=' + import_runtime_cgo, '-import_syscall=' + import_syscall] - unit.on_go_compile_cgo1(args) + unit.on_go_compile_cgo1(args) cgo2_cflags = get_appended_values(unit, 'CGO2_CFLAGS_VALUE') for f in cgo_files: if f.endswith('.go'): @@ -272,7 +272,7 @@ def on_go_process_srcs(unit): args += ['S_FILES'] + s_files if len(syso_files) > 0: args += ['OBJ_FILES'] + syso_files - unit.on_go_compile_cgo2(args) + unit.on_go_compile_cgo2(args) def on_go_resource(unit, *args): diff --git a/build/plugins/large_files.py b/build/plugins/large_files.py index 33a78d7110..30816f973b 100644 --- a/build/plugins/large_files.py +++ b/build/plugins/large_files.py @@ -1,39 +1,39 @@ -import os -import ymake -from _common import strip_roots - -PLACEHOLDER_EXT = "external" - - -def onlarge_files(unit, *args): - """ +import os +import ymake +from _common import strip_roots + +PLACEHOLDER_EXT = "external" + + +def onlarge_files(unit, *args): + """ @usage LARGE_FILES([AUTOUPDATED] Files...) - + Use large file ether from working copy or from remote storage via placeholder <File>.external If <File> is present locally (and not a symlink!) it will be copied to build directory. Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase. - """ - args = list(args) + """ + args = list(args) if args and args[0] == 'AUTOUPDATED': args = args[1:] - for arg in args: + for arg in args: if arg == 'AUTOUPDATED': unit.message(["warn", "Please set AUTOUPDATED argument before other file names"]) continue - src = unit.resolve_arc_path(arg) - if src.startswith("$S"): - msg = "Used local large file {}. Don't forget to run 'ya upload --update-external' and commit {}.{}".format(src, src, PLACEHOLDER_EXT) - unit.message(["warn", msg]) - unit.oncopy_file([arg, arg]) - else: - out_file = strip_roots(os.path.join(unit.path(), arg)) - external = "{}.{}".format(arg, PLACEHOLDER_EXT) + src = unit.resolve_arc_path(arg) + if src.startswith("$S"): + msg = "Used local large file {}. Don't forget to run 'ya upload --update-external' and commit {}.{}".format(src, src, PLACEHOLDER_EXT) + unit.message(["warn", msg]) + unit.oncopy_file([arg, arg]) + else: + out_file = strip_roots(os.path.join(unit.path(), arg)) + external = "{}.{}".format(arg, PLACEHOLDER_EXT) from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg] if os.path.dirname(arg): from_external_cmd.extend(("RENAME", os.path.basename(arg))) unit.on_from_external(from_external_cmd) - unit.onadd_check(['check.external', external]) - + unit.onadd_check(['check.external', external]) + diff --git a/build/plugins/lib/ya.make b/build/plugins/lib/ya.make index 7e61d12080..3e21486fdd 100644 --- a/build/plugins/lib/ya.make +++ b/build/plugins/lib/ya.make @@ -1,7 +1,7 @@ -OWNER(g:ymake)
-
-PY23_LIBRARY()
- PY_SRCS(
- _metric_resolvers.py
- )
-END()
+OWNER(g:ymake) + +PY23_LIBRARY() + PY_SRCS( + _metric_resolvers.py + ) +END() diff --git a/build/plugins/lj_archive.py b/build/plugins/lj_archive.py index 1d80bb98f3..dec0abb870 100644 --- a/build/plugins/lj_archive.py +++ b/build/plugins/lj_archive.py @@ -1,8 +1,8 @@ def onlj_archive(unit, *args): - """ - @usage: LJ_ARCHIVE(NAME Name LuaFiles...) - Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys - """ + """ + @usage: LJ_ARCHIVE(NAME Name LuaFiles...) + Precompile .lua files using LuaJIT and archive both sources and results using sources names as keys + """ def iter_luas(l): for a in l: if a.endswith('.lua'): @@ -11,7 +11,7 @@ def onlj_archive(unit, *args): def iter_objs(l): for a in l: s = a[:-3] + 'raw' - unit.on_luajit_objdump(['OUT', s, a]) + unit.on_luajit_objdump(['OUT', s, a]) yield s luas = list(iter_luas(args)) @@ -21,10 +21,10 @@ def onlj_archive(unit, *args): unit.onarchive_by_keys(['DONTCOMPRESS', 'NAME', 'LuaSources.inc', 'KEYS', ':'.join(luas)] + luas) def onlj_21_archive(unit, *args): - """ - @usage: LJ_21_ARCHIVE(NAME Name LuaFiles...) # deprecated - Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys - """ + """ + @usage: LJ_21_ARCHIVE(NAME Name LuaFiles...) # deprecated + Precompile .lua files using LuaJIT 2.1 and archive both sources and results using sources names as keys + """ def iter_luas(l): for a in l: if a.endswith('.lua'): @@ -33,7 +33,7 @@ def onlj_21_archive(unit, *args): def iter_objs(l): for a in l: s = a[:-3] + 'raw' - unit.on_luajit_21_objdump(['OUT', s, a]) + unit.on_luajit_21_objdump(['OUT', s, a]) yield s luas = list(iter_luas(args)) diff --git a/build/plugins/macros_with_error.py b/build/plugins/macros_with_error.py index e82fb56d2c..780c76f4f1 100644 --- a/build/plugins/macros_with_error.py +++ b/build/plugins/macros_with_error.py @@ -21,9 +21,9 @@ def onrestrict_path(unit, *args): if not _common.strip_roots(unit.path()).startswith(paths): error_msg = "Path '[[imp]]{}[[rst]]' is restricted - [[bad]]{}[[rst]]. Valid path prefixes are: [[unimp]]{}[[rst]]".format(unit.path(), msg, ', '.join(paths)) ymake.report_configure_error(error_msg) - -def onassert(unit, *args): - val = unit.get(args[0]) - if val and val.lower() == "no": - msg = ' '.join(args[1:]) - ymake.report_configure_error(msg) + +def onassert(unit, *args): + val = unit.get(args[0]) + if val and val.lower() == "no": + msg = ' '.join(args[1:]) + ymake.report_configure_error(msg) diff --git a/build/plugins/mx_archive.py b/build/plugins/mx_archive.py index 56b0d4d16e..9937d7fd5a 100644 --- a/build/plugins/mx_archive.py +++ b/build/plugins/mx_archive.py @@ -1,16 +1,16 @@ def onmx_formulas(unit, *args): - """ - @usage: MX_FORMULAS(BinFiles...) # deprecated, matrixnet - Create MatrixNet formulas archive - """ + """ + @usage: MX_FORMULAS(BinFiles...) # deprecated, matrixnet + Create MatrixNet formulas archive + """ def iter_infos(): for a in args: if a.endswith('.bin'): - unit.on_mx_bin_to_info([a]) + unit.on_mx_bin_to_info([a]) yield a[:-3] + 'info' else: yield a infos = list(iter_infos()) unit.onarchive_asm(['NAME', 'MxFormulas'] + infos) - unit.on_mx_gen_table(infos) + unit.on_mx_gen_table(infos) diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index f32a2d39a0..2a6f6b2a0c 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -3,12 +3,12 @@ import collections from hashlib import md5 import ymake -from _common import stripext, rootrel_arc_src, tobuilddir, listid, resolve_to_ymake_path, generate_chunks, pathid +from _common import stripext, rootrel_arc_src, tobuilddir, listid, resolve_to_ymake_path, generate_chunks, pathid YA_IDE_VENV_VAR = 'YA_IDE_VENV' PY_NAMESPACE_PREFIX = 'py/namespace' -BUILTIN_PROTO = 'builtin_proto' +BUILTIN_PROTO = 'builtin_proto' def is_arc_src(src, unit): return ( @@ -29,11 +29,11 @@ def to_build_root(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 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( @@ -104,8 +104,8 @@ 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 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('/') @@ -170,8 +170,8 @@ def py_program(unit, py3): def onpy_srcs(unit, *args): """ - @usage PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...) - + @usage PY_SRCS({| CYTHON_C} { | TOP_LEVEL | NAMESPACE ns} Files...) + PY_SRCS() - is rule to build extended versions of Python interpreters and containing all application code in its executable file. It can be used to collect only the executables but not shared libraries, and, in particular, not to collect the modules that are imported using import directive. The main disadvantage is the lack of IDE support; There is also no readline yet. The application can be collect from any of the sources from which the C library, and with the help of PY_SRCS .py , .pyx,.proto and .swg files. @@ -182,16 +182,16 @@ def onpy_srcs(unit, *args): Example of library declaration with PY_SRCS(): PY2_LIBRARY(mymodule) - PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg) + PY_SRCS(a.py sub/dir/b.py e.proto sub/dir/f.proto c.pyx sub/dir/d.pyx g.swg sub/dir/h.swg) END() - PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module - Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs + PY_REGISTER honors Python2 and Python3 differences and adjusts itself to Python version of a current module + Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs """ # Each file arg must either be a path, or "${...}/buildpath=modname", where # "${...}/buildpath" part will be used as a file source in a future macro, # and "modname" will be used as a module name. - + upath = unit.path()[3:] py3 = is_py3(unit) py_main_only = unit.get('PROCESS_PY_MAIN_ONLY') @@ -200,7 +200,7 @@ def onpy_srcs(unit, *args): in_proto_library = unit.get('PY_PROTO') or unit.get('PY3_PROTO') venv = unit.get(YA_IDE_VENV_VAR) need_gazetteer_peerdir = False - trim = 0 + trim = 0 if not upath.startswith('contrib/tools/python') and not upath.startswith('library/python/runtime') and unit.get('NO_PYTHON_INCLS') != 'yes': unit.onpeerdir(['contrib/libs/python']) @@ -217,7 +217,7 @@ def onpy_srcs(unit, *args): cython_coverage = unit.get('CYTHON_COVERAGE') == 'yes' cythonize_py = False - optimize_proto = unit.get('OPTIMIZE_PY_PROTOS_FLAG') == 'yes' + optimize_proto = unit.get('OPTIMIZE_PY_PROTOS_FLAG') == 'yes' cython_directives = [] if cython_coverage: @@ -274,10 +274,10 @@ def onpy_srcs(unit, *args): # Unsupported but legal PROTO_LIBRARY arguments. elif arg == 'GLOBAL' or not in_proto_library and arg.endswith('.gztproto'): pass - elif arg == '_MR': - # GLOB support: convert arcadia-root-relative paths to module-relative - # srcs are assumed to start with ${ARCADIA_ROOT} - trim = len(unit.path()) + 14 + elif arg == '_MR': + # GLOB support: convert arcadia-root-relative paths to module-relative + # srcs are assumed to start with ${ARCADIA_ROOT} + trim = len(unit.path()) + 14 # Sources. else: main_mod = arg == 'MAIN' @@ -288,8 +288,8 @@ def onpy_srcs(unit, *args): main_py = False path, mod = arg.split('=', 1) else: - if trim: - arg = arg[trim:] + if trim: + arg = arg[trim:] if arg.endswith('.gztproto'): need_gazetteer_peerdir = True path = '{}.proto'.format(arg[:-9]) @@ -381,10 +381,10 @@ def onpy_srcs(unit, *args): pass for pyxs, cython, out_suffix, noext in [ - (pyxs_c, unit.on_buildwith_cython_c_dep, ".c", False), - (pyxs_c_h, unit.on_buildwith_cython_c_h, ".c", True), - (pyxs_c_api_h, unit.on_buildwith_cython_c_api_h, ".c", True), - (pyxs_cpp, unit.on_buildwith_cython_cpp_dep, ".cpp", False), + (pyxs_c, unit.on_buildwith_cython_c_dep, ".c", False), + (pyxs_c_h, unit.on_buildwith_cython_c_h, ".c", True), + (pyxs_c_api_h, unit.on_buildwith_cython_c_api_h, ".c", True), + (pyxs_cpp, unit.on_buildwith_cython_cpp_dep, ".cpp", False), ]: for path, mod in pyxs: filename = rootrel_arc_src(path, unit) @@ -476,9 +476,9 @@ def onpy_srcs(unit, *args): ] if with_pyc: src = unit.resolve_arc_path(path) or path - dst = path + uniq_suffix(path, unit) - unit.on_py_compile_bytecode([root_rel_path + '-', src, dst]) - res += [dst + '.yapyc', '/py_code/' + mod] + dst = path + uniq_suffix(path, unit) + unit.on_py_compile_bytecode([root_rel_path + '-', src, dst]) + res += [dst + '.yapyc', '/py_code/' + mod] unit.onresource(res) add_python_lint_checks(unit, 2, [path for path, mod in pys] + unit.get(['_PY_EXTRA_LINT_FILES_VALUE']).split()) @@ -500,7 +500,7 @@ def onpy_srcs(unit, *args): unit.onpeerdir(unit.get("PY_PROTO_DEPS").split()) proto_paths = [path for path, mod in protos] - unit.on_generate_py_protos_internal(proto_paths) + unit.on_generate_py_protos_internal(proto_paths) unit.onpy_srcs([ pb2_arg(py_suf, path, mod, unit) for path, mod in protos @@ -509,10 +509,10 @@ def onpy_srcs(unit, *args): if optimize_proto and need_gazetteer_peerdir: unit.onpeerdir(['kernel/gazetteer/proto']) - + if evs: unit.onpeerdir([cpp_runtime_path]) - unit.on_generate_py_evs_internal([path for path, mod in evs]) + unit.on_generate_py_evs_internal([path for path, mod in evs]) unit.onpy_srcs([ev_arg(path, mod, unit) for path, mod in evs]) if fbss: @@ -520,7 +520,7 @@ def onpy_srcs(unit, *args): pysrc_base_name = listid(fbss) unit.onfbs_to_pysrc([pysrc_base_name] + [path for path, _ in fbss]) unit.onsrcs(['GLOBAL', '{}.fbs.pysrc'.format(pysrc_base_name)]) - + def _check_test_srcs(*args): used = set(args) & {"NAMESPACE", "TOP_LEVEL", "__main__.py"} @@ -536,12 +536,12 @@ def ontest_srcs(unit, *args): def onpy_doctests(unit, *args): - """ - @usage PY_DOCTEST(Packages...) - - Add to the test doctests for specified Python packages - The packages should be part of a test (listed as sources of the test or its PEERDIRs). - """ + """ + @usage PY_DOCTEST(Packages...) + + Add to the test doctests for specified Python packages + The packages should be part of a test (listed as sources of the test or its PEERDIRs). + """ if unit.get('PY3TEST_BIN' if is_py3(unit) else 'PYTEST_BIN') != 'no': unit.onresource(['-', 'PY_DOCTEST_PACKAGES="{}"'.format(' '.join(args))]) @@ -556,17 +556,17 @@ def py_register(unit, func, py3): def onpy_register(unit, *args): """ @usage: PY_REGISTER([package.]module_name) - + Python knows about which built-ins can be imported, due to their registration in the Assembly or at the start of the interpreter. All modules from the sources listed in PY_SRCS() are registered automatically. To register the modules from the sources in the SRCS(), you need to use PY_REGISTER(). - - PY_REGISTER(module_name) initializes module globally via call to initmodule_name() + + PY_REGISTER(module_name) initializes module globally via call to initmodule_name() PY_REGISTER(package.module_name) initializes module in the specified package It renames its init function with CFLAGS(-Dinitmodule_name=init7package11module_name) or CFLAGS(-DPyInit_module_name=PyInit_7package11module_name) - - Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister + + Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#makrospyregister """ py3 = is_py3(unit) @@ -593,11 +593,11 @@ def py_main(unit, arg): def onpy_main(unit, arg): """ - @usage: PY_MAIN(package.module[:func]) + @usage: PY_MAIN(package.module[:func]) - Specifies the module or function from which to start executing a python program + Specifies the module or function from which to start executing a python program - Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain + Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipyprogrampy3programimakrospymain """ arg = arg.replace('/', '.') diff --git a/build/plugins/res.py b/build/plugins/res.py index a937caba81..d5f0a98826 100644 --- a/build/plugins/res.py +++ b/build/plugins/res.py @@ -52,10 +52,10 @@ def onfat_resource(unit, *args): def onresource_files(unit, *args): """ - @usage: RESOURCE_FILES([DONT_PARSE] [PREFIX {prefix}] [STRIP prefix_to_strip] {path}) - - This macro expands into - RESOURCE([DONT_PARSE] {path} resfs/file/{prefix}{path} + @usage: RESOURCE_FILES([DONT_PARSE] [PREFIX {prefix}] [STRIP prefix_to_strip] {path}) + + This macro expands into + RESOURCE([DONT_PARSE] {path} resfs/file/{prefix}{path} - resfs/src/resfs/file/{prefix}{remove_prefix(path, prefix_to_strip)}={rootrel_arc_src(path)} ) @@ -65,28 +65,28 @@ def onresource_files(unit, *args): resfs/file/{key} stores any value whose source was a file on a filesystem. resfs/src/resfs/file/{key} must store its path. - DONT_PARSE disables parsing for source code files (determined by extension) - Please don't abuse: use separate DONT_PARSE macro call only for files subject to parsing - + DONT_PARSE disables parsing for source code files (determined by extension) + Please don't abuse: use separate DONT_PARSE macro call only for files subject to parsing + This form is for use from other plugins: RESOURCE_FILES([DEST {dest}] {path}) expands into RESOURCE({path} resfs/file/{dest}) - - @see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/ + + @see: https://wiki.yandex-team.ru/devtools/commandsandvars/resourcefiles/ """ prefix = '' prefix_to_strip = None dest = None res = [] - first = 0 + first = 0 if args and not unit.enabled('_GO_MODULE'): # GO_RESOURCE currently doesn't support DONT_PARSE res.append('DONT_PARSE') - if args and args[0] == 'DONT_PARSE': - first = 1 + if args and args[0] == 'DONT_PARSE': + first = 1 - args = iter(args[first:]) + args = iter(args[first:]) for arg in args: if arg == 'PREFIX': prefix, dest = next(args), None diff --git a/build/plugins/split_codegen.py b/build/plugins/split_codegen.py index f1e60bc142..f5e874a48b 100644 --- a/build/plugins/split_codegen.py +++ b/build/plugins/split_codegen.py @@ -7,15 +7,15 @@ _ADDITIONAL_STREAM_COUNT = 5 def onsplit_codegen(unit, *args): - ''' - @usage: SPLIT_CODEGEN(tool prefix opts... [OUT_NUM num] [OUTPUT_INCLUDES output_includes...]) - - Generator of a certain number of parts of the .cpp file + one header .h file from .in - - Supports keywords: - 1. OUT_NUM <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)> - 2. OUTPUT_INCLUDES <path to files that will be included in generalnyj of macro files> - ''' + ''' + @usage: SPLIT_CODEGEN(tool prefix opts... [OUT_NUM num] [OUTPUT_INCLUDES output_includes...]) + + Generator of a certain number of parts of the .cpp file + one header .h file from .in + + Supports keywords: + 1. OUT_NUM <the number of generated Prefix.N.cpp default 25 (N varies from 0 to 24)> + 2. OUTPUT_INCLUDES <path to files that will be included in generalnyj of macro files> + ''' keywords = {"OUT_NUM": 1} flat_args, spec_args = sort_by_keywords(keywords, args) @@ -40,4 +40,4 @@ def onsplit_codegen(unit, *args): else: cmd += ['OPTS'] + cpp_parts_args - unit.on_split_codegen_base(cmd) + unit.on_split_codegen_base(cmd) diff --git a/build/plugins/swig.py b/build/plugins/swig.py index 32a37204a6..b8953935b8 100644 --- a/build/plugins/swig.py +++ b/build/plugins/swig.py @@ -66,7 +66,7 @@ class Swig(iw.CustomCommand): unit.onpeerdir(['build/platform/perl']) if self._swig_lang in ['jni_cpp', 'java']: - self._out_header = os.path.splitext(self._main_out)[0] + '.h' + self._out_header = os.path.splitext(self._main_out)[0] + '.h' if (not unit.get('USE_SYSTEM_JDK')) and (unit.get('OS_ANDROID') != "yes"): unit.onpeerdir(['contrib/libs/jdk']) @@ -101,9 +101,9 @@ class Swig(iw.CustomCommand): (common.join_intl_paths(self._bindir, self._out_name), (['noauto', 'add_to_outs'] if self._swig_lang != 'java' else [])), ] + ([(self._out_header, [])] if self._swig_lang == 'java' else []) - def output_includes(self): + def output_includes(self): return [(self._out_header, [])] if self._swig_lang in ['java', 'jni_cpp'] else [] - + def run(self, extra_args, binary): if self._local_swig: binary = self._tool diff --git a/build/plugins/ya.make b/build/plugins/ya.make index 4ad5f5988e..0e4969e656 100644 --- a/build/plugins/ya.make +++ b/build/plugins/ya.make @@ -14,8 +14,8 @@ PY_SRCS( _test_const.py ) -PEERDIR(build/plugins/lib) - +PEERDIR(build/plugins/lib) + END() RECURSE( diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py index 8970837f0f..46616e22f3 100644 --- a/build/plugins/ytest.py +++ b/build/plugins/ytest.py @@ -6,7 +6,7 @@ import copy import base64 import shlex import _common -import lib._metric_resolvers as mr +import lib._metric_resolvers as mr import _test_const as consts import _requirements as reqs import StringIO |