aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins
diff options
context:
space:
mode:
authorsomov <somov@yandex-team.ru>2022-02-10 16:45:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:49 +0300
commit7489e4682331202b9c7d863c0898eb83d7b12c2b (patch)
tree9142afc54d335ea52910662635b898e79e192e49 /build/plugins
parenta5950576e397b1909261050b8c7da16db58f10b1 (diff)
downloadydb-7489e4682331202b9c7d863c0898eb83d7b12c2b.tar.gz
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins')
-rw-r--r--build/plugins/pybuild.py30
-rw-r--r--build/plugins/rodata.py2
-rw-r--r--build/plugins/swig.py26
3 files changed, 29 insertions, 29 deletions
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index e75e730e7b..f32a2d39a0 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -237,15 +237,15 @@ def onpy_srcs(unit, *args):
fbss = []
py_namespaces = {}
- dump_dir = unit.get('PYTHON_BUILD_DUMP_DIR')
- dump_output = None
- if dump_dir:
- import thread
- pid = os.getpid()
- tid = thread.get_ident()
- dump_name = '{}-{}.dump'.format(pid, tid)
- dump_output = open(os.path.join(dump_dir, dump_name), 'a')
-
+ dump_dir = unit.get('PYTHON_BUILD_DUMP_DIR')
+ dump_output = None
+ if dump_dir:
+ import thread
+ pid = os.getpid()
+ tid = thread.get_ident()
+ dump_name = '{}-{}.dump'.format(pid, tid)
+ dump_output = open(os.path.join(dump_dir, dump_name), 'a')
+
args = iter(args)
for arg in args:
# Namespace directives.
@@ -325,9 +325,9 @@ def onpy_srcs(unit, *args):
pathmod = (path, mod)
- if dump_output is not None:
- dump_output.write('{path}\t{module}\n'.format(path=rootrel_arc_src(path, unit), module=mod))
-
+ if dump_output is not None:
+ dump_output.write('{path}\t{module}\n'.format(path=rootrel_arc_src(path, unit), module=mod))
+
if path.endswith('.py'):
if cythonize_py:
pyxs.append(pathmod)
@@ -349,9 +349,9 @@ def onpy_srcs(unit, *args):
else:
ymake.report_configure_error('in PY_SRCS: unrecognized arg {!r}'.format(path))
- if dump_output is not None:
- dump_output.close()
-
+ if dump_output is not None:
+ dump_output.close()
+
if pyxs:
files2res = set()
# Include map stores files which were included in the processing pyx file,
diff --git a/build/plugins/rodata.py b/build/plugins/rodata.py
index c0448d247f..3ecb0f9a83 100644
--- a/build/plugins/rodata.py
+++ b/build/plugins/rodata.py
@@ -158,7 +158,7 @@ class RODataCXX(iw.CustomCommand):
def ro_data(path, unit):
- if unit.enabled('ARCH_AARCH64') or unit.enabled('ARCH_ARM') or unit.enabled('ARCH_PPC64LE'):
+ if unit.enabled('ARCH_AARCH64') or unit.enabled('ARCH_ARM') or unit.enabled('ARCH_PPC64LE'):
return RODataCXX(path, unit)
return ROData(path, unit)
diff --git a/build/plugins/swig.py b/build/plugins/swig.py
index b9a54f5eaf..32a37204a6 100644
--- a/build/plugins/swig.py
+++ b/build/plugins/swig.py
@@ -1,5 +1,5 @@
import os
-import posixpath
+import posixpath
import re
import _import_wrapper as iw
@@ -12,10 +12,10 @@ def init():
class Swig(iw.CustomCommand):
def __init__(self, path, unit):
- self._tool = unit.get('SWIG_TOOL')
- self._library_dir = unit.get('SWIG_LIBRARY') or 'contrib/tools/swig/Lib'
- self._local_swig = unit.get('USE_LOCAL_SWIG') == "yes"
-
+ self._tool = unit.get('SWIG_TOOL')
+ self._library_dir = unit.get('SWIG_LIBRARY') or 'contrib/tools/swig/Lib'
+ self._local_swig = unit.get('USE_LOCAL_SWIG') == "yes"
+
self._path = path
self._flags = ['-cpperraswarn']
@@ -44,17 +44,17 @@ class Swig(iw.CustomCommand):
lang_specific_incl_dir = 'java'
incl_dirs = [
"FOR", "swig",
- posixpath.join(self._library_dir, lang_specific_incl_dir),
+ posixpath.join(self._library_dir, lang_specific_incl_dir),
"FOR", "swig",
- self._library_dir
+ self._library_dir
]
- self._incl_dirs = ['$S', '$B'] + [posixpath.join('$S', d) for d in incl_dirs]
+ self._incl_dirs = ['$S', '$B'] + [posixpath.join('$S', d) for d in incl_dirs]
modname = unit.get('REALPRJNAME')
self._flags.extend(['-module', modname])
- if not self._local_swig:
- unit.onaddincl(incl_dirs)
+ if not self._local_swig:
+ unit.onaddincl(incl_dirs)
if self._swig_lang == 'python':
self._out_name = modname + '.py'
@@ -83,7 +83,7 @@ class Swig(iw.CustomCommand):
return self._flags
def tools(self):
- return ['contrib/tools/swig'] if not self._tool else []
+ return ['contrib/tools/swig'] if not self._tool else []
def input(self):
return [
@@ -105,8 +105,8 @@ class Swig(iw.CustomCommand):
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
+ if self._local_swig:
+ binary = self._tool
return self.do_run_java(binary, self._path) if self._swig_lang in ['java', 'jni_cpp', 'jni_java'] else self.do_run(binary, self._path)
def _incl_flags(self):