From 437a3b366ada3d0a1a09ce5b553518792303e815 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 6 Oct 2016 09:36:54 -0700 Subject: make ruby tools use x86 directory names for sub-x86 cpu --- src/ruby/tools/bin/grpc_tools_ruby_protoc | 4 +-- src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin | 3 +- src/ruby/tools/cpu_check.rb | 43 ++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 src/ruby/tools/cpu_check.rb diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc b/src/ruby/tools/bin/grpc_tools_ruby_protoc index dab06e7958..723842bf1e 100755 --- a/src/ruby/tools/bin/grpc_tools_ruby_protoc +++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc @@ -31,6 +31,7 @@ require 'rbconfig' require_relative '../os_check' +require_relative '../cpu_check' ext = RbConfig::CONFIG['EXEEXT'] @@ -38,8 +39,7 @@ protoc_name = 'protoc' + ext plugin_name = 'grpc_ruby_plugin' + ext -protoc_dir = File.join(File.dirname(__FILE__), - RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name) +protoc_dir = File.join(File.dirname(__FILE__), CPU.arch + '-' + OS.os_name) protoc_path = File.join(protoc_dir, protoc_name) diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin index 4b296dedc7..773281fa8e 100755 --- a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin +++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin @@ -31,11 +31,12 @@ require 'rbconfig' require_relative '../os_check' +require_relative '../cpu_check' plugin_name = 'grpc_ruby_plugin' + RbConfig::CONFIG['EXEEXT'] plugin_path = File.join(File.dirname(__FILE__), - RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name, + CPU.arch + '-' + OS.os_name, plugin_name) exec([ plugin_path, plugin_path ], *ARGV) diff --git a/src/ruby/tools/cpu_check.rb b/src/ruby/tools/cpu_check.rb new file mode 100644 index 0000000000..9e28124222 --- /dev/null +++ b/src/ruby/tools/cpu_check.rb @@ -0,0 +1,43 @@ +# 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. + +require 'rbconfig' + +module CPU + def CPU.arch + case RbConfig::CONFIG['host_cpu'] + when /x86_64/ + 'x86_64' + when /x86|i686/ + 'x86' + else + fail 'cpu architecture detection failed' + end + end +end -- cgit v1.2.3 From 8d970ea2b6411d4bcf01d175cf9a2628b0dd3338 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 6 Oct 2016 09:55:16 -0700 Subject: merge os_check and cpu_check into platform_check --- src/ruby/tools/bin/grpc_tools_ruby_protoc | 6 +-- src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin | 5 +-- src/ruby/tools/cpu_check.rb | 43 ------------------ src/ruby/tools/os_check.rb | 45 ------------------- src/ruby/tools/platform_check.rb | 55 ++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 94 deletions(-) delete mode 100644 src/ruby/tools/cpu_check.rb delete mode 100644 src/ruby/tools/os_check.rb create mode 100644 src/ruby/tools/platform_check.rb diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc b/src/ruby/tools/bin/grpc_tools_ruby_protoc index 723842bf1e..7e619e74a9 100755 --- a/src/ruby/tools/bin/grpc_tools_ruby_protoc +++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc @@ -30,8 +30,7 @@ require 'rbconfig' -require_relative '../os_check' -require_relative '../cpu_check' +require_relative '../platform_check' ext = RbConfig::CONFIG['EXEEXT'] @@ -39,7 +38,8 @@ protoc_name = 'protoc' + ext plugin_name = 'grpc_ruby_plugin' + ext -protoc_dir = File.join(File.dirname(__FILE__), CPU.arch + '-' + OS.os_name) +protoc_dir = File.join(File.dirname(__FILE__), + PLATFORM.architecture + '-' + PLATFORM.os_name) protoc_path = File.join(protoc_dir, protoc_name) diff --git a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin index 773281fa8e..e6af2fe365 100755 --- a/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin +++ b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin @@ -30,13 +30,12 @@ require 'rbconfig' -require_relative '../os_check' -require_relative '../cpu_check' +require_relative '../platform_check' plugin_name = 'grpc_ruby_plugin' + RbConfig::CONFIG['EXEEXT'] plugin_path = File.join(File.dirname(__FILE__), - CPU.arch + '-' + OS.os_name, + PLATFORM.architecture + '-' + PLATFORM.os_name, plugin_name) exec([ plugin_path, plugin_path ], *ARGV) diff --git a/src/ruby/tools/cpu_check.rb b/src/ruby/tools/cpu_check.rb deleted file mode 100644 index 9e28124222..0000000000 --- a/src/ruby/tools/cpu_check.rb +++ /dev/null @@ -1,43 +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. - -require 'rbconfig' - -module CPU - def CPU.arch - case RbConfig::CONFIG['host_cpu'] - when /x86_64/ - 'x86_64' - when /x86|i686/ - 'x86' - else - fail 'cpu architecture detection failed' - end - end -end diff --git a/src/ruby/tools/os_check.rb b/src/ruby/tools/os_check.rb deleted file mode 100644 index 2677306457..0000000000 --- a/src/ruby/tools/os_check.rb +++ /dev/null @@ -1,45 +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. - -# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni - -require 'rbconfig' - -module OS - def OS.os_name - case RbConfig::CONFIG['host_os'] - when /cygwin|mswin|mingw|bccwin|wince|emx/ - 'windows' - when /darwin/ - 'macos' - else - 'linux' - end - end -end diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb new file mode 100644 index 0000000000..e891ec23a8 --- /dev/null +++ b/src/ruby/tools/platform_check.rb @@ -0,0 +1,55 @@ +# 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. + +require 'rbconfig' + +# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni + +module PLATFORM + def PLATFORM.os_name + case RbConfig::CONFIG['host_os'] + when /cygwin|mswin|mingw|bccwin|wince|emx/ + 'windows' + when /darwin/ + 'macos' + else + 'linux' + end + end + def PLATFORM.architecture + case RbConfig::CONFIG['host_cpu'] + when /x86_64/ + 'x86_64' + when /x86|i686/ + 'x86' + else + fail 'cpu architecture detection failed' + end + end +end -- cgit v1.2.3 From fb4509bd73fde1525b07c74b2446c1c365e4f26c Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 12 Oct 2016 14:36:20 -0700 Subject: add i386 to recognized x86 cpu in ruby tools package --- src/ruby/tools/platform_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb index e891ec23a8..c058deb5f5 100644 --- a/src/ruby/tools/platform_check.rb +++ b/src/ruby/tools/platform_check.rb @@ -46,7 +46,7 @@ module PLATFORM case RbConfig::CONFIG['host_cpu'] when /x86_64/ 'x86_64' - when /x86|i686/ + when /x86|i686|i386/ 'x86' else fail 'cpu architecture detection failed' -- cgit v1.2.3 From 9d45c051e7b7770dd1a799de3ac32eb4fba1f79a Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 12 Oct 2016 15:56:39 -0700 Subject: enumerate more x86 cpus in ruby tools package --- src/ruby/tools/platform_check.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb index c058deb5f5..19ea2a07fc 100644 --- a/src/ruby/tools/platform_check.rb +++ b/src/ruby/tools/platform_check.rb @@ -42,11 +42,15 @@ module PLATFORM 'linux' end end + + # The 'host_cpu' value on x86, 32-bit rubies, appears to turn out to + # be the name of the cpu. Only need to know the architecture, + # so enumerating x86 cpu's here. def PLATFORM.architecture case RbConfig::CONFIG['host_cpu'] when /x86_64/ 'x86_64' - when /x86|i686|i386/ + when /x86|i386|i486|i586|i686|i786/ 'x86' else fail 'cpu architecture detection failed' -- cgit v1.2.3 From 0da964435445bcddcb1fecf55283bcf7e347a509 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 12 Oct 2016 16:32:46 -0700 Subject: use target cpu to get rid of cpu enumerations --- src/ruby/tools/platform_check.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb index 19ea2a07fc..2c5ccffdda 100644 --- a/src/ruby/tools/platform_check.rb +++ b/src/ruby/tools/platform_check.rb @@ -43,14 +43,11 @@ module PLATFORM end end - # The 'host_cpu' value on x86, 32-bit rubies, appears to turn out to - # be the name of the cpu. Only need to know the architecture, - # so enumerating x86 cpu's here. def PLATFORM.architecture - case RbConfig::CONFIG['host_cpu'] + case RbConfig::CONFIG['target_cpu'] when /x86_64/ 'x86_64' - when /x86|i386|i486|i586|i686|i786/ + when /x86|i386/ 'x86' else fail 'cpu architecture detection failed' -- cgit v1.2.3 From c6bbc4708c1b2a8fa41e593e2aca5863a144daca Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 6 Dec 2016 11:00:39 -0800 Subject: Replace usages of std::list with std::queue in Node extension --- src/node/ext/call_credentials.cc | 12 ++++++------ src/node/ext/call_credentials.h | 4 ++-- src/node/ext/node_grpc.cc | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/node/ext/call_credentials.cc b/src/node/ext/call_credentials.cc index 81fc552fd1..41f6c29f7d 100644 --- a/src/node/ext/call_credentials.cc +++ b/src/node/ext/call_credentials.cc @@ -35,7 +35,7 @@ #include #include -#include +#include #include "grpc/grpc.h" #include "grpc/grpc_security.h" @@ -170,7 +170,7 @@ NAN_METHOD(CallCredentials::CreateFromPlugin) { grpc_metadata_credentials_plugin plugin; plugin_state *state = new plugin_state; state->callback = new Nan::Callback(info[0].As()); - state->pending_callbacks = new std::list(); + state->pending_callbacks = new std::queue(); uv_mutex_init(&state->plugin_mutex); uv_async_init(uv_default_loop(), &state->plugin_async, @@ -232,13 +232,13 @@ NAN_METHOD(PluginCallback) { NAUV_WORK_CB(SendPluginCallback) { Nan::HandleScope scope; plugin_state *state = reinterpret_cast(async->data); - std::list callbacks; + std::queue callbacks; uv_mutex_lock(&state->plugin_mutex); - callbacks.splice(callbacks.begin(), *state->pending_callbacks); + state->pending_callbacks->swap(callbacks); uv_mutex_unlock(&state->plugin_mutex); while (!callbacks.empty()) { plugin_callback_data *data = callbacks.front(); - callbacks.pop_front(); + callbacks.pop(); Local callback_data = Nan::New(); Nan::Set(callback_data, Nan::New("cb").ToLocalChecked(), Nan::New(reinterpret_cast(data->cb))); @@ -267,7 +267,7 @@ void plugin_get_metadata(void *state, grpc_auth_metadata_context context, data->user_data = user_data; uv_mutex_lock(&p_state->plugin_mutex); - p_state->pending_callbacks->push_back(data); + p_state->pending_callbacks->push(data); uv_mutex_unlock(&p_state->plugin_mutex); uv_async_send(&p_state->plugin_async); diff --git a/src/node/ext/call_credentials.h b/src/node/ext/call_credentials.h index 04c852bea1..21a4b8923e 100644 --- a/src/node/ext/call_credentials.h +++ b/src/node/ext/call_credentials.h @@ -34,7 +34,7 @@ #ifndef GRPC_NODE_CALL_CREDENTIALS_H_ #define GRPC_NODE_CALL_CREDENTIALS_H_ -#include +#include #include #include @@ -84,7 +84,7 @@ typedef struct plugin_callback_data { typedef struct plugin_state { Nan::Callback *callback; - std::list *pending_callbacks; + std::queue *pending_callbacks; uv_mutex_t plugin_mutex; // async.data == this uv_async_t plugin_async; diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 848c601587..620b086915 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -31,7 +31,7 @@ * */ -#include +#include #include #include @@ -66,7 +66,7 @@ typedef struct log_args { typedef struct logger_state { Nan::Callback *callback; - std::list *pending_args; + std::queue *pending_args; uv_mutex_t mutex; uv_async_t async; // Indicates that a logger has been set @@ -334,14 +334,14 @@ NAN_METHOD(SetDefaultRootsPem) { NAUV_WORK_CB(LogMessagesCallback) { Nan::HandleScope scope; - std::list args; + std::queue args; uv_mutex_lock(&grpc_logger_state.mutex); - args.splice(args.begin(), *grpc_logger_state.pending_args); + grpc_logger_state.pending_args->swap(args); uv_mutex_unlock(&grpc_logger_state.mutex); /* Call the callback with each log message */ while (!args.empty()) { log_args *arg = args.front(); - args.pop_front(); + args.pop(); Local file = Nan::New(arg->core_args.file).ToLocalChecked(); Local line = Nan::New(arg->core_args.line); Local severity = Nan::New( @@ -368,7 +368,7 @@ void node_log_func(gpr_log_func_args *args) { args_copy->timestamp = gpr_now(GPR_CLOCK_REALTIME); uv_mutex_lock(&grpc_logger_state.mutex); - grpc_logger_state.pending_args->push_back(args_copy); + grpc_logger_state.pending_args->push(args_copy); uv_mutex_unlock(&grpc_logger_state.mutex); uv_async_send(&grpc_logger_state.async); @@ -376,7 +376,7 @@ void node_log_func(gpr_log_func_args *args) { void init_logger() { memset(&grpc_logger_state, 0, sizeof(logger_state)); - grpc_logger_state.pending_args = new std::list(); + grpc_logger_state.pending_args = new std::queue(); uv_mutex_init(&grpc_logger_state.mutex); uv_async_init(uv_default_loop(), &grpc_logger_state.async, -- cgit v1.2.3 From e9fee3c48fb9fcda819a2fab648ebbbf3a6b5b7d Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 14 Dec 2016 17:36:50 -0800 Subject: Force use of local distributions in Python-building Pip refuses to recognize the presence of existent installations for some reason and decides to download from PyPI instead of using what's already installed as dependencies for our distributions-under-test. This forces pip to respect our wishes at the cost of some verbosity. --- tools/run_tests/build_python.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 0a73353ce5..c3783b6faa 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -162,25 +162,24 @@ pip_install_dir() { PWD=`pwd` cd $1 ($VENV_PYTHON setup.py build_ext -c $TOOLCHAIN || true) - # install the dependencies - $VENV_PYTHON -m pip install --upgrade . - # ensure that we've reinstalled the test packages - $VENV_PYTHON -m pip install --upgrade --force-reinstall --no-deps . + $VENV_PYTHON -m pip install --no-deps . cd $PWD } $VENV_PYTHON -m pip install --upgrade pip $VENV_PYTHON -m pip install setuptools $VENV_PYTHON -m pip install cython +$VENV_PYTHON -m pip install six enum34 protobuf futures pip_install_dir $ROOT + $VENV_PYTHON $ROOT/tools/distrib/python/make_grpcio_tools.py pip_install_dir $ROOT/tools/distrib/python/grpcio_tools -# TODO(atash) figure out namespace packages and grpcio-tools and auditwheel -# etc... -pip_install_dir $ROOT + $VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py preprocess $VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py build_package_protos pip_install_dir $ROOT/src/python/grpcio_health_checking + +$VENV_PYTHON -m pip install coverage oauth2client $VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py preprocess $VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py build_package_protos pip_install_dir $ROOT/src/python/grpcio_tests -- cgit v1.2.3 From aaddb5cb93bd983265002f189ae65e72765c36a5 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 13 Jan 2017 09:42:12 -0800 Subject: continue use of host_cpu and use x86 whenever not x86_64 --- src/ruby/tools/platform_check.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ruby/tools/platform_check.rb b/src/ruby/tools/platform_check.rb index 2c5ccffdda..1f4d5a68b7 100644 --- a/src/ruby/tools/platform_check.rb +++ b/src/ruby/tools/platform_check.rb @@ -42,15 +42,13 @@ module PLATFORM 'linux' end end - + def PLATFORM.architecture - case RbConfig::CONFIG['target_cpu'] + case RbConfig::CONFIG['host_cpu'] when /x86_64/ 'x86_64' - when /x86|i386/ - 'x86' else - fail 'cpu architecture detection failed' + 'x86' end end end -- cgit v1.2.3 From 4d08937206b81d0e2462ff2088d2e8cd8fe12233 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 13 Jan 2017 10:00:50 -0800 Subject: update grpc-tools.gemspec after with os_check -> plactform_check.rb --- src/ruby/tools/grpc-tools.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/tools/grpc-tools.gemspec b/src/ruby/tools/grpc-tools.gemspec index 68e2a7a113..bc142ae3cb 100644 --- a/src/ruby/tools/grpc-tools.gemspec +++ b/src/ruby/tools/grpc-tools.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |s| s.description = 'protoc and the Ruby gRPC protoc plugin' s.license = 'BSD-3-Clause' - s.files = %w( version.rb os_check.rb README.md ) + s.files = %w( version.rb platform_check.rb README.md ) s.files += Dir.glob('bin/**/*') s.bindir = 'bin' -- cgit v1.2.3