From 1436e10837368188905b7a85764c1dbba156fb39 Mon Sep 17 00:00:00 2001 From: M Liang Date: Fri, 6 Oct 2017 15:02:50 -0500 Subject: [PATCH 1/4] deps: this fixes #14336, non-ascii build file path when running make --- deps/v8/third_party/inspector_protocol/CodeGenerator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/v8/third_party/inspector_protocol/CodeGenerator.py b/deps/v8/third_party/inspector_protocol/CodeGenerator.py index 8b28d136097729..7a763d22c5f87a 100644 --- a/deps/v8/third_party/inspector_protocol/CodeGenerator.py +++ b/deps/v8/third_party/inspector_protocol/CodeGenerator.py @@ -59,13 +59,13 @@ def init_defaults(config_tuple, path, defaults): jinja_dir = arg_options.jinja_dir if not jinja_dir: raise Exception("jinja directory must be specified") - output_base = arg_options.output_base + output_base = arg_options.output_base.decode('utf-8') if not output_base: raise Exception("Base output directory must be specified") config_file = arg_options.config if not config_file: raise Exception("Config file name must be specified") - config_base = os.path.dirname(config_file) + config_base = os.path.dirname(config_file).decode('utf-8') config_values = arg_options.config_value if not config_values: config_values = [] From 511286ee55d2f31a3d23e55aa0886350344f4c6e Mon Sep 17 00:00:00 2001 From: M Liang Date: Fri, 6 Oct 2017 15:20:34 -0500 Subject: [PATCH 2/4] =?UTF-8?q?tools:=20additional=20fixes=20for=20#14336?= =?UTF-8?q?=20to=20pass=20=E2=80=98make=20lint=E2=80=99=20when=20project?= =?UTF-8?q?=20path=20contains=20non-ascii=20characters.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/cpplint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cpplint.py b/tools/cpplint.py index 845f2d2f39de01..72d6bcec2d0334 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -1075,7 +1075,7 @@ def RepositoryName(self): fullname = self.FullName() # XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory. toplevel = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/') + os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/').decode('utf-8') prefix = os.path.commonprefix([fullname, toplevel]) return fullname[len(prefix) + 1:] @@ -6084,7 +6084,7 @@ def main(): _cpplint_state.ResetErrorCounts() for filename in filenames: - ProcessFile(filename, _cpplint_state.verbose_level) + ProcessFile(filename.decode('utf-8'), _cpplint_state.verbose_level) _cpplint_state.PrintErrorCounts() sys.exit(_cpplint_state.error_count > 0) From 9a68c5a3348066a4820b6c0c478ea7cc02b827ad Mon Sep 17 00:00:00 2001 From: sharkfisher Date: Tue, 10 Oct 2017 16:48:41 -0500 Subject: [PATCH 3/4] Update cpplint.py stay within 80 cols --- tools/cpplint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/cpplint.py b/tools/cpplint.py index 72d6bcec2d0334..3fd7c7ea9c393c 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -1074,8 +1074,8 @@ def RepositoryName(self): """ fullname = self.FullName() # XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory. - toplevel = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/').decode('utf-8') + toplevel = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) \ + .replace('\\', '/').decode('utf-8') prefix = os.path.commonprefix([fullname, toplevel]) return fullname[len(prefix) + 1:] From 20f538ec4973a16254b1fd60834d426dc27f63ec Mon Sep 17 00:00:00 2001 From: sharkfisher Date: Tue, 10 Oct 2017 16:51:48 -0500 Subject: [PATCH 4/4] Update CodeGenerator.py --- deps/v8/third_party/inspector_protocol/CodeGenerator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/v8/third_party/inspector_protocol/CodeGenerator.py b/deps/v8/third_party/inspector_protocol/CodeGenerator.py index 7a763d22c5f87a..8b28d136097729 100644 --- a/deps/v8/third_party/inspector_protocol/CodeGenerator.py +++ b/deps/v8/third_party/inspector_protocol/CodeGenerator.py @@ -59,13 +59,13 @@ def init_defaults(config_tuple, path, defaults): jinja_dir = arg_options.jinja_dir if not jinja_dir: raise Exception("jinja directory must be specified") - output_base = arg_options.output_base.decode('utf-8') + output_base = arg_options.output_base if not output_base: raise Exception("Base output directory must be specified") config_file = arg_options.config if not config_file: raise Exception("Config file name must be specified") - config_base = os.path.dirname(config_file).decode('utf-8') + config_base = os.path.dirname(config_file) config_values = arg_options.config_value if not config_values: config_values = []