diff options
author | somov <somov@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
commit | a5950576e397b1909261050b8c7da16db58f10b1 (patch) | |
tree | 7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /build/plugins/swig.py | |
parent | 81eddc8c0b55990194e112b02d127b87d54164a9 (diff) | |
download | ydb-a5950576e397b1909261050b8c7da16db58f10b1.tar.gz |
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins/swig.py')
-rw-r--r-- | build/plugins/swig.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/build/plugins/swig.py b/build/plugins/swig.py index 32a37204a60..b9a54f5eaf0 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): |