Browse Source

Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 2 of 2.

Nikita Slyusarev 3 years ago
parent
commit
469afdc4e2

+ 6 - 6
build/plugins/_common.py

@@ -52,8 +52,8 @@ def stripext(fname):
 
 
 def tobuilddir(fname):
-    if not fname: 
-        return '$B' 
+    if not fname:
+        return '$B'
     if fname.startswith('$S'):
         return fname.replace('$S', '$B', 1)
     else:
@@ -113,14 +113,14 @@ def resolve_to_abs_path(path, source_root, build_root):
     if path.startswith('$B') and build_root is not None:
         return path.replace('$B', build_root, 1)
     return path
- 
- 
+
+
 def resolve_to_ymake_path(path):
     return resolve_to_abs_path(path, '${ARCADIA_ROOT}', '${ARCADIA_BUILD_ROOT}')
 
 
-def join_intl_paths(*args): 
-    return '/'.join(args) 
+def join_intl_paths(*args):
+    return '/'.join(args)
 
 
 def get(fun, num):

+ 2 - 2
build/rules/autocheck.blacklist

@@ -9,7 +9,7 @@ data-ui/unity
 direct/frontend/services
 direct/frontend/packages
 drive/pyback
-fintech/frontend 
+fintech/frontend
 frontend
 games/frontend
 junk
@@ -19,7 +19,7 @@ maps/front
 mobile
 music/frontend
 serp/hermione
-zen/frontend 
+zen/frontend
 taxi/lavka/frontend
 velocity/error-booster/error-booster-queue
 velocity/error-booster/market

+ 1 - 1
build/rules/local.blacklist

@@ -1,3 +1,3 @@
 # Local blacklist
 # The list of top level directories excluded from local build
-mobile 
+mobile

+ 1 - 1
build/rules/py2_deprecation/ya.make

@@ -1,6 +1,6 @@
 OWNER(g:ymake)
 RESOURCES_LIBRARY()
 
-MESSAGE(WARNING You are using deprecated Python2-only code. Please consider rewriting to Python 3. To list all such errors use `ya make -DFAIL_PY2`.) 
+MESSAGE(WARNING You are using deprecated Python2-only code. Please consider rewriting to Python 3. To list all such errors use `ya make -DFAIL_PY2`.)
 
 END()

+ 29 - 29
build/scripts/fix_msvc_output.py

@@ -1,13 +1,13 @@
-import subprocess 
-import sys 
- 
+import subprocess
+import sys
+
 import process_command_files as pcf
 import process_whole_archive_option as pwa
- 
-def out2err(cmd): 
-    return subprocess.Popen(cmd, stdout=sys.stderr).wait() 
- 
- 
+
+def out2err(cmd):
+    return subprocess.Popen(cmd, stdout=sys.stderr).wait()
+
+
 def decoding_needed(strval):
     if sys.version_info >= (3, 0, 0):
         return isinstance(strval, bytes)
@@ -15,28 +15,28 @@ def decoding_needed(strval):
         return False
 
 
-def out2err_cut_first_line(cmd): 
-    p = subprocess.Popen(cmd, stdout=subprocess.PIPE) 
-    first_line = True 
-    while True: 
-        line = p.stdout.readline() 
+def out2err_cut_first_line(cmd):
+    p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+    first_line = True
+    while True:
+        line = p.stdout.readline()
         line = line.decode('utf-8') if decoding_needed(line) else line
-        if not line: 
-            break 
-        if first_line: 
-            sys.stdout.write(line) 
-            first_line = False 
-        else: 
-            sys.stderr.write(line) 
-    return p.wait() 
- 
- 
-if __name__ == '__main__': 
+        if not line:
+            break
+        if first_line:
+            sys.stdout.write(line)
+            first_line = False
+        else:
+            sys.stderr.write(line)
+    return p.wait()
+
+
+if __name__ == '__main__':
     mode = sys.argv[1]
     args, wa_peers, wa_libs = pwa.get_whole_archive_peers_and_libs(pcf.skip_markers(sys.argv[2:]))
     cmd = pwa.ProcessWholeArchiveOption('WINDOWS', wa_peers, wa_libs).construct_cmd(args)
-    run = out2err 
-    if mode in ('cl', 'ml'): 
-        # First line of cl.exe and ml64.exe stdout is useless: it prints input file 
-        run = out2err_cut_first_line 
-    sys.exit(run(cmd)) 
+    run = out2err
+    if mode in ('cl', 'ml'):
+        # First line of cl.exe and ml64.exe stdout is useless: it prints input file
+        run = out2err_cut_first_line
+    sys.exit(run(cmd))

+ 19 - 19
build/scripts/link_dyn_lib.py

@@ -112,31 +112,31 @@ def fix_gnu_param(arch, ex):
         return ret
 
 
-def fix_windows_param(ex): 
-    with tempfile.NamedTemporaryFile(delete=False) as def_file: 
-        exports = [] 
-        for item in ex: 
-            if item.get('lang') == 'C': 
-                exports.append(item.get('sym')) 
-        def_file.write('EXPORTS\n') 
-        for export in exports: 
-            def_file.write('    {}\n'.format(export)) 
-        return ['/DEF:{}'.format(def_file.name)] 
- 
- 
+def fix_windows_param(ex):
+    with tempfile.NamedTemporaryFile(delete=False) as def_file:
+        exports = []
+        for item in ex:
+            if item.get('lang') == 'C':
+                exports.append(item.get('sym'))
+        def_file.write('EXPORTS\n')
+        for export in exports:
+            def_file.write('    {}\n'.format(export))
+        return ['/DEF:{}'.format(def_file.name)]
+
+
 musl_libs = '-lc', '-lcrypt', '-ldl', '-lm', '-lpthread', '-lrt', '-lutil'
 
 
 def fix_cmd(arch, musl, c):
-    if arch == 'WINDOWS': 
-        prefix = '/DEF:' 
-        f = fix_windows_param 
+    if arch == 'WINDOWS':
+        prefix = '/DEF:'
+        f = fix_windows_param
     else:
-        prefix = '-Wl,--version-script=' 
+        prefix = '-Wl,--version-script='
         if arch in ('DARWIN', 'IOS'):
-            f = fix_darwin_param 
-        else: 
-            f = lambda x: fix_gnu_param(arch, x) 
+            f = fix_darwin_param
+        else:
+            f = lambda x: fix_gnu_param(arch, x)
 
     def do_fix(p):
         if musl and p in musl_libs:

+ 23 - 23
build/scripts/run_msvc_wine.py

@@ -16,14 +16,14 @@ procs = []
 build_kekeke = 45
 
 
-def stringize(s): 
-    return s.encode('utf-8') if isinstance(s, unicode) else s 
- 
- 
+def stringize(s):
+    return s.encode('utf-8') if isinstance(s, unicode) else s
+
+
 def run_subprocess(*args, **kwargs):
-    if 'env' in kwargs: 
-        kwargs['env'] = {stringize(k): stringize(v) for k, v in kwargs['env'].iteritems()} 
- 
+    if 'env' in kwargs:
+        kwargs['env'] = {stringize(k): stringize(v) for k, v in kwargs['env'].iteritems()}
+
     p = subprocess.Popen(*args, **kwargs)
 
     procs.append(p)
@@ -310,7 +310,7 @@ def colorize_line(l):
             parts.extend(colorize_strings(l))
 
         return ''.join(parts)
-    except Exception: 
+    except Exception:
         return lll
 
 
@@ -361,11 +361,11 @@ def make_full_path_arg(arg, bld_root, short_root):
 
 def fix_path(p):
     topdirs = ['/%s/' % d for d in os.listdir('/')]
-    def abs_path_start(path, pos): 
-        if pos < 0: 
-            return False 
-        return pos == 0 or path[pos - 1] == ':' 
- 
+    def abs_path_start(path, pos):
+        if pos < 0:
+            return False
+        return pos == 0 or path[pos - 1] == ':'
+
     pp = None
     for pr in topdirs:
         pp2 = p.find(pr)
@@ -443,7 +443,7 @@ def run_main():
 
     env['WINEDLLOVERRIDES'] = 'msvcr{}=n'.format(version)
     env['WINEDEBUG'] = 'fixme-all'
-    env['INCLUDE'] = ';'.join(fix_path(p) for p in incl_paths) 
+    env['INCLUDE'] = ';'.join(fix_path(p) for p in incl_paths)
     env['VSINSTALLDIR'] = fix_path(tc_dir)
     env['VCINSTALLDIR'] = fix_path(tc_dir + '/VC')
     env['WindowsSdkDir'] = fix_path(tc_dir)
@@ -475,20 +475,20 @@ def run_main():
         out, _ = p.communicate()
         return p.wait(), out
 
-    def print_err_log(log): 
-        if not log: 
-            return 
-        if mode == 'cxx': 
-            log = colorize(log) 
-        print >>sys.stderr, log 
- 
+    def print_err_log(log):
+        if not log:
+            return
+        if mode == 'cxx':
+            log = colorize(log)
+        print >>sys.stderr, log
+
     tout = 200
 
     while True:
         rc, out = run_process(0, tout)
 
         if rc in (-signal.SIGALRM, signal.SIGALRM):
-            print_err_log(out) 
+            print_err_log(out)
             print >>sys.stderr, '##append_tag##time out'
         elif out and ' stack overflow ' in out:
             print >>sys.stderr, '##append_tag##stack overflow'
@@ -503,7 +503,7 @@ def run_main():
                 print >>sys.stderr, e
 
         else:
-            print_err_log(out) 
+            print_err_log(out)
 
             # non-zero return code - bad, return it immediately
             if rc:

+ 6 - 6
build/scripts/stdout2stderr.py

@@ -1,6 +1,6 @@
-import subprocess 
-import sys 
- 
-if __name__ == '__main__': 
-    assert len(sys.argv) > 1 
-    sys.exit(subprocess.Popen(sys.argv[1:], stdout=sys.stderr).wait()) 
+import subprocess
+import sys
+
+if __name__ == '__main__':
+    assert len(sys.argv) > 1
+    sys.exit(subprocess.Popen(sys.argv[1:], stdout=sys.stderr).wait())

+ 13 - 13
build/ya.conf.json

@@ -1137,14 +1137,14 @@
                 }
             ]
         },
-        "yo": { 
-            "tools": { 
+        "yo": {
+            "tools": {
                 "yo": {
                     "bottle": "yo",
                     "executable": "yo"
                 }
-            }, 
-            "platforms": [ 
+            },
+            "platforms": [
                 {
                     "host": {
                         "os": "LINUX"
@@ -1157,8 +1157,8 @@
                     },
                     "default": true
                 }
-            ] 
-        }, 
+            ]
+        },
         "mockgen": {
             "tools": {
                 "mockgen": {
@@ -5819,17 +5819,17 @@
                 ]
             }
         },
-        "yo": { 
-            "formula": { 
+        "yo": {
+            "formula": {
                 "sandbox_id": 1183539336,
-                "match": "yo" 
-            }, 
-            "executable": { 
+                "match": "yo"
+            },
+            "executable": {
                 "yo": [
                     "yo"
                 ]
-            } 
-        }, 
+            }
+        },
         "mockgen": {
             "formula": {
                 "sandbox_id": [

+ 4 - 4
build/ya.make

@@ -2,9 +2,9 @@ OWNER(
     g:ymake
     somov
 )
- 
-NEED_CHECK() 
- 
+
+NEED_CHECK()
+
 PY2_LIBRARY()
 
 PY_SRCS(
@@ -33,6 +33,6 @@ RECURSE(
     prebuilt
     scripts
     tests
-    tests_slow 
+    tests_slow
     yandex_specific/config
 )

Some files were not shown because too many files changed in this diff