Merge pull request #6473 from jtattermusch/python_packages_fixes

Python packages fixes
pull/6489/head
Jan Tattermusch 9 years ago
commit 7135ba96f8
  1. 7
      test/distrib/python/run_distrib_test.sh
  2. 0
      tools/distrib/python/grpcio_tools/grpc/tools/__init__.py
  3. 2
      tools/distrib/python/grpcio_tools/grpc/tools/main.cc
  4. 0
      tools/distrib/python/grpcio_tools/grpc/tools/main.h
  5. 2
      tools/distrib/python/grpcio_tools/grpc/tools/protoc.py
  6. 2
      tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx
  7. 6
      tools/distrib/python/grpcio_tools/setup.py

@ -48,7 +48,10 @@ which $PYTHON || PYTHON=python
which $PIP || PIP=pip
# TODO(jtattermusch): this shouldn't be required
${PIP} install --upgrade six pip
# TODO(jtattermusch): run the command twice to workaround docker-on-overlay
# issue https://github.com/docker/docker/issues/12327
# (first attempt will fail when using docker with overlayFS)
${PIP} install --upgrade six pip || ${PIP} install --upgrade six pip
# At least one of the bdist packages has to succeed (whichever one matches the
# test machine, anyway).
@ -58,6 +61,6 @@ done
# TODO(jtattermusch): add a .proto file to the distribtest, generate python
# code from it and then use the generated code from distribtest.py
$PYTHON -m grpc.protoc.compiler
$PYTHON -m grpc.tools.protoc
$PYTHON distribtest.py

@ -32,7 +32,7 @@
#include "src/compiler/python_generator.h"
#include "grpc/protoc/main.h"
#include "grpc/tools/main.h"
int protoc_main(int argc, char* argv[]) {
google::protobuf::compiler::CommandLineInterface cli;

@ -31,7 +31,7 @@
import sys
from grpc.protoc import protoc_compiler
from grpc.tools import protoc_compiler
if __name__ == '__main__':

@ -29,7 +29,7 @@
from libc cimport stdlib
cdef extern from "grpc/protoc/main.h":
cdef extern from "grpc/tools/main.h":
int protoc_main(int argc, char *argv[])
def run_main(list args not None):

@ -45,13 +45,13 @@ import grpc_version
def protoc_ext_module():
plugin_sources = [
'grpc/protoc/main.cc',
'grpc/tools/main.cc',
'grpc_root/src/compiler/python_generator.cc'] + [
os.path.join('third_party/protobuf/src', cc_file)
for cc_file in protoc_lib_deps.CC_FILES]
plugin_ext = extension.Extension(
name='grpc.protoc.protoc_compiler',
sources=['grpc/protoc/protoc_compiler.pyx'] + plugin_sources,
name='grpc.tools.protoc_compiler',
sources=['grpc/tools/protoc_compiler.pyx'] + plugin_sources,
include_dirs=[
'.',
'grpc_root',

Loading…
Cancel
Save