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 | |
parent | 198698b9c1e18958addc9682fbfba4576d604757 (diff) | |
download | ydb-87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb.tar.gz |
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build')
-rw-r--r-- | build/external_resources/codenavigation/ya.make | 18 | ||||
-rw-r--r-- | build/platform/clang/ya.make | 2 | ||||
-rw-r--r-- | build/platform/lld/ya.make | 2 | ||||
-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 | ||||
-rw-r--r-- | build/scripts/compile_cuda.py | 4 | ||||
-rw-r--r-- | build/scripts/coverage-info.py | 6 | ||||
-rwxr-xr-x | build/scripts/fetch_from_sandbox.py | 60 | ||||
-rw-r--r-- | build/scripts/move.py | 30 | ||||
-rw-r--r-- | build/scripts/python_yndexer.py | 100 | ||||
-rw-r--r-- | build/scripts/run_msvc_wine.py | 2 | ||||
-rw-r--r-- | build/scripts/yndexer.py | 94 | ||||
-rw-r--r-- | build/ya.conf.json | 116 | ||||
-rw-r--r-- | build/ymake.core.conf | 68 | ||||
-rwxr-xr-x | build/ymake_conf.py | 20 |
20 files changed, 300 insertions, 300 deletions
diff --git a/build/external_resources/codenavigation/ya.make b/build/external_resources/codenavigation/ya.make index 8cfdf0d3d5..aa0ab3ca22 100644 --- a/build/external_resources/codenavigation/ya.make +++ b/build/external_resources/codenavigation/ya.make @@ -1,14 +1,14 @@ OWNER(g:yatool) - -RESOURCES_LIBRARY() - + +RESOURCES_LIBRARY() + NO_CODENAVIGATION() -NO_RUNTIME() - -IF (OS_LINUX) +NO_RUNTIME() + +IF (OS_LINUX) DECLARE_EXTERNAL_RESOURCE(CPPYNDEXER sbr:2218884955) DECLARE_EXTERNAL_RESOURCE(PYNDEXER sbr:2112287762) DECLARE_EXTERNAL_RESOURCE(PY3YNDEXER sbr:2670411952) -ENDIF() - -END() +ENDIF() + +END() diff --git a/build/platform/clang/ya.make b/build/platform/clang/ya.make index 342b928637..cd74e2106e 100644 --- a/build/platform/clang/ya.make +++ b/build/platform/clang/ya.make @@ -1,4 +1,4 @@ -RESOURCES_LIBRARY() +RESOURCES_LIBRARY() LICENSE(BSD-3-Clause) diff --git a/build/platform/lld/ya.make b/build/platform/lld/ya.make index c046e89098..034457514a 100644 --- a/build/platform/lld/ya.make +++ b/build/platform/lld/ya.make @@ -1,4 +1,4 @@ -RESOURCES_LIBRARY() +RESOURCES_LIBRARY() LICENSE(Service-Prebuilt-Tool) 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) diff --git a/build/scripts/compile_cuda.py b/build/scripts/compile_cuda.py index c0bec50b2a..ebbaa9610e 100644 --- a/build/scripts/compile_cuda.py +++ b/build/scripts/compile_cuda.py @@ -60,8 +60,8 @@ def main(): skip_list.append('-nostdinc++') for flag in skip_list: - if flag in cflags: - cflags.remove(flag) + if flag in cflags: + cflags.remove(flag) skip_prefix_list = [ '-fsanitize=', diff --git a/build/scripts/coverage-info.py b/build/scripts/coverage-info.py index 94491d9256..f5452c893e 100644 --- a/build/scripts/coverage-info.py +++ b/build/scripts/coverage-info.py @@ -242,9 +242,9 @@ def main(source_root, output, gcno_archive, gcda_archive, gcov_tool, prefix_filt else: output_dir = output + '.dir' - if not os.path.exists(output_dir): - os.makedirs(output_dir) - + if not os.path.exists(output_dir): + os.makedirs(output_dir) + teamcity_stat_file = None if teamcity_stat_output: teamcity_stat_file = os.path.join(output_dir, 'teamcity.out') diff --git a/build/scripts/fetch_from_sandbox.py b/build/scripts/fetch_from_sandbox.py index a99542e174..a71259e45c 100755 --- a/build/scripts/fetch_from_sandbox.py +++ b/build/scripts/fetch_from_sandbox.py @@ -31,14 +31,14 @@ class ResourceInfoError(Exception): pass -class UnsupportedProtocolException(Exception): - pass - - +class UnsupportedProtocolException(Exception): + pass + + def _sky_path(): return "/usr/local/bin/sky" - - + + def _is_skynet_avaliable(): if not os.path.exists(_sky_path()): return False @@ -52,28 +52,28 @@ def _is_skynet_avaliable(): def download_by_skynet(resource_info, file_name): - def sky_get(skynet_id, target_dir, timeout=None): + def sky_get(skynet_id, target_dir, timeout=None): cmd_args = [_sky_path(), 'get', "-N", "Backbone", "--user", "--wait", "--dir", target_dir, skynet_id] - if timeout is not None: - cmd_args += ["--timeout", str(timeout)] + if timeout is not None: + cmd_args += ["--timeout", str(timeout)] logging.info('Call skynet with args: %s', cmd_args) - stdout = subprocess.check_output(cmd_args).strip() - logging.debug('Skynet call with args %s is finished, result is %s', cmd_args, stdout) - return stdout - + stdout = subprocess.check_output(cmd_args).strip() + logging.debug('Skynet call with args %s is finished, result is %s', cmd_args, stdout) + return stdout + if not _is_skynet_avaliable(): - raise UnsupportedProtocolException("Skynet is not available") - - skynet_id = resource_info.get("skynet_id") - if not skynet_id: - raise ValueError("Resource does not have skynet_id") - + raise UnsupportedProtocolException("Skynet is not available") + + skynet_id = resource_info.get("skynet_id") + if not skynet_id: + raise ValueError("Resource does not have skynet_id") + temp_dir = os.path.abspath(fetch_from.uniq_string_generator()) - os.mkdir(temp_dir) - sky_get(skynet_id, temp_dir) - return os.path.join(temp_dir, file_name) - - + os.mkdir(temp_dir) + sky_get(skynet_id, temp_dir) + return os.path.join(temp_dir, file_name) + + def _urlopen(url, data=None, headers=None): n = 10 tout = 30 @@ -154,11 +154,11 @@ def fetch(resource_id, custom_fetcher): mds_id = resource_info.get('attributes', {}).get('mds') mds_link = MDS_PREFIX + mds_id if mds_id else None - def get_storage_links(): - storage_links = get_resource_http_links(resource_id) - random.shuffle(storage_links) - return storage_links - + def get_storage_links(): + storage_links = get_resource_http_links(resource_id) + random.shuffle(storage_links) + return storage_links + skynet = _is_skynet_avaliable() if not skynet: @@ -173,7 +173,7 @@ def fetch(resource_id, custom_fetcher): # Don't try too hard here: we will get back to proxy later on yield lambda: fetch_from.fetch_url(proxy_link, False, resource_file_name, expected_md5, tries=2) - for x in get_storage_links(): + for x in get_storage_links(): # Don't spend too much time connecting single host yield lambda: fetch_from.fetch_url(x, False, resource_file_name, expected_md5, tries=1) if mds_link is not None: diff --git a/build/scripts/move.py b/build/scripts/move.py index 3f611fbc2e..d710c493cd 100644 --- a/build/scripts/move.py +++ b/build/scripts/move.py @@ -1,15 +1,15 @@ -import os -import sys - -# /script/move.py <src-1> <tgt-1> <src-2> <tgt-2> ... <src-n> <tgt-n> -# renames src-1 to tgt-1, src-2 to tgt-2, ..., src-n to tgt-n. - - -def main(): - assert len(sys.argv) % 2 == 1 - for index in range(1, len(sys.argv), 2): - os.rename(sys.argv[index], sys.argv[index + 1]) - - -if __name__ == '__main__': - main() +import os +import sys + +# /script/move.py <src-1> <tgt-1> <src-2> <tgt-2> ... <src-n> <tgt-n> +# renames src-1 to tgt-1, src-2 to tgt-2, ..., src-n to tgt-n. + + +def main(): + assert len(sys.argv) % 2 == 1 + for index in range(1, len(sys.argv), 2): + os.rename(sys.argv[index], sys.argv[index + 1]) + + +if __name__ == '__main__': + main() diff --git a/build/scripts/python_yndexer.py b/build/scripts/python_yndexer.py index 3180665387..2ffcb104f4 100644 --- a/build/scripts/python_yndexer.py +++ b/build/scripts/python_yndexer.py @@ -1,53 +1,53 @@ -import os -import sys -import threading -import subprocess - - -def _try_to_kill(process): - try: - process.kill() - except Exception: - pass - - -def touch(path): - if not os.path.exists(path): - with open(path, 'w') as _: - pass - - -class Process(object): - def __init__(self, args): - self._process = subprocess.Popen(args) - self._event = threading.Event() - self._result = None - thread = threading.Thread(target=self._run) - thread.setDaemon(True) - thread.start() - - def _run(self): - self._process.communicate() - self._result = self._process.returncode - self._event.set() - - def wait(self, timeout): - self._event.wait(timeout=timeout) - _try_to_kill(self._process) - return self._result - - -if __name__ == '__main__': - yndexer = sys.argv[1] - timeout = int(sys.argv[2]) - output_file = sys.argv[3] - input_file = sys.argv[4] +import os +import sys +import threading +import subprocess + + +def _try_to_kill(process): + try: + process.kill() + except Exception: + pass + + +def touch(path): + if not os.path.exists(path): + with open(path, 'w') as _: + pass + + +class Process(object): + def __init__(self, args): + self._process = subprocess.Popen(args) + self._event = threading.Event() + self._result = None + thread = threading.Thread(target=self._run) + thread.setDaemon(True) + thread.start() + + def _run(self): + self._process.communicate() + self._result = self._process.returncode + self._event.set() + + def wait(self, timeout): + self._event.wait(timeout=timeout) + _try_to_kill(self._process) + return self._result + + +if __name__ == '__main__': + yndexer = sys.argv[1] + timeout = int(sys.argv[2]) + output_file = sys.argv[3] + input_file = sys.argv[4] partition_count = sys.argv[5] partition_index = sys.argv[6] - + process = Process([yndexer, '-f', input_file, '-y', output_file, '-c', partition_count, '-i', partition_index]) - result = process.wait(timeout=timeout) - - if result != 0: - print >> sys.stderr, 'Yndexing process finished with code', result - touch(output_file) + result = process.wait(timeout=timeout) + + if result != 0: + print >> sys.stderr, 'Yndexing process finished with code', result + touch(output_file) diff --git a/build/scripts/run_msvc_wine.py b/build/scripts/run_msvc_wine.py index 439d1f8831..885f6250db 100644 --- a/build/scripts/run_msvc_wine.py +++ b/build/scripts/run_msvc_wine.py @@ -470,7 +470,7 @@ def run_main(): 'tout': tout } - slave_cmd = [sys.executable, sys.argv[0], wine, 'slave', json.dumps(args)] + slave_cmd = [sys.executable, sys.argv[0], wine, 'slave', json.dumps(args)] p = run_subprocess(slave_cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=False) out, _ = p.communicate() return p.wait(), out diff --git a/build/scripts/yndexer.py b/build/scripts/yndexer.py index a38e28ba99..007724d9a3 100644 --- a/build/scripts/yndexer.py +++ b/build/scripts/yndexer.py @@ -1,56 +1,56 @@ import sys import subprocess -import threading +import threading import os import re - + rx_resource_dir = re.compile(r'libraries: =([^:]*)') - -def _try_to_kill(process): - try: - process.kill() - except Exception: - pass - - -def touch(path): - if not os.path.exists(path): + +def _try_to_kill(process): + try: + process.kill() + except Exception: + pass + + +def touch(path): + if not os.path.exists(path): with open(path, 'w'): - pass - - -class Process(object): - def __init__(self, args): - self._process = subprocess.Popen(args) - self._event = threading.Event() - self._result = None - thread = threading.Thread(target=self._run) - thread.setDaemon(True) - thread.start() - - def _run(self): - self._process.communicate() - self._result = self._process.returncode - self._event.set() - - def wait(self, timeout): - self._event.wait(timeout=timeout) - _try_to_kill(self._process) - return self._result - - + pass + + +class Process(object): + def __init__(self, args): + self._process = subprocess.Popen(args) + self._event = threading.Event() + self._result = None + thread = threading.Thread(target=self._run) + thread.setDaemon(True) + thread.start() + + def _run(self): + self._process.communicate() + self._result = self._process.returncode + self._event.set() + + def wait(self, timeout): + self._event.wait(timeout=timeout) + _try_to_kill(self._process) + return self._result + + if __name__ == '__main__': args = sys.argv yndexer = args[1] - timeout = int(args[2]) - arc_root = args[3] - build_root = args[4] - input_file = args[5] - output_file = args[-1] - tail_args = args[6:-1] + timeout = int(args[2]) + arc_root = args[3] + build_root = args[4] + input_file = args[5] + output_file = args[-1] + tail_args = args[6:-1] subprocess.check_call(tail_args) @@ -71,9 +71,9 @@ if __name__ == '__main__': '-resource-dir', resource_dir, ] - process = Process(yndexer_args) - result = process.wait(timeout=timeout) - - if result != 0: - print >> sys.stderr, 'Yndexing process finished with code', result - touch(output_file) + process = Process(yndexer_args) + result = process.wait(timeout=timeout) + + if result != 0: + print >> sys.stderr, 'Yndexing process finished with code', result + touch(output_file) diff --git a/build/ya.conf.json b/build/ya.conf.json index 5f7cc875d6..4fed90c539 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -2788,13 +2788,13 @@ } ] }, - "python": { - "tools": { + "python": { + "tools": { "python": { "bottle": "python", "executable": "python" } - }, + }, "platforms": [ { "host": { @@ -2836,7 +2836,7 @@ "default": true } ] - }, + }, "ipython": { "tools": { "ipython": { @@ -2963,14 +2963,14 @@ } ] }, - "yndexer": { - "tools": { + "yndexer": { + "tools": { "yndexer": { "bottle": "yndexer", "executable": "yndexer" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -2983,16 +2983,16 @@ }, "default": true } - ] - }, - "ytyndexer": { - "tools": { + ] + }, + "ytyndexer": { + "tools": { "ytyndexer": { "bottle": "ytyndexer", "executable": "ytyndexer" } - }, - "platforms": [ + }, + "platforms": [ { "host": { "os": "LINUX" @@ -3005,8 +3005,8 @@ }, "default": true } - ] - }, + ] + }, "ymakeyndexer": { "tools": { "ymakeyndexer": { @@ -3165,8 +3165,8 @@ } ] }, - "jdk": { - "tools": { + "jdk": { + "tools": { "javac": { "bottle": "jdk", "executable": "javac" @@ -3179,7 +3179,7 @@ "bottle": "jdk", "executable": "jar" } - }, + }, "platforms": [ { "host": { @@ -3200,7 +3200,7 @@ "default": true } ] - }, + }, "jdk10": { "tools": { "javac10": { @@ -5933,17 +5933,17 @@ ] } }, - "python": { - "formula": { + "python": { + "formula": { "sandbox_id": 981577320, - "match": "Python" - }, - "executable": { + "match": "Python" + }, + "executable": { "python": [ "python" ] - } - }, + } + }, "bloat": { "formula": { "sandbox_id": [ @@ -5957,17 +5957,17 @@ ] } }, - "jdk": { - "formula": { + "jdk": { + "formula": { "sandbox_id": [ 854293674, 854378931, 854302209, 1054292521 ], - "match": "jdk" - }, - "executable": { + "match": "jdk" + }, + "executable": { "javac": [ "bin", "javac" @@ -5980,8 +5980,8 @@ "bin", "jar" ] - } - }, + } + }, "jdk10": { "formula": { "sandbox_id": [ @@ -6532,28 +6532,28 @@ ] } }, - "yndexer": { - "formula": { + "yndexer": { + "formula": { "sandbox_id": 992600186, - "match": "YNDEXER" - }, - "executable": { + "match": "YNDEXER" + }, + "executable": { "yndexer": [ "yndexer" ] - } - }, - "ytyndexer": { - "formula": { + } + }, + "ytyndexer": { + "formula": { "sandbox_id": 1051903185, - "match": "YTYNDEXER" - }, - "executable": { + "match": "YTYNDEXER" + }, + "executable": { "ytyndexer": [ "ytyndexer" ] - } - }, + } + }, "ymakeyndexer": { "formula": { "sandbox_id": 239256113, @@ -6770,7 +6770,7 @@ }, "ag": { "formula": { - "sandbox_id": 75851513, + "sandbox_id": 75851513, "match": "Ag" }, "executable": { @@ -7071,17 +7071,17 @@ ] } }, - "kwmktorrent": { - "formula": { + "kwmktorrent": { + "formula": { "sandbox_id": 451506451, - "match": "KWMKTorrent" - }, - "executable": { + "match": "KWMKTorrent" + }, + "executable": { "kwmktorrent": [ "kwmktorrent" ] - } - }, + } + }, "kwmqbuild": { "formula": { "sandbox_id": 41067877, @@ -7095,8 +7095,8 @@ }, "gpt": { "formula": { - "sandbox_id": 21836503, - "match": "GooglePerformanceTools" + "sandbox_id": 21836503, + "match": "GooglePerformanceTools" } }, "ant": { diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 081833998b..af41461307 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -113,13 +113,13 @@ otherwise { # tag:codenav when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") { PY_PROGRAM_LINK_EXE=$LINK_EXE ${kv;hide:"pyndex $TARGET"} - YNDEXER_ARGS=$YMAKE_PYTHON ${input:"build/scripts/yndexer.py"} $CPPYNDEXER_RESOURCE_GLOBAL/yndexer 1500 $(SOURCE_ROOT) $ARCADIA_BUILD_ROOT ${input:SRC} + YNDEXER_ARGS=$YMAKE_PYTHON ${input:"build/scripts/yndexer.py"} $CPPYNDEXER_RESOURCE_GLOBAL/yndexer 1500 $(SOURCE_ROOT) $ARCADIA_BUILD_ROOT ${input:SRC} YNDEXER_OUTPUT=${output;noauto;suf=${OBJ_CROSS_SUF}.ydx.pb2:SRC} } otherwise { PY_PROGRAM_LINK_EXE=$LINK_EXE YNDEXER_ARGS= - YNDEXER_OUTPUT= + YNDEXER_OUTPUT= } COVERAGE_FLAGS= @@ -1304,10 +1304,10 @@ module _BASE_UNIT: _BARE_UNIT { CXXFLAGS += -nostdinc++ } - when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") { - PEERDIR += build/external_resources/codenavigation - } - + when ($CODENAVIGATION && $NOCODENAVIGATION != "yes") { + PEERDIR += build/external_resources/codenavigation + } + when ($CYTHON_COVERAGE && $CYTHON_COVERAGE == "yes") { CFLAGS+=-DCYTHON_TRACE=1 -DCYTHON_TRACE_NOGIL=1 } @@ -1805,8 +1805,8 @@ module PYCR_PROGRAM: PY3_PROGRAM_BIN { ### @see: [DLL](#module_DLL) macro EXPORTS_SCRIPT(Arg) { SET(EXPORTS_FILE $Arg) -} - +} + ### @usage: NO_EXPORT_DYNAMIC_SYMBOLS() ### ### Disable exporting all non-hidden symbols as dynamic when linking a PROGRAM. @@ -1903,7 +1903,7 @@ USE_AFL=no ### ### Documentation: https://wiki.yandex-team.ru/yatool/fuzzing/ module FUZZ: _BASE_PROGRAM { - .NODE_TYPE=Program + .NODE_TYPE=Program .FINAL_TARGET=no .ALLOWED=FUZZ_DICTS FUZZ_OPTS @@ -1947,7 +1947,7 @@ otherwise { ### As with entire boost library usage of this technology is deprecated in Arcadia and restricted with configuration error in most of projects. ### No new module of this type should be introduced unless it is explicitly approved by C++ committee. module BOOSTTEST: _BASE_PROGRAM { - .NODE_TYPE=Program + .NODE_TYPE=Program .FINAL_TARGET=no .CMD=LINK_BOOSTTEST_CMD PEERDIR(library/cpp/testing/boost_test) @@ -2016,7 +2016,7 @@ macro YT_SPEC(Data...) { } # tag:test -TEST_SRCS_VALUE= +TEST_SRCS_VALUE= ### @usage: TEST_SRCS(Files...) ### ### In PY2TEST, PY3TEST and PY*_LIBRARY modules used as PY_SRCS macro and additionally used to mine test cases to be executed by testing framework. @@ -2031,7 +2031,7 @@ macro DISABLE_DATA_VALIDATION() { } # tag:test -TEST_DATA_VALUE= +TEST_DATA_VALUE= ### @usage: DATA([path...]) ### ### Specifies the path to the data necessary test. @@ -2047,7 +2047,7 @@ macro DATA(Data...) { } # tag:test -TEST_TAGS_VALUE= +TEST_TAGS_VALUE= ### @usage: TAG ([tag...]) ### ### Each test can have one or more tags used to filter tests list for running. @@ -2059,7 +2059,7 @@ macro TAG(Tags...) { } # tag:test -TEST_REQUIREMENTS_VALUE= +TEST_REQUIREMENTS_VALUE= ### @usage: REQUIREMENTS([cpu:<count>] [disk_usage:<size>] [ram:<size>] [ram_disk:<size>] [container:<id>] [network:<restricted|full>] [dns:dns64]) ### ### Allows you to specify the requirements of the test. @@ -2098,7 +2098,7 @@ macro USE_RECIPE(Data...) { } # tag:python-specific tag:test -TEST_PYTHON_PATH_VALUE= +TEST_PYTHON_PATH_VALUE= # tag:python-specific tag:test ### @usage: PYTHON_PATH(Path) @@ -2146,7 +2146,7 @@ macro NO_DOCTESTS() { ### ### Base logic of Python 2.x py.test modules: common module properties and dependencies. module _BASE_PYTEST: _BASE_PY_PROGRAM { - .NODE_TYPE=Program + .NODE_TYPE=Program .FINAL_TARGET=no .ALLOWED=YT_SPEC NO_DOCTESTS when ($USE_ARCADIA_PYTHON == "yes") { @@ -2165,7 +2165,7 @@ module _BASE_PYTEST: _BASE_PY_PROGRAM { ### ### Same as PY2TEST. Don't use this, use PY2TEST instead. module PYTEST_BIN: _BASE_PYTEST { - .NODE_TYPE=Program + .NODE_TYPE=Program SETUP_PYTEST_BIN() } @@ -2253,7 +2253,7 @@ macro STYLE(Globs...) { ### ### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ module GTEST_UGLY: _BASE_PROGRAM { - .NODE_TYPE=Program + .NODE_TYPE=Program .FINAL_TARGET=no PEERDIR(contrib/restricted/googletest/googlemock contrib/restricted/googletest/googletest) ADD_YTEST($MODULE_PREFIX$REALPRJNAME gtest) @@ -2287,7 +2287,7 @@ module GTEST_UGLY: _BASE_PROGRAM { ### ### @see: [RUN()](#macro_RUN) module EXECTEST: _BARE_UNIT { - .NODE_TYPE=Program + .NODE_TYPE=Program .FINAL_TARGET=no .ALLOWED=YT_SPEC .RESTRICTED=FORK_TEST_FILES @@ -2496,10 +2496,10 @@ macro _CONDITIONAL_SRCS(USE_CONDITIONAL_SRCS[], DYMMY...) { SRCS($USE_CONDITIONAL_SRCS) } -# XXX: dirty hack for correct LDFLAGS passing +# XXX: dirty hack for correct LDFLAGS passing RESOURCES_LIBRARY_LINK=$TOUCH_UNIT ${hide:LDFLAGS_GLOBAL} ${hide:LDFLAGS} RESOURCES_LIBRARY_SEM=ignored - + ### @usage: RESOURCES_LIBRARY() ### ### Definition of a module that brings its content from external source (Sandbox) via DECLARE_EXTERNAL_RESOURCE macro. @@ -2507,7 +2507,7 @@ RESOURCES_LIBRARY_SEM=ignored ### ### @see: [DECLARE_EXTERNAL_RESOURCE()](#macro_DECLARE_EXTERNAL_RESOURCE) module RESOURCES_LIBRARY: _BARE_UNIT { - .CMD=RESOURCES_LIBRARY_LINK + .CMD=RESOURCES_LIBRARY_LINK .SEM=RESOURCES_LIBRARY_SEM .ALLOWED=DECLARE_EXTERNAL_RESOURCE EXTRALIBS OBJADDE_GLOBAL .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SRC SRCS PEERDIR SPLIT_DWARF @@ -2515,12 +2515,12 @@ module RESOURCES_LIBRARY: _BARE_UNIT { .PEERDIR_POLICY=as_include .EXTS=.o .obj .a .mf .supp .tidyjson .ld .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH - + MODULE_SUFFIX=.pkg.fake ENABLE(NEED_ADD_FAKE_SRC) WITHOUT_LICENSE_TEXTS() -} - +} + FAT_OBJECT_ARGS= FAT_OBJECT_OUTS= @@ -4108,7 +4108,7 @@ module PY3_LIBRARY: _PY3_LIBRARY { ### ### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/ module _BASE_PY_PROGRAM: _BASE_PROGRAM { - .CMD=PY_PROGRAM_LINK_EXE + .CMD=PY_PROGRAM_LINK_EXE _ARCADIA_PYTHON_ADDINCL() when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no") { @@ -6641,18 +6641,18 @@ macro NO_WSHADOW() { ### @usage: NO_PLATFORM_RESOURCES() # internal ### Exclude dependency on platform resources libraries. ### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance. -macro NO_PLATFORM_RESOURCES() { - ENABLE(NOPLATFORM_RESOURCES) -} - +macro NO_PLATFORM_RESOURCES() { + ENABLE(NOPLATFORM_RESOURCES) +} + # tag:internal tag:codenav ### @usage: NO_CODENAVIGATION() # internal ### Disable codenaviagtion for a module. Needed to avoid PEERDIR loops in codenavigation support. ### Most probably you'll never need this. If you think you need, please contact devtools@ for assistance. -macro NO_CODENAVIGATION() { - ENABLE(NOCODENAVIGATION) -} - +macro NO_CODENAVIGATION() { + ENABLE(NOCODENAVIGATION) +} + ### @usage: NO_UTIL() ### Build module without dependency on util. ### Note: use this with care. Util most likely will be linked into executable anyway, diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 30219eb85e..7593aefdfd 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -163,8 +163,8 @@ class Platform(object): )) @property - def library_path_variables(self): - return ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH'] + def library_path_variables(self): + return ['LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH'] def find_in_dict(self, dict_, default=None): if dict_ is None: @@ -266,7 +266,7 @@ def to_strings(o): def emit(key, *value): print('{0}={1}'.format(key, ' '.join(to_strings(value)))) - + def emit_with_comment(comment, key, *value): print('# {}'.format(comment)) @@ -520,13 +520,13 @@ class Build(object): if self.build_system == 'distbuild': emit('DISTBUILD', 'yes') - elif self.build_system != 'ymake': + elif self.build_system != 'ymake': raise ConfigureError() - python_bin = preset('BUILD_PYTHON_BIN', '$(PYTHON)/python') - - emit('YMAKE_PYTHON', python_bin) - emit('YMAKE_UNPICKLER', python_bin, '$ARCADIA_ROOT/build/plugins/_unpickler.py') + python_bin = preset('BUILD_PYTHON_BIN', '$(PYTHON)/python') + + emit('YMAKE_PYTHON', python_bin) + emit('YMAKE_UNPICKLER', python_bin, '$ARCADIA_ROOT/build/plugins/_unpickler.py') @property def is_release(self): @@ -1291,7 +1291,7 @@ class GnuToolchain(Toolchain): self.platform_projects.append(project) self.c_flags_platform.append('-B{}/{}'.format(var, bin)) if ldlibs: - for lib_path in self.build.host.library_path_variables: + for lib_path in self.build.host.library_path_variables: self.env.setdefault(lib_path, []).append('{}/{}'.format(var, ldlibs)) def print_toolchain(self): @@ -2566,7 +2566,7 @@ class MSVCCompiler(MSVC, Compiler): emit('DEBUG_INFO_FLAGS', debug_info_flags) append('C_WARNING_OPTS', c_warnings) append('CXX_WARNING_OPTS', cxx_warnings) - + if self.build.is_release: emit('CFLAGS_PER_TYPE', '$CFLAGS_RELEASE') if self.build.is_debug: |