aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-12-14 11:07:56 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-12-14 11:07:56 -0800
commit8735891b41ddc66dc3fce2188874616d8d536b95 (patch)
treed605e4f691d33538deb0993644f60a9fac506e67 /tools
parent1b0d2f008bb13cea43928a6aa2cbf605f9c95aab (diff)
parentf748b0ab77521bf962196e0d3aa2fdb3bf4d10af (diff)
Merge branch 'slice_with_exec_ctx' into metadata_filter
Diffstat (limited to 'tools')
-rw-r--r--tools/distrib/python/grpcio_tools/grpc/__init__.py30
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/__init__.py (renamed from tools/distrib/python/grpcio_tools/grpc/tools/__init__.py)0
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/_protoc_compiler.pyx (renamed from tools/distrib/python/grpcio_tools/grpc/tools/_protoc_compiler.pyx)2
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/command.py (renamed from tools/distrib/python/grpcio_tools/grpc/tools/command.py)4
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/main.cc (renamed from tools/distrib/python/grpcio_tools/grpc/tools/main.cc)2
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/main.h (renamed from tools/distrib/python/grpcio_tools/grpc/tools/main.h)0
-rw-r--r--tools/distrib/python/grpcio_tools/grpc_tools/protoc.py (renamed from tools/distrib/python/grpcio_tools/grpc/tools/protoc.py)2
-rw-r--r--tools/distrib/python/grpcio_tools/setup.py11
8 files changed, 10 insertions, 41 deletions
diff --git a/tools/distrib/python/grpcio_tools/grpc/__init__.py b/tools/distrib/python/grpcio_tools/grpc/__init__.py
deleted file mode 100644
index 70ac5edd48..0000000000
--- a/tools/distrib/python/grpcio_tools/grpc/__init__.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2016, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-__import__('pkg_resources').declare_namespace(__name__)
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/__init__.py b/tools/distrib/python/grpcio_tools/grpc_tools/__init__.py
index d5ad73a74a..d5ad73a74a 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/__init__.py
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/__init__.py
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/_protoc_compiler.pyx b/tools/distrib/python/grpcio_tools/grpc_tools/_protoc_compiler.pyx
index a6530127c0..81034fad5e 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/_protoc_compiler.pyx
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/_protoc_compiler.pyx
@@ -29,7 +29,7 @@
from libc cimport stdlib
-cdef extern from "grpc/tools/main.h":
+cdef extern from "grpc_tools/main.h":
int protoc_main(int argc, char *argv[])
def run_main(list args not None):
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/command.py b/tools/distrib/python/grpcio_tools/grpc_tools/command.py
index 424fd90411..43ec8c2a4c 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/command.py
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/command.py
@@ -33,7 +33,7 @@ import sys
import setuptools
-from grpc.tools import protoc
+from grpc_tools import protoc
def build_package_protos(package_root):
@@ -45,7 +45,7 @@ def build_package_protos(package_root):
proto_files.append(os.path.abspath(os.path.join(root, filename)))
well_known_protos_include = pkg_resources.resource_filename(
- 'grpc.tools', '_proto')
+ 'grpc_tools', '_proto')
for proto_file in proto_files:
command = [
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/main.cc b/tools/distrib/python/grpcio_tools/grpc_tools/main.cc
index 8391839513..0c2fa3180a 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/main.cc
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/main.cc
@@ -32,7 +32,7 @@
#include "src/compiler/python_generator.h"
-#include "grpc/tools/main.h"
+#include "grpc_tools/main.h"
int protoc_main(int argc, char* argv[]) {
google::protobuf::compiler::CommandLineInterface cli;
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/main.h b/tools/distrib/python/grpcio_tools/grpc_tools/main.h
index ea2860ff02..ea2860ff02 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/main.h
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/main.h
diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py
index e1256a7dd9..7d5892dc4b 100644
--- a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py
+++ b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py
@@ -32,7 +32,7 @@
import pkg_resources
import sys
-from grpc.tools import _protoc_compiler
+from grpc_tools import _protoc_compiler
def main(command_arguments):
"""Run the protocol buffer compiler with the given command-line arguments.
diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py
index a07a586fb2..581ecc40c0 100644
--- a/tools/distrib/python/grpcio_tools/setup.py
+++ b/tools/distrib/python/grpcio_tools/setup.py
@@ -108,7 +108,7 @@ PROTO_FILES = [
CC_INCLUDE = os.path.normpath(protoc_lib_deps.CC_INCLUDE)
PROTO_INCLUDE = os.path.normpath(protoc_lib_deps.PROTO_INCLUDE)
-GRPC_PYTHON_TOOLS_PACKAGE = 'grpc.tools'
+GRPC_PYTHON_TOOLS_PACKAGE = 'grpc_tools'
GRPC_PYTHON_PROTO_RESOURCES_NAME = '_proto'
DEFINE_MACROS = ()
@@ -154,16 +154,16 @@ def package_data():
def extension_modules():
if BUILD_WITH_CYTHON:
- plugin_sources = [os.path.join('grpc', 'tools', '_protoc_compiler.pyx')]
+ plugin_sources = [os.path.join('grpc_tools', '_protoc_compiler.pyx')]
else:
- plugin_sources = [os.path.join('grpc', 'tools', '_protoc_compiler.cpp')]
+ plugin_sources = [os.path.join('grpc_tools', '_protoc_compiler.cpp')]
plugin_sources += [
- os.path.join('grpc', 'tools', 'main.cc'),
+ os.path.join('grpc_tools', 'main.cc'),
os.path.join('grpc_root', 'src', 'compiler', 'python_generator.cc')] + [
os.path.join(CC_INCLUDE, cc_file)
for cc_file in CC_FILES]
plugin_ext = extension.Extension(
- name='grpc.tools._protoc_compiler',
+ name='grpc_tools._protoc_compiler',
sources=plugin_sources,
include_dirs=[
'.',
@@ -189,7 +189,6 @@ setuptools.setup(
license='3-clause BSD',
ext_modules=extension_modules(),
packages=setuptools.find_packages('.'),
- namespace_packages=['grpc'],
install_requires=[
'protobuf>=3.0.0',
'grpcio>={version}'.format(version=grpc_version.VERSION),