Skip to content
Snippets Groups Projects
Commit a1fc8fb9 authored by yang-g's avatar yang-g
Browse files

Merge remote-tracking branch 'upstream/master' into inherit_from_grpc_library

parents e2a4e990 757c157d
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H #ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
#define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H #define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
#include <grpc/support/port_platform.h> #include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#ifndef GRPC_IMPL_CODEGEN_H #ifndef GRPC_IMPL_CODEGEN_H
#define GRPC_IMPL_CODEGEN_H #define GRPC_IMPL_CODEGEN_H
#include <grpc/support/port_platform.h> #include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -54,7 +54,10 @@ PYTHON_STEM = os.path.dirname(os.path.abspath(__file__)) ...@@ -54,7 +54,10 @@ PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
BINARIES_REPOSITORY = os.environ.get( BINARIES_REPOSITORY = os.environ.get(
'GRPC_PYTHON_BINARIES_REPOSITORY', 'GRPC_PYTHON_BINARIES_REPOSITORY',
'https://storage.googleapis.com/grpc-precompiled-binaries/python/') 'https://storage.googleapis.com/grpc-precompiled-binaries/python')
USE_GRPC_CUSTOM_BDIST = bool(int(os.environ.get(
'GRPC_PYTHON_USE_CUSTOM_BDIST', '1')))
CONF_PY_ADDENDUM = """ CONF_PY_ADDENDUM = """
extensions.append('sphinx.ext.napoleon') extensions.append('sphinx.ext.napoleon')
...@@ -135,7 +138,7 @@ class Install(install.install, EggNameMixin): ...@@ -135,7 +138,7 @@ class Install(install.install, EggNameMixin):
def initialize_options(self): def initialize_options(self):
install.install.initialize_options(self) install.install.initialize_options(self)
self.use_grpc_custom_bdist = bool(int(os.environ.get('GRPC_PYTHON_USE_CUSTOM_BDIST', '1'))) self.use_grpc_custom_bdist = USE_GRPC_CUSTOM_BDIST
def finalize_options(self): def finalize_options(self):
install.install.finalize_options(self) install.install.finalize_options(self)
...@@ -143,22 +146,25 @@ class Install(install.install, EggNameMixin): ...@@ -143,22 +146,25 @@ class Install(install.install, EggNameMixin):
def run(self): def run(self):
if self.use_grpc_custom_bdist: if self.use_grpc_custom_bdist:
try: try:
egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True), try:
self.egg_name(False)) egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True),
except CommandError as error: self.egg_name(False))
sys.stderr.write( except CommandError as error:
'\nWARNING: Failed to acquire grpcio prebuilt binary:\n' sys.stderr.write(
'{}.\n\n'.format(error.message)) '\nWARNING: Failed to acquire grpcio prebuilt binary:\n'
raise '{}.\n\n'.format(error.message))
try: raise
self._run_bdist_retrieval_install(egg_path) try:
except Exception as error: self._run_bdist_retrieval_install(egg_path)
# if anything else happens (and given how there's no way to really know except Exception as error:
# what's happening in setuptools here, I mean *anything*), warn the user # if anything else happens (and given how there's no way to really know
# and fall back to building from source. # what's happening in setuptools here, I mean *anything*), warn the user
sys.stderr.write( # and fall back to building from source.
'{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n' sys.stderr.write(
.format(traceback.format_exc())) '{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n'
.format(traceback.format_exc()))
raise
except Exception:
install.install.run(self) install.install.run(self)
else: else:
install.install.run(self) install.install.run(self)
......
...@@ -55,10 +55,10 @@ using grpc::testing::EchoRequest; ...@@ -55,10 +55,10 @@ using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse; using grpc::testing::EchoResponse;
using std::chrono::system_clock; using std::chrono::system_clock;
const int kNumThreads = 100; // Number of threads const int kNumThreads = 100; // Number of threads
const int kNumAsyncSendThreads = 2; const int kNumAsyncSendThreads = 2;
const int kNumAsyncReceiveThreads = 50; const int kNumAsyncReceiveThreads = 50;
const int kNumRpcs = 1000; // Number of RPCs per thread const int kNumRpcs = 1000; // Number of RPCs per thread
namespace grpc { namespace grpc {
namespace testing { namespace testing {
......
...@@ -31,3 +31,10 @@ FROM opensuse:42.1 ...@@ -31,3 +31,10 @@ FROM opensuse:42.1
RUN zypper --non-interactive install python RUN zypper --non-interactive install python
RUN zypper --non-interactive install python-pip RUN zypper --non-interactive install python-pip
# "which" command required by python's run_distrib_test.sh
RUN zypper --non-interactive install which
# Without this, pip won't be able to connect to
# https://pypi.python.org/simple/
RUN zypper --non-interactive install ca-certificates-mozilla
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment