Merge pull request #688 from nicolasnoble/local-protobuf-build
Force compilation of protobuf using -fPIC.
diff --git a/src/python/interop/interop/empty_pb2.py b/src/python/interop/interop/empty_pb2.py
index 753341c..732a358 100644
--- a/src/python/interop/interop/empty_pb2.py
+++ b/src/python/interop/interop/empty_pb2.py
@@ -57,4 +57,6 @@
_sym_db.RegisterMessage(Empty)
+from grpc.framework.face import demonstration as _face_testing
+from grpc.framework.face import interfaces as _face_interfaces
# @@protoc_insertion_point(module_scope)
diff --git a/src/python/interop/interop/messages_pb2.py b/src/python/interop/interop/messages_pb2.py
index 79270cd..d449a99 100644
--- a/src/python/interop/interop/messages_pb2.py
+++ b/src/python/interop/interop/messages_pb2.py
@@ -441,4 +441,6 @@
_sym_db.RegisterMessage(StreamingOutputCallResponse)
+from grpc.framework.face import demonstration as _face_testing
+from grpc.framework.face import interfaces as _face_interfaces
# @@protoc_insertion_point(module_scope)
diff --git a/src/python/interop/interop/test_pb2.py b/src/python/interop/interop/test_pb2.py
index 1241453..e860946 100644
--- a/src/python/interop/interop/test_pb2.py
+++ b/src/python/interop/interop/test_pb2.py
@@ -29,4 +29,121 @@
+from grpc.framework.face import demonstration as _face_testing
+from grpc.framework.face import interfaces as _face_interfaces
+class TestServiceService(object):
+ """<fill me in later!>"""
+ def __init__(self):
+ pass
+class TestServiceServicer(object):
+ """<fill me in later!>"""
+ def EmptyCall(self, arg):
+ raise NotImplementedError()
+ def UnaryCall(self, arg):
+ raise NotImplementedError()
+ def StreamingOutputCall(self, arg):
+ raise NotImplementedError()
+ def StreamingInputCall(self, arg):
+ raise NotImplementedError()
+ def FullDuplexCall(self, arg):
+ raise NotImplementedError()
+ def HalfDuplexCall(self, arg):
+ raise NotImplementedError()
+class TestServiceStub(object):
+ """<fill me in later!>"""
+ def EmptyCall(self, arg):
+ raise NotImplementedError()
+ EmptyCall.async = None
+ def UnaryCall(self, arg):
+ raise NotImplementedError()
+ UnaryCall.async = None
+ def StreamingOutputCall(self, arg):
+ raise NotImplementedError()
+ StreamingOutputCall.async = None
+ def StreamingInputCall(self, arg):
+ raise NotImplementedError()
+ StreamingInputCall.async = None
+ def FullDuplexCall(self, arg):
+ raise NotImplementedError()
+ FullDuplexCall.async = None
+ def HalfDuplexCall(self, arg):
+ raise NotImplementedError()
+ HalfDuplexCall.async = None
+class _TestServiceStub(TestServiceStub):
+ def __init__(self, face_stub, default_timeout):
+ self._face_stub = face_stub
+ self._default_timeout = default_timeout
+ stub_self = self
+ class EmptyCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.blocking_value_in_value_out("EmptyCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.future_value_in_value_out("EmptyCall", arg, stub_self._default_timeout)
+ self.EmptyCall = EmptyCall()
+ class UnaryCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.blocking_value_in_value_out("UnaryCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.future_value_in_value_out("UnaryCall", arg, stub_self._default_timeout)
+ self.UnaryCall = UnaryCall()
+ class StreamingOutputCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.inline_value_in_stream_out("StreamingOutputCall", arg, stub_self._default_timeout)
+ self.StreamingOutputCall = StreamingOutputCall()
+ class StreamingInputCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.blocking_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.future_stream_in_value_out("StreamingInputCall", arg, stub_self._default_timeout)
+ self.StreamingInputCall = StreamingInputCall()
+ class FullDuplexCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.inline_stream_in_stream_out("FullDuplexCall", arg, stub_self._default_timeout)
+ self.FullDuplexCall = FullDuplexCall()
+ class HalfDuplexCall(object):
+ def __call__(self, arg):
+ return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout)
+ def async(self, arg):
+ return stub_self._face_stub.inline_stream_in_stream_out("HalfDuplexCall", arg, stub_self._default_timeout)
+ self.HalfDuplexCall = HalfDuplexCall()
+def mock_TestService(servicer, default_timeout):
+ value_in_value_out = {}
+ value_in_stream_out = {}
+ stream_in_value_out = {}
+ stream_in_stream_out = {}
+ class EmptyCall(_face_interfaces.InlineValueInValueOutMethod):
+ def service(self, request, context):
+ return servicer.EmptyCall(request)
+ value_in_value_out['EmptyCall'] = EmptyCall()
+ class UnaryCall(_face_interfaces.InlineValueInValueOutMethod):
+ def service(self, request, context):
+ return servicer.UnaryCall(request)
+ value_in_value_out['UnaryCall'] = UnaryCall()
+ class StreamingOutputCall(_face_interfaces.InlineValueInStreamOutMethod):
+ def service(self, request, context):
+ return servicer.StreamingOutputCall(request)
+ value_in_stream_out['StreamingOutputCall'] = StreamingOutputCall()
+ class StreamingInputCall(_face_interfaces.InlineStreamInValueOutMethod):
+ def service(self, request, context):
+ return servicer.StreamingInputCall(request)
+ stream_in_value_out['StreamingInputCall'] = StreamingInputCall()
+ class FullDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod):
+ def service(self, request, context):
+ return servicer.FullDuplexCall(request)
+ stream_in_stream_out['FullDuplexCall'] = FullDuplexCall()
+ class HalfDuplexCall(_face_interfaces.InlineStreamInStreamOutMethod):
+ def service(self, request, context):
+ return servicer.HalfDuplexCall(request)
+ stream_in_stream_out['HalfDuplexCall'] = HalfDuplexCall()
+ face_linked_pair = _face_testing.server_and_stub(default_timeout,inline_value_in_value_out_methods=value_in_value_out,inline_value_in_stream_out_methods=value_in_stream_out,inline_stream_in_value_out_methods=stream_in_value_out,inline_stream_in_stream_out_methods=stream_in_stream_out)
+ class LinkedPair(object):
+ def __init__(self, server, stub):
+ self.server = server
+ self.stub = stub
+ stub = _TestServiceStub(face_linked_pair.stub, default_timeout)
+ return LinkedPair(None, stub)
# @@protoc_insertion_point(module_scope)
diff --git a/src/ruby/README.md b/src/ruby/README.md
index 6e0e9db..9c0eef4 100755
--- a/src/ruby/README.md
+++ b/src/ruby/README.md
@@ -11,7 +11,7 @@
INSTALLATION PREREQUISITES
--------------------------
-This requires Ruby 2.x, as the RPC API surface uses keyword args.
+This requires Ruby 2.1, as the RPC API surface uses keyword args.
QUICK - INSTALL
@@ -19,6 +19,7 @@
- Clone this repository.
- Follow the instructions in [INSTALL](../../INSTALL) to install the gRPC C core.
+- If you don't have Ruby 2.1 installed, switch to the more detailed instructions below
- Use bundler to install
```sh
$ # from this directory
@@ -35,16 +36,18 @@
$ make && sudo make install
```
-- Install Ruby 2.x. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling
+- Install Ruby 2.1. Consider doing this with [RVM](http://rvm.io), it's a nice way of controlling
the exact ruby version that's used.
```sh
$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
-$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
+$ \curl -sSL https://get.rvm.io | bash -s stable --ruby=ruby-2.1
$
$ # follow the instructions to ensure that your're using the latest stable version of Ruby
$ # and that the rvm command is installed
```
+- Make sure your run `source $HOME/.rvm/scripts/rvm` as instructed to complete the set up of RVM
+
- Install [bundler](http://bundler.io/)
```
$ gem install bundler
@@ -52,9 +55,9 @@
- Finally, install the gRPC gem locally.
```sh
-$ cd <install_dir>
-$ bundle install
-$ rake # compiles the extension, runs the unit tests, see rake -T for other options
+$ # from this directory
+$ bundle install # creates the ruby bundle, including building the grpc extension
+$ rake # runs the unit tests, see rake -T for other options
```
CONTENTS