diff options
author | nalpp <nalpp@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (patch) | |
tree | f4ab0734eecf35b22f21952d1aa15496f267a6a3 /build/plugins | |
parent | 198698b9c1e18958addc9682fbfba4576d604757 (diff) | |
download | ydb-87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb.tar.gz |
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins')
-rw-r--r-- | build/plugins/_common.py | 42 | ||||
-rw-r--r-- | build/plugins/_custom_command.py | 2 | ||||
-rw-r--r-- | build/plugins/_unpickler.py | 4 | ||||
-rw-r--r-- | build/plugins/java.py | 6 | ||||
-rw-r--r-- | build/plugins/macros_with_error.py | 12 | ||||
-rw-r--r-- | build/plugins/res.py | 2 | ||||
-rw-r--r-- | build/plugins/scarab_cant_clash.py | 10 |
7 files changed, 39 insertions, 39 deletions
diff --git a/build/plugins/_common.py b/build/plugins/_common.py index 2f831a94db..7a4753ced4 100644 --- a/build/plugins/_common.py +++ b/build/plugins/_common.py @@ -1,4 +1,4 @@ -import sys +import sys import hashlib import base64 @@ -165,26 +165,26 @@ def skip_build_root(x): return x -def get_interpreter_path(): - interpreter_path = [sys.executable] - if 'ymake' in interpreter_path[0]: - interpreter_path.append('--python') - return interpreter_path - - -def filter_out_by_keyword(test_data, keyword): - def _iterate(): - i = 0 - while i < len(test_data): - if test_data[i] == keyword: - i += 2 - else: - yield test_data[i] - i += 1 - - return list(_iterate()) - - +def get_interpreter_path(): + interpreter_path = [sys.executable] + if 'ymake' in interpreter_path[0]: + interpreter_path.append('--python') + return interpreter_path + + +def filter_out_by_keyword(test_data, keyword): + def _iterate(): + i = 0 + while i < len(test_data): + if test_data[i] == keyword: + i += 2 + else: + yield test_data[i] + i += 1 + + return list(_iterate()) + + def generate_chunks(lst, chunk_size): for i in xrange(0, len(lst), chunk_size): yield lst[i:(i + chunk_size)] diff --git a/build/plugins/_custom_command.py b/build/plugins/_custom_command.py index 9692214b22..e621a95c2b 100644 --- a/build/plugins/_custom_command.py +++ b/build/plugins/_custom_command.py @@ -61,5 +61,5 @@ def addrule(*unused): pass -def addparser(*unused, **kwargs): +def addparser(*unused, **kwargs): pass diff --git a/build/plugins/_unpickler.py b/build/plugins/_unpickler.py index e01e7b3118..3cc8da879d 100644 --- a/build/plugins/_unpickler.py +++ b/build/plugins/_unpickler.py @@ -9,9 +9,9 @@ try: except Exception: import pickle -import _common as common - +import _common as common + def main(): parser = argparse.ArgumentParser() parser.add_argument('--data', help='pickled object of TCustomCommand class', required=True) diff --git a/build/plugins/java.py b/build/plugins/java.py index 16fc126734..5d25f013c8 100644 --- a/build/plugins/java.py +++ b/build/plugins/java.py @@ -39,10 +39,10 @@ def on_run_jbuild_program(unit, *args): """ flat, kv = common.sort_by_keywords({'IN': -1, 'IN_DIR': -1, 'OUT': -1, 'OUT_DIR': -1, 'CWD': 1, 'CLASSPATH': -1, 'CP_USE_COMMAND_FILE': 1, 'ADD_SRCS_TO_CLASSPATH': 0}, args) - depends = kv.get('CLASSPATH', []) + kv.get('JAR', []) + depends = kv.get('CLASSPATH', []) + kv.get('JAR', []) fake_out = None - if depends: - # XXX: hack to force ymake to build dependencies + if depends: + # XXX: hack to force ymake to build dependencies fake_out = "fake.out.{}".format(hash(tuple(args))) unit.on_run_java(['TOOL'] + depends + ["OUT", fake_out]) diff --git a/build/plugins/macros_with_error.py b/build/plugins/macros_with_error.py index e82fb56d2c..ab2d532893 100644 --- a/build/plugins/macros_with_error.py +++ b/build/plugins/macros_with_error.py @@ -1,13 +1,13 @@ -import sys - +import sys + import _common - + import ymake -def onmacros_with_error(unit, *args): - print >> sys.stderr, 'This macros will fail' - raise Exception('Expected fail in MACROS_WITH_ERROR') +def onmacros_with_error(unit, *args): + print >> sys.stderr, 'This macros will fail' + raise Exception('Expected fail in MACROS_WITH_ERROR') def onrestrict_path(unit, *args): diff --git a/build/plugins/res.py b/build/plugins/res.py index a937caba81..532e299b95 100644 --- a/build/plugins/res.py +++ b/build/plugins/res.py @@ -1,4 +1,4 @@ -from _common import iterpair, listid, pathid, rootrel_arc_src, tobuilddir, filter_out_by_keyword +from _common import iterpair, listid, pathid, rootrel_arc_src, tobuilddir, filter_out_by_keyword def split(lst, limit): diff --git a/build/plugins/scarab_cant_clash.py b/build/plugins/scarab_cant_clash.py index 77dc303183..6431d056bf 100644 --- a/build/plugins/scarab_cant_clash.py +++ b/build/plugins/scarab_cant_clash.py @@ -17,10 +17,10 @@ def onacceleo(unit, *args): classpath = ['$SCARAB', ] # XXX special word for ya make to replace following paths with real classpath classpath.append('tools/acceleo') - depends = [] + depends = [] if not unit.get('IDE_MSVS_CALL'): for jar in classpath[1:]: - depends.append(jar) + depends.append(jar) classpath = ':'.join(classpath) @@ -60,7 +60,7 @@ def onacceleo(unit, *args): if kv.get(k): run_java += [k] + kv[k] - if depends: - run_java += ['TOOL'] + depends - + if depends: + run_java += ['TOOL'] + depends + unit.on_run_java(run_java) |