aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/distrib/python/grpcio_tools
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-03-07 12:59:41 +0100
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-03-07 13:00:20 +0100
commit3b7bcc3eb01c4f6cd1c88df0ba86ba39f7eb4635 (patch)
treeeca277745dd3497b5ef0920cb332d43bb2dd779e /tools/distrib/python/grpcio_tools
parent065d9244361ba3194b5104753b102dc7624347b7 (diff)
fix grpcio_tools build on windows
Diffstat (limited to 'tools/distrib/python/grpcio_tools')
-rw-r--r--tools/distrib/python/grpcio_tools/setup.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py
index 79d9fccb4a..b6916fa16f 100644
--- a/tools/distrib/python/grpcio_tools/setup.py
+++ b/tools/distrib/python/grpcio_tools/setup.py
@@ -169,12 +169,13 @@ def extension_modules():
# the JavaScript code generator, supposedly),
# but we need to be cautious about it.
cc_files_clone = list(CC_FILES)
- JS_EMBED_PROCESSOR_SOURCE_FILE = 'google/protobuf/compiler/js/embed.cc'
- JS_WELL_KNOWN_TYPES_FILE = 'google/protobuf/compiler/js/well_known_types_embed.cc'
- if JS_EMBED_PROCESSOR_SOURCE_FILE in cc_files_clone:
- cc_files_clone.remove(JS_EMBED_PROCESSOR_SOURCE_FILE)
- if JS_WELL_KNOWN_TYPES_FILE in cc_files_clone:
- cc_files_clone.remove(JS_WELL_KNOWN_TYPES_FILE)
+ embed_cc_file = os.path.normpath('google/protobuf/compiler/js/embed.cc')
+ well_known_types_file = os.path.normpath(
+ 'google/protobuf/compiler/js/well_known_types_embed.cc')
+ if embed_cc_file in cc_files_clone:
+ cc_files_clone.remove(embed_cc_file)
+ if well_known_types_file in cc_files_clone:
+ cc_files_clone.remove(well_known_types_file)
plugin_sources += [os.path.join('grpc_tools', 'protobuf_generated_well_known_types_embed.cc')]
plugin_sources += [os.path.join(CC_INCLUDE, cc_file) for cc_file in cc_files_clone]