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

pull/5128/head
yang-g 9 years ago
commit a1fc8fb95f
  1. 2
      include/grpc/impl/codegen/compression_types.h
  2. 2
      include/grpc/impl/codegen/propagation_bits.h
  3. 42
      src/python/grpcio/commands.py
  4. 4
      test/cpp/end2end/thread_stress_test.cc
  5. 7
      tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile

@ -34,7 +34,7 @@
#ifndef 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
extern "C" {

@ -34,7 +34,7 @@
#ifndef GRPC_IMPL_CODEGEN_H
#define GRPC_IMPL_CODEGEN_H
#include <grpc/support/port_platform.h>
#include <grpc/impl/codegen/port_platform.h>
#ifdef __cplusplus
extern "C" {

@ -54,7 +54,10 @@ PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
BINARIES_REPOSITORY = os.environ.get(
'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 = """
extensions.append('sphinx.ext.napoleon')
@ -135,7 +138,7 @@ class Install(install.install, EggNameMixin):
def 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):
install.install.finalize_options(self)
@ -143,22 +146,25 @@ class Install(install.install, EggNameMixin):
def run(self):
if self.use_grpc_custom_bdist:
try:
egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True),
self.egg_name(False))
except CommandError as error:
sys.stderr.write(
'\nWARNING: Failed to acquire grpcio prebuilt binary:\n'
'{}.\n\n'.format(error.message))
raise
try:
self._run_bdist_retrieval_install(egg_path)
except Exception as error:
# if anything else happens (and given how there's no way to really know
# what's happening in setuptools here, I mean *anything*), warn the user
# and fall back to building from source.
sys.stderr.write(
'{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n'
.format(traceback.format_exc()))
try:
egg_path = _get_grpc_custom_bdist_egg(self.egg_name(True),
self.egg_name(False))
except CommandError as error:
sys.stderr.write(
'\nWARNING: Failed to acquire grpcio prebuilt binary:\n'
'{}.\n\n'.format(error.message))
raise
try:
self._run_bdist_retrieval_install(egg_path)
except Exception as error:
# if anything else happens (and given how there's no way to really know
# what's happening in setuptools here, I mean *anything*), warn the user
# and fall back to building from source.
sys.stderr.write(
'{}\nWARNING: Failed to install grpcio prebuilt binary.\n\n'
.format(traceback.format_exc()))
raise
except Exception:
install.install.run(self)
else:
install.install.run(self)

@ -55,10 +55,10 @@ using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
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 kNumAsyncReceiveThreads = 50;
const int kNumRpcs = 1000; // Number of RPCs per thread
const int kNumRpcs = 1000; // Number of RPCs per thread
namespace grpc {
namespace testing {

@ -31,3 +31,10 @@ FROM opensuse:42.1
RUN zypper --non-interactive install python
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

Loading…
Cancel
Save