Merge branch 'master' into rq-threads-2

pull/16217/head
Sree Kuchibhotla 6 years ago
commit a21ab01420
  1. 2
      composer.json
  2. 10
      examples/csharp/HelloworldXamarin/README.md
  3. 2
      examples/ruby/grpc-demo.gemspec
  4. 5
      include/grpc/grpc.h
  5. 6
      setup.py
  6. 7
      src/core/ext/filters/client_channel/client_channel.cc
  7. 3
      src/core/lib/iomgr/ev_epoll1_linux.cc
  8. 3
      src/core/lib/iomgr/ev_epollex_linux.cc
  9. 15
      src/core/lib/iomgr/ev_epollsig_linux.cc
  10. 21
      src/core/lib/iomgr/ev_poll_posix.cc
  11. 6
      src/core/lib/iomgr/ev_posix.cc
  12. 18
      src/core/lib/iomgr/ev_posix.h
  13. 8
      src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
  14. 46
      src/csharp/build_packages_dotnetcli.sh
  15. 78
      src/csharp/build_unitypackage.bat
  16. 19
      src/csharp/experimental/README.md
  17. 13
      src/csharp/unitypackage/README.md
  18. 8
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Google.Protobuf.meta
  19. 8
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Google.Protobuf/lib.meta
  20. 8
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Google.Protobuf/lib/net45.meta
  21. 30
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Google.Protobuf/lib/net45/Google.Protobuf.dll.meta
  22. 7
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Google.Protobuf/lib/net45/Google.Protobuf.xml.meta
  23. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core.meta
  24. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/lib.meta
  25. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/lib/net45.meta
  26. 32
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/lib/net45/Grpc.Core.dll.meta
  27. 9
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/lib/net45/Grpc.Core.pdb.meta
  28. 9
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/lib/net45/Grpc.Core.xml.meta
  29. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes.meta
  30. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android.meta
  31. 8
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/arm64-v8a.meta
  32. 102
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/arm64-v8a/libgrpc_csharp_ext.so.meta
  33. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/armeabi-v7a.meta
  34. 102
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/armeabi-v7a/libgrpc_csharp_ext.so.meta
  35. 8
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/x86.meta
  36. 102
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/android/x86/libgrpc_csharp_ext.so.meta
  37. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/ios.meta
  38. 95
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/ios/libgrpc.a.meta
  39. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/ios/libgrpc_csharp_ext.a.meta
  40. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/linux.meta
  41. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/linux/x64.meta
  42. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/linux/x64/libgrpc_csharp_ext.so.meta
  43. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/linux/x86.meta
  44. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/linux/x86/libgrpc_csharp_ext.so.meta
  45. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/osx.meta
  46. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/osx/x64.meta
  47. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/osx/x64/grpc_csharp_ext.bundle.meta
  48. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/osx/x86.meta
  49. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/osx/x86/grpc_csharp_ext.bundle.meta
  50. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/win.meta
  51. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/win/x64.meta
  52. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/win/x64/grpc_csharp_ext.dll.meta
  53. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/win/x86.meta
  54. 117
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/win/x86/grpc_csharp_ext.dll.meta
  55. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/System.Interactive.Async.meta
  56. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/System.Interactive.Async/lib.meta
  57. 10
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/System.Interactive.Async/lib/net45.meta
  58. 32
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/System.Interactive.Async/lib/net45/System.Interactive.Async.dll.meta
  59. 9
      src/csharp/unitypackage/unitypackage_skeleton/Plugins/System.Interactive.Async/lib/net45/System.Interactive.Async.xml.meta
  60. 2
      src/php/composer.json
  61. 82
      src/python/grpcio/grpc/BUILD.bazel
  62. 46
      src/python/grpcio/grpc/_cython/BUILD.bazel
  63. 16
      src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pxd.pxi
  64. 17
      src/python/grpcio/grpc/_cython/_cygrpc/_hooks.pyx.pxi
  65. 2
      src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
  66. 1
      src/python/grpcio/grpc/_cython/cygrpc.pxd
  67. 1
      src/python/grpcio/grpc/_cython/cygrpc.pyx
  68. 58
      src/python/grpcio/grpc/beta/BUILD.bazel
  69. 27
      src/python/grpcio/grpc/experimental/BUILD.bazel
  70. 11
      src/python/grpcio/grpc/framework/BUILD.bazel
  71. 27
      src/python/grpcio/grpc/framework/common/BUILD.bazel
  72. 61
      src/python/grpcio/grpc/framework/foundation/BUILD.bazel
  73. 10
      src/python/grpcio/grpc/framework/interfaces/BUILD.bazel
  74. 29
      src/python/grpcio/grpc/framework/interfaces/base/BUILD.bazel
  75. 32
      src/python/grpcio/grpc/framework/interfaces/face/BUILD.bazel
  76. 17
      src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel
  77. 2
      templates/composer.json.template
  78. 48
      templates/src/csharp/build_packages_dotnetcli.sh.template
  79. 80
      templates/src/csharp/build_unitypackage.bat.template
  80. 2
      templates/src/php/composer.json.template
  81. 1
      tools/internal_ci/linux/grpc_publish_packages.sh
  82. 3
      tools/interop_matrix/client_matrix.py
  83. 38
      tools/run_tests/artifacts/package_targets.py

@ -9,7 +9,7 @@
"php": ">=5.5.0" "php": ">=5.5.0"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "^v1.3.0"
}, },
"suggest": { "suggest": {
"ext-protobuf": "For better performance, install the protobuf C extension.", "ext-protobuf": "For better performance, install the protobuf C extension.",

@ -8,27 +8,29 @@ The example depends on experimental Grpc.Core nuget package that hasn't
been officially released and is only available via the [daily builds](https://packages.grpc.io/) been officially released and is only available via the [daily builds](https://packages.grpc.io/)
source. source.
HINT: To download the package, please manually download the latest `.nupkg` packages from "Daily Builds" in [packages.grpc.io](https://packages.grpc.io/) into a local directory. Then add a nuget source that points to that directory (That can be [done in Visual Studio](https://docs.microsoft.com/en-us/nuget/tools/package-manager-ui#package-sources) or Visual Studio for Mac via "Configure nuget sources"). After that, nuget will also explore that directory when looking for packages.
BACKGROUND BACKGROUND
------------- -------------
The example project supports Xamarin.Android and Xamarin.iOS The example project supports `Xamarin.Android` and `Xamarin.iOS`.
For this sample, we've already generated the server and client stubs from [helloworld.proto][]. For this sample, we've already generated the server and client stubs from [helloworld.proto][].
PREREQUISITES PREREQUISITES
------------- -------------
- The latest version Xamarin Studio or Visual Studio 2017 with Xamarin support installed. - The latest version Visual Studio 2017 or Visual Studio for Mac with Xamarin support installed.
BUILD BUILD
------- -------
- Open the `HelloworldXamarin.sln` in Visual Studio (or Xamarin Studio) - Open the `HelloworldXamarin.sln` in Visual Studio (or Visual Studio for Mac)
- Build the solution (Build -> Build All) - Build the solution (Build -> Build All)
Try it! Try it!
------- -------
You can deploy the example apps directly through Xamarin Studio IDE. You can deploy the example apps directly through Visual Studio IDE.
Deployments can target both Android and iOS (both support physical device Deployments can target both Android and iOS (both support physical device
deployment as well as simulator). deployment as well as simulator).

@ -18,6 +18,6 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.add_dependency 'grpc', '~> 1.0' s.add_dependency 'grpc', '~> 1.0'
s.add_dependency 'multi_json', '~> 1.13.1'
s.add_development_dependency 'bundler', '~> 1.7' s.add_development_dependency 'bundler', '~> 1.7'
end end

@ -60,6 +60,8 @@ GRPCAPI void grpc_register_plugin(void (*init)(void), void (*destroy)(void));
/** Initialize the grpc library. /** Initialize the grpc library.
After it's called, a matching invocation to grpc_shutdown() is expected.
It is not safe to call any other grpc functions before calling this. It is not safe to call any other grpc functions before calling this.
(To avoid overhead, little checking is done, and some things may work. We (To avoid overhead, little checking is done, and some things may work. We
do not warrant that they will continue to do so in future revisions of this do not warrant that they will continue to do so in future revisions of this
@ -68,6 +70,9 @@ GRPCAPI void grpc_init(void);
/** Shut down the grpc library. /** Shut down the grpc library.
Before it's called, there should haven been a matching invocation to
grpc_init().
No memory is used by grpc after this call returns, nor are any instructions No memory is used by grpc after this call returns, nor are any instructions
executing within the grpc library. executing within the grpc library.
Prior to calling, all application owned grpc objects must have been Prior to calling, all application owned grpc objects must have been

@ -276,11 +276,11 @@ PACKAGE_DIRECTORIES = {
} }
INSTALL_REQUIRES = ( INSTALL_REQUIRES = (
'six>=1.5.2', "six>=1.5.2",
"futures>=2.2.0 ; python_version<'3.2'",
"enum34>=1.0.4 ; python_version<'3.4'"
) )
if not PY3:
INSTALL_REQUIRES += ('futures>=2.2.0', 'enum34>=1.0.4')
SETUP_REQUIRES = INSTALL_REQUIRES + ( SETUP_REQUIRES = INSTALL_REQUIRES + (
'sphinx>=1.3', 'sphinx>=1.3',

@ -578,7 +578,12 @@ static void start_transport_op_locked(void* arg, grpc_error* error_ignored) {
} else { } else {
grpc_error* error = GRPC_ERROR_NONE; grpc_error* error = GRPC_ERROR_NONE;
grpc_core::LoadBalancingPolicy::PickState pick_state; grpc_core::LoadBalancingPolicy::PickState pick_state;
memset(&pick_state, 0, sizeof(pick_state)); pick_state.initial_metadata = nullptr;
pick_state.initial_metadata_flags = 0;
pick_state.on_complete = nullptr;
memset(&pick_state.subchannel_call_context, 0,
sizeof(pick_state.subchannel_call_context));
pick_state.user_data = nullptr;
// Pick must return synchronously, because pick_state.on_complete is null. // Pick must return synchronously, because pick_state.on_complete is null.
GPR_ASSERT(chand->lb_policy->PickLocked(&pick_state, &error)); GPR_ASSERT(chand->lb_policy->PickLocked(&pick_state, &error));
if (pick_state.connected_subchannel != nullptr) { if (pick_state.connected_subchannel != nullptr) {

@ -1203,6 +1203,9 @@ static const grpc_event_engine_vtable vtable = {
fd_notify_on_read, fd_notify_on_read,
fd_notify_on_write, fd_notify_on_write,
fd_notify_on_error, fd_notify_on_error,
fd_become_readable,
fd_become_writable,
fd_has_errors,
fd_is_shutdown, fd_is_shutdown,
pollset_init, pollset_init,

@ -1615,6 +1615,9 @@ static const grpc_event_engine_vtable vtable = {
fd_notify_on_read, fd_notify_on_read,
fd_notify_on_write, fd_notify_on_write,
fd_notify_on_error, fd_notify_on_error,
fd_become_readable,
fd_become_writable,
fd_has_errors,
fd_is_shutdown, fd_is_shutdown,
pollset_init, pollset_init,

@ -948,6 +948,12 @@ static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
fd->error_closure->NotifyOn(closure); fd->error_closure->NotifyOn(closure);
} }
static void fd_become_readable(grpc_fd* fd) { fd->read_closure->SetReady(); }
static void fd_become_writable(grpc_fd* fd) { fd->write_closure->SetReady(); }
static void fd_has_errors(grpc_fd* fd) { fd->error_closure->SetReady(); }
/******************************************************************************* /*******************************************************************************
* Pollset Definitions * Pollset Definitions
*/ */
@ -1105,12 +1111,6 @@ static int poll_deadline_to_millis_timeout(grpc_millis millis) {
return static_cast<int>(delta); return static_cast<int>(delta);
} }
static void fd_become_readable(grpc_fd* fd) { fd->read_closure->SetReady(); }
static void fd_become_writable(grpc_fd* fd) { fd->write_closure->SetReady(); }
static void fd_has_errors(grpc_fd* fd) { fd->error_closure->SetReady(); }
static void pollset_release_polling_island(grpc_pollset* ps, static void pollset_release_polling_island(grpc_pollset* ps,
const char* reason) { const char* reason) {
if (ps->po.pi != nullptr) { if (ps->po.pi != nullptr) {
@ -1647,6 +1647,9 @@ static const grpc_event_engine_vtable vtable = {
fd_notify_on_read, fd_notify_on_read,
fd_notify_on_write, fd_notify_on_write,
fd_notify_on_error, fd_notify_on_error,
fd_become_readable,
fd_become_writable,
fd_has_errors,
fd_is_shutdown, fd_is_shutdown,
pollset_init, pollset_init,

@ -538,6 +538,24 @@ static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_CANCELLED); GRPC_CLOSURE_SCHED(closure, GRPC_ERROR_CANCELLED);
} }
static void fd_set_readable(grpc_fd* fd) {
gpr_mu_lock(&fd->mu);
set_ready_locked(fd, &fd->read_closure);
gpr_mu_unlock(&fd->mu);
}
static void fd_set_writable(grpc_fd* fd) {
gpr_mu_lock(&fd->mu);
set_ready_locked(fd, &fd->write_closure);
gpr_mu_unlock(&fd->mu);
}
static void fd_set_error(grpc_fd* fd) {
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_ERROR, "Polling engine does not support tracking errors.");
}
}
static uint32_t fd_begin_poll(grpc_fd* fd, grpc_pollset* pollset, static uint32_t fd_begin_poll(grpc_fd* fd, grpc_pollset* pollset,
grpc_pollset_worker* worker, uint32_t read_mask, grpc_pollset_worker* worker, uint32_t read_mask,
uint32_t write_mask, grpc_fd_watcher* watcher) { uint32_t write_mask, grpc_fd_watcher* watcher) {
@ -1700,6 +1718,9 @@ static const grpc_event_engine_vtable vtable = {
fd_notify_on_read, fd_notify_on_read,
fd_notify_on_write, fd_notify_on_write,
fd_notify_on_error, fd_notify_on_error,
fd_set_readable,
fd_set_writable,
fd_set_error,
fd_is_shutdown, fd_is_shutdown,
pollset_init, pollset_init,

@ -239,6 +239,12 @@ void grpc_fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
g_event_engine->fd_notify_on_error(fd, closure); g_event_engine->fd_notify_on_error(fd, closure);
} }
void grpc_fd_set_readable(grpc_fd* fd) { g_event_engine->fd_set_readable(fd); }
void grpc_fd_set_writable(grpc_fd* fd) { g_event_engine->fd_set_writable(fd); }
void grpc_fd_set_error(grpc_fd* fd) { g_event_engine->fd_set_error(fd); }
static size_t pollset_size(void) { return g_event_engine->pollset_size; } static size_t pollset_size(void) { return g_event_engine->pollset_size; }
static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) { static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {

@ -51,6 +51,9 @@ typedef struct grpc_event_engine_vtable {
void (*fd_notify_on_read)(grpc_fd* fd, grpc_closure* closure); void (*fd_notify_on_read)(grpc_fd* fd, grpc_closure* closure);
void (*fd_notify_on_write)(grpc_fd* fd, grpc_closure* closure); void (*fd_notify_on_write)(grpc_fd* fd, grpc_closure* closure);
void (*fd_notify_on_error)(grpc_fd* fd, grpc_closure* closure); void (*fd_notify_on_error)(grpc_fd* fd, grpc_closure* closure);
void (*fd_set_readable)(grpc_fd* fd);
void (*fd_set_writable)(grpc_fd* fd);
void (*fd_set_error)(grpc_fd* fd);
bool (*fd_is_shutdown)(grpc_fd* fd); bool (*fd_is_shutdown)(grpc_fd* fd);
void (*pollset_init)(grpc_pollset* pollset, gpr_mu** mu); void (*pollset_init)(grpc_pollset* pollset, gpr_mu** mu);
@ -141,6 +144,21 @@ void grpc_fd_notify_on_write(grpc_fd* fd, grpc_closure* closure);
* needs to have been set on grpc_fd_create */ * needs to have been set on grpc_fd_create */
void grpc_fd_notify_on_error(grpc_fd* fd, grpc_closure* closure); void grpc_fd_notify_on_error(grpc_fd* fd, grpc_closure* closure);
/* Forcibly set the fd to be readable, resulting in the closure registered with
* grpc_fd_notify_on_read being invoked.
*/
void grpc_fd_set_readable(grpc_fd* fd);
/* Forcibly set the fd to be writable, resulting in the closure registered with
* grpc_fd_notify_on_write being invoked.
*/
void grpc_fd_set_writable(grpc_fd* fd);
/* Forcibly set the fd to have errored, resulting in the closure registered with
* grpc_fd_notify_on_error being invoked.
*/
void grpc_fd_set_error(grpc_fd* fd);
/* pollset_posix functions */ /* pollset_posix functions */
/* Add an fd to a pollset */ /* Add an fd to a pollset */

@ -462,6 +462,14 @@ void alts_tsi_handshaker_handle_response(alts_tsi_handshaker* handshaker,
set_unused_bytes(result, &handshaker->recv_bytes, resp->bytes_consumed); set_unused_bytes(result, &handshaker->recv_bytes, resp->bytes_consumed);
} }
grpc_status_code code = static_cast<grpc_status_code>(resp->status.code); grpc_status_code code = static_cast<grpc_status_code>(resp->status.code);
if (code != GRPC_STATUS_OK) {
grpc_slice* details = static_cast<grpc_slice*>(resp->status.details.arg);
if (details != nullptr) {
char* error_details = grpc_slice_to_c_string(*details);
gpr_log(GPR_ERROR, "Error from handshaker service:%s", error_details);
gpr_free(error_details);
}
}
grpc_gcp_handshaker_resp_destroy(resp); grpc_gcp_handshaker_resp_destroy(resp);
cb(alts_tsi_utils_convert_to_tsi_result(code), user_data, bytes_to_send, cb(alts_tsi_utils_convert_to_tsi_result(code), user_data, bytes_to_send,
bytes_to_send_size, result); bytes_to_send_size, result);

@ -1,46 +0,0 @@
#!/bin/bash
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
cd $(dirname $0)
mkdir -p ../../artifacts/
# Collect the artifacts built by the previous build step
mkdir -p nativelibs
cp -r $EXTERNAL_GIT_ROOT/input_artifacts/csharp_ext_* nativelibs || true
# Collect protoc artifacts built by the previous build step
mkdir -p protoc_plugins
cp -r $EXTERNAL_GIT_ROOT/input_artifacts/protoc_* protoc_plugins || true
dotnet restore Grpc.sln
# To be able to build, we also need to put grpc_csharp_ext to its normal location
mkdir -p ../../libs/opt
cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt
dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts
dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
nuget pack Grpc.nuspec -Version "1.15.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Core.NativeDebug.nuspec -Version "1.15.0-dev" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "1.15.0-dev" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)

@ -0,0 +1,78 @@
@rem Copyright 2018 The gRPC Authors
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem Current package versions
set VERSION=1.15.0-dev
@rem Adjust the location of nuget.exe
set NUGET=C:\nuget\nuget.exe
set DOTNET=dotnet
mkdir ..\..\artifacts
@rem Collect the artifacts built by the previous build step
mkdir nativelibs
powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
mkdir protoc_plugins
powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
%DOTNET% restore Grpc.sln || goto :error
@rem To be able to build, we also need to put grpc_csharp_ext to its normal location
xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release\
%DOTNET% build --configuration Release Grpc.Core || goto :error
@rem build HealthCheck to get hold of Google.Protobuf.dll assembly
%DOTNET% build --configuration Release Grpc.HealthCheck || goto :error
@rem copy Grpc assemblies to the unity package skeleton
@rem TODO(jtattermusch): Add Grpc.Auth assembly and its dependencies
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.dll || goto :error
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.pdb unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.pdb || goto :error
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.xml unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.xml || goto :error
@rem copy desktop native libraries to the unity package skeleton
copy /Y nativelibs\csharp_ext_linux_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x86\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_x64\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x64\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_macos_x86\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x86\grpc_csharp_ext.bundle || goto :error
copy /Y nativelibs\csharp_ext_macos_x64\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x64\grpc_csharp_ext.bundle || goto :error
copy /Y nativelibs\csharp_ext_windows_x86\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x86\grpc_csharp_ext.dll || goto :error
copy /Y nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x64\grpc_csharp_ext.dll || goto :error
@rem add Android and iOS native libraries
copy /Y nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\armeabi-v7a\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\arm64-v8a\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\x86\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc_csharp_ext.a || goto :error
copy /Y nativelibs\csharp_ext_macos_ios\libgrpc.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc.a || goto :error
@rem add gRPC dependencies
@rem TODO(jtattermusch): also include XMLdoc
copy /Y Grpc.Core\bin\Release\net45\System.Interactive.Async.dll unitypackage\unitypackage_skeleton\Plugins\System.Interactive.Async\lib\net45\System.Interactive.Async.dll || goto :error
@rem add Google.Protobuf
@rem TODO(jtattermusch): also include XMLdoc
copy /Y Grpc.HealthCheck\bin\Release\net45\Google.Protobuf.dll unitypackage\unitypackage_skeleton\Plugins\Google.Protobuf\lib\net45\Google.Protobuf.dll || goto :error
@rem create a zipfile that will act as a Unity package
powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('unitypackage\unitypackage_skeleton', 'grpc_unity_package.zip');"
copy /Y grpc_unity_package.zip ..\..\artifacts\grpc_unity_package.%VERSION%.zip || goto :error
goto :EOF
:error
echo Failed!
exit /b %errorlevel%

@ -17,6 +17,19 @@ Xamarin.iOS
- supported architectures: arm64 (iPhone 6+) and x86_64 (iPhone simulator) - supported architectures: arm64 (iPhone 6+) and x86_64 (iPhone simulator)
# Unity # Unity
gRPC C# currently doesn't support Unity, but some proof-of-concept
work has been done. There is in-progress effort to provide users gRPC C# now has experimental support for Unity. Please try using gRPC with
with a pre-built gRPC package that can be used in their projects. Unity and provide feedback!
How to test gRPC in a Unity project
1. Create a Unity project that targets .NET 4.x (Edit -> Project Settings -> Editor -> Scripting Runtime Version). gRPC uses APIs that are only available in .NET4.5+ so this is a requirement.
2. Download the latest development build of `grpc_unity_package.VERSION.zip` from
[daily builds](https://packages.grpc.io/)
3. Extract the `.zip` file in the `Assets` directory in your Unity project
4. Unity IDE will pick up all the bundled files and add them to project automatically.
You should be able to use gRPC and Protobuf in your scripts from now on.
What's currently bundled in the `grpc_unity_package`
- Grpc.Core and its dependencies
- Google.Protobuf
- Precompiled native libraries for Linux, MacOS, Windows, Android and iOS.

@ -0,0 +1,13 @@
# Scripts for building gRPC C# package for Unity
Scripts in this directory are of no interest for end users. They are part
of internal tooling to automate building of the gRPC C# package for Unity.
- `unitypackage_skeleton` - preconfigured `.meta` files for the unity package
layout. The actual assemblies and native libraries will be added into
this hierarchy while building the package.
Note: The `.meta` file were created by the Unity IDE by manually adding the assemblies/native libraries
to a Unity project and configuring their target plaform/architecture in the UI (these setting get recorded in
`.meta` files). The `.meta` format is not very well documented and there seems to be no easy way to generate them
automatically.

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4b6ebd913ac610041b63fc847ee96302
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e4ab5b3f8a676a84a9eb3ffcf1e8138d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4c50e24955a9a294b99ad097ae2e252a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,30 @@
fileFormatVersion: 2
guid: 286edf5aec6aae64697e5e8b7ab9b60e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 22de11620a7e57e41bc221729937524c
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e28eaddc034fe664591e93e8816968aa
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1f862d451f11a2442aeac99ad2827285
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 89bdbe2a1282d4e40ba11e96b1481d09
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 63fdcd70d29d1dc49b4e61e22a9e96e1
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 49a6ef383d4d43640b6c7fd8168415ae
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ec9cf7702008ac648af0687c05064f78
timeCreated: 1531219386
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 643bdb9ca01174f4eb77e3e15f8324b3
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f7f79be62cf24a940be0211dab5d2e5e
folderAsset: yes
timeCreated: 1531220113
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 47ba39f5fad6b49c5aae011940e9eea2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,102 @@
fileFormatVersion: 2
guid: e5beceb1c8fb2403ab3dea319dcd9a2e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARM64
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: de2aa4d10bc38f54fb8345aca9b21195
folderAsset: yes
timeCreated: 1531220167
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,102 @@
fileFormatVersion: 2
guid: e5beceb1c8fb2403ab3dea319dcd9a2e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 800ab3aa15d1b49b19df1caf1315bd3e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,102 @@
fileFormatVersion: 2
guid: e5beceb1c8fb2403ab3dea319dcd9a2e
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 0
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a5f54f019e6510541ac61eeec96aa82d
folderAsset: yes
timeCreated: 1531456012
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,95 @@
fileFormatVersion: 2
guid: dde9f75258bae4033a4f778fd1149ccd
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 83f99c0e7db71754ba8927bbfb83c668
timeCreated: 1531456013
licenseType: Pro
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 1
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 1ff40de7dc502c14e8893c7679e9f44a
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 08ccfdbfbd8d2d6458eb44d41a7b0b0a
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: c176dc12f2803e14bb37bcd0ba4a0718
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Linux
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: d62d998e3cdebd542a967743103c64b6
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 0165d78fa73d0cc4c8984f3d4f2a6c86
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 1
Exclude LinuxUniversal: 0
Exclude OSXIntel: 1
Exclude OSXIntel64: 1
Exclude OSXUniversal: 1
Exclude Win: 0
Exclude Win64: 0
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86
DefaultValueInitialized: true
OS: Linux
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7b1ebe888da0a174c95a712766d2558c
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ccea531b15a71974a91329186dd65075
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: da53c729add26524fbecb84a7b599289
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 1
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: OSX
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 2ee63d0ffcfa72a4fbd7ad04ba34cadb
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 34ec9b69f128d6d4fa3fb46bc70b547c
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXIntel: 0
Exclude OSXIntel64: 1
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86
DefaultValueInitialized: true
OS: OSX
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXIntel
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 928a9392668000344b70b6fd126e522c
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 34969b8c99d7a934eaa5e84da9fcf326
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: cb634ddbaed75c344a6b79bc91ca996e
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXIntel: 0
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 0
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86_64
DefaultValueInitialized: true
OS: Windows
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: None
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Win64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ed5c6044f868f9a4f955b7db2d2df619
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: fe9aa1338bfc3864eb50df0f9d648316
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXIntel: 0
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude Win: 0
Exclude Win64: 1
Exclude iOS: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: ARMv7
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86
DefaultValueInitialized: true
OS: Windows
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
- first:
iPhone: iOS
second:
enabled: 0
settings:
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: b2ba2199282e9c641bc2e611f1e776a0
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: bd5ddd2522dc301488ffe002106fe0ab
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a68443518bcd1d44ba88a871dcab0c83
folderAsset: yes
timeCreated: 1531219385
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 4c05e46cbf00c68408f5ddc1eef9ae3b
timeCreated: 1531219386
licenseType: Free
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6fc38864f2d3dde46b3833c62c91a008
timeCreated: 1531219386
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -8,7 +8,7 @@
"google/protobuf": "^v3.3.0" "google/protobuf": "^v3.3.0"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "^v1.3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

@ -0,0 +1,82 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_binary(
name = "grpcio",
srcs = ["__init__.py"],
deps = [
":utilities",
":auth",
":plugin_wrapping",
":channel",
":interceptor",
":server",
"//src/python/grpcio/grpc/_cython:cygrpc",
"//src/python/grpcio/grpc/beta",
"//src/python/grpcio/grpc/experimental",
"//src/python/grpcio/grpc/framework",
requirement('enum34'),
requirement('six'),
],
data = [
"//:grpc",
],
main = "__init__.py",
imports = ["../",],
)
py_library(
name = "auth",
srcs = ["_auth.py"],
)
py_library(
name = "channel",
srcs = ["_channel.py"],
deps = [
":common",
":grpcio_metadata",
],
)
py_library(
name = "common",
srcs = ["_common.py"],
)
py_library(
name = "grpcio_metadata",
srcs = ["_grpcio_metadata.py"],
)
py_library(
name = "interceptor",
srcs = ["_interceptor.py"],
)
py_library(
name = "plugin_wrapping",
srcs = ["_plugin_wrapping.py"],
deps = [
":common",
]
)
py_library(
name = "server",
srcs = ["_server.py"],
deps = [
":common",
":interceptor",
],
)
py_library(
name = "utilities",
srcs = ["_utilities.py"],
deps = [
":common",
],
)

@ -0,0 +1,46 @@
package(default_visibility = ["//visibility:public"])
load("//bazel:cython_library.bzl", "pyx_library")
pyx_library(
name = "cygrpc",
srcs = [
"__init__.py",
"cygrpc.pxd",
"cygrpc.pyx",
"_cygrpc/grpc_string.pyx.pxi",
"_cygrpc/arguments.pyx.pxi",
"_cygrpc/call.pyx.pxi",
"_cygrpc/channel.pyx.pxi",
"_cygrpc/credentials.pyx.pxi",
"_cygrpc/completion_queue.pyx.pxi",
"_cygrpc/event.pyx.pxi",
"_cygrpc/metadata.pyx.pxi",
"_cygrpc/operation.pyx.pxi",
"_cygrpc/records.pyx.pxi",
"_cygrpc/security.pyx.pxi",
"_cygrpc/server.pyx.pxi",
"_cygrpc/tag.pyx.pxi",
"_cygrpc/time.pyx.pxi",
"_cygrpc/grpc_gevent.pyx.pxi",
"_cygrpc/grpc.pxi",
"_cygrpc/arguments.pxd.pxi",
"_cygrpc/call.pxd.pxi",
"_cygrpc/channel.pxd.pxi",
"_cygrpc/credentials.pxd.pxi",
"_cygrpc/completion_queue.pxd.pxi",
"_cygrpc/event.pxd.pxi",
"_cygrpc/metadata.pxd.pxi",
"_cygrpc/operation.pxd.pxi",
"_cygrpc/records.pxd.pxi",
"_cygrpc/security.pxd.pxi",
"_cygrpc/server.pxd.pxi",
"_cygrpc/tag.pxd.pxi",
"_cygrpc/time.pxd.pxi",
"_cygrpc/grpc_gevent.pxd.pxi",
],
deps = [
"//:grpc",
],
)

@ -0,0 +1,16 @@
# Copyright 2018 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cdef object _custom_op_on_c_call(int op, grpc_call *call)

@ -0,0 +1,17 @@
# Copyright 2018 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cdef object _custom_op_on_c_call(int op, grpc_call *call):
raise NotImplementedError("No custom hooks are implemented")

@ -94,3 +94,5 @@ cdef class Call:
def is_valid(self): def is_valid(self):
return self.c_call != NULL return self.c_call != NULL
def _custom_op_on_c_call(self, int op):
return _custom_op_on_c_call(op, self.c_call)

@ -28,5 +28,6 @@ include "_cygrpc/security.pxd.pxi"
include "_cygrpc/server.pxd.pxi" include "_cygrpc/server.pxd.pxi"
include "_cygrpc/tag.pxd.pxi" include "_cygrpc/tag.pxd.pxi"
include "_cygrpc/time.pxd.pxi" include "_cygrpc/time.pxd.pxi"
include "_cygrpc/_hooks.pxd.pxi"
include "_cygrpc/grpc_gevent.pxd.pxi" include "_cygrpc/grpc_gevent.pxd.pxi"

@ -35,6 +35,7 @@ include "_cygrpc/security.pyx.pxi"
include "_cygrpc/server.pyx.pxi" include "_cygrpc/server.pyx.pxi"
include "_cygrpc/tag.pyx.pxi" include "_cygrpc/tag.pyx.pxi"
include "_cygrpc/time.pyx.pxi" include "_cygrpc/time.pyx.pxi"
include "_cygrpc/_hooks.pyx.pxi"
include "_cygrpc/grpc_gevent.pyx.pxi" include "_cygrpc/grpc_gevent.pyx.pxi"

@ -0,0 +1,58 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "beta",
srcs = ["__init__.py",],
deps = [
":client_adaptations",
":metadata",
":server_adaptations",
":implementations",
":interfaces",
":utilities",
],
)
py_library(
name = "client_adaptations",
srcs = ["_client_adaptations.py"],
imports=["../../",]
)
py_library(
name = "metadata",
srcs = ["_metadata.py"],
)
py_library(
name = "server_adaptations",
srcs = ["_server_adaptations.py"],
imports=["../../",],
)
py_library(
name = "implementations",
srcs = ["implementations.py"],
imports=["../../",],
)
py_library(
name = "interfaces",
srcs = ["interfaces.py"],
deps = [
requirement("six"),
],
imports=["../../",],
)
py_library(
name = "utilities",
srcs = ["utilities.py"],
deps = [
":implementations",
":interfaces",
"//src/python/grpcio/grpc/framework/foundation",
],
)

@ -0,0 +1,27 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "experimental",
srcs = ["__init__.py",],
deps = [
":gevent",
":session_cache",
],
)
py_library(
name = "gevent",
srcs = ["gevent.py"],
deps = [
"//src/python/grpcio/grpc/_cython:cygrpc",
],
)
py_library(
name = "session_cache",
srcs = ["session_cache.py"],
deps = [
"//src/python/grpcio/grpc/_cython:cygrpc",
],
)

@ -0,0 +1,11 @@
package(default_visibility = ["//visibility:public"])
py_library(
name = "framework",
srcs = ["__init__.py",],
deps = [
"//src/python/grpcio/grpc/framework/common",
"//src/python/grpcio/grpc/framework/foundation",
"//src/python/grpcio/grpc/framework/interfaces",
],
)

@ -0,0 +1,27 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "common",
srcs = ["__init__.py",],
deps = [
":cardinality",
":style",
],
)
py_library(
name = "cardinality",
srcs = ["cardinality.py"],
deps = [
requirement("enum34"),
],
)
py_library(
name = "style",
srcs = ["style.py"],
deps = [
requirement("enum34"),
],
)

@ -0,0 +1,61 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "foundation",
srcs = ["__init__.py",],
deps = [
":abandonment",
":callable_util",
":future",
":logging_pool",
":stream_util",
":stream",
],
)
py_library(
name = "abandonment",
srcs = ["abandonment.py"],
)
py_library(
name = "callable_util",
srcs = ["callable_util.py"],
deps = [
requirement("enum34"),
requirement("six"),
],
)
py_library(
name = "future",
srcs = ["future.py"],
deps = [
requirement("six"),
],
)
py_library(
name = "logging_pool",
srcs = ["logging_pool.py"],
deps = [
requirement("futures"),
],
)
py_library(
name = "stream_util",
srcs = ["stream_util.py"],
deps = [
":stream",
],
)
py_library(
name = "stream",
srcs = ["stream.py"],
deps = [
requirement("six"),
],
)

@ -0,0 +1,10 @@
package(default_visibility = ["//visibility:public"])
py_library(
name = "interfaces",
srcs = ["__init__.py",],
deps = [
"//src/python/grpcio/grpc/framework/interfaces/base",
"//src/python/grpcio/grpc/framework/interfaces/face",
],
)

@ -0,0 +1,29 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "base_lib",
srcs = ["__init__.py",],
deps = [
":base",
":utilities",
],
)
py_library(
name = "base",
srcs = ["base.py"],
deps = [
"//src/python/grpcio/grpc/framework/foundation:abandonment",
requirement("enum34"),
requirement("six"),
],
)
py_library(
name = "utilities",
srcs = ["utilities.py"],
deps = [
requirement("enum34"),
],
)

@ -0,0 +1,32 @@
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:public"])
py_library(
name = "face",
srcs = ["__init__.py",],
deps = [
":face_lib",
":utilities",
],
)
py_library(
name = "face_lib",
srcs = ["face.py"],
deps = [
"//src/python/grpcio/grpc/framework/foundation",
"//src/python/grpcio/grpc/framework/common",
requirement("enum34"),
requirement("six"),
],
)
py_library(
name = "utilities",
srcs = ["utilities.py"],
deps = [
"//src/python/grpcio/grpc/framework/common",
"//src/python/grpcio/grpc/framework/foundation:stream",
":face_lib",
],
)

@ -0,0 +1,17 @@
package(default_visibility = ["//visibility:public"])
py_library(
name = "stream_testing",
srcs = ["stream_testing.py"],
)
py_test(
name = "logging_pool_test",
srcs = ["_logging_pool_test.py"],
main = "_logging_pool_test.py",
size = "small",
deps = [
"//src/python/grpcio/grpc:grpcio",
],
)

@ -11,7 +11,7 @@
"php": ">=5.5.0" "php": ">=5.5.0"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "^v1.3.0"
}, },
"suggest": { "suggest": {
"ext-protobuf": "For better performance, install the protobuf C extension.", "ext-protobuf": "For better performance, install the protobuf C extension.",

@ -1,48 +0,0 @@
%YAML 1.2
--- |
#!/bin/bash
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
cd $(dirname $0)
mkdir -p ../../artifacts/
# Collect the artifacts built by the previous build step
mkdir -p nativelibs
cp -r $EXTERNAL_GIT_ROOT/input_artifacts/csharp_ext_* nativelibs || true
# Collect protoc artifacts built by the previous build step
mkdir -p protoc_plugins
cp -r $EXTERNAL_GIT_ROOT/input_artifacts/protoc_* protoc_plugins || true
dotnet restore Grpc.sln
# To be able to build, we also need to put grpc_csharp_ext to its normal location
mkdir -p ../../libs/opt
cp nativelibs/csharp_ext_linux_x64/libgrpc_csharp_ext.so ../../libs/opt
dotnet pack --configuration Release Grpc.Core --output ../../../artifacts
dotnet pack --configuration Release Grpc.Core.Testing --output ../../../artifacts
dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts
dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts
dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts
nuget pack Grpc.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
nuget pack Grpc.Core.NativeDebug.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
nuget pack Grpc.Tools.nuspec -Version "${settings.csharp_version}" -OutputDirectory ../../artifacts
(cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg)

@ -0,0 +1,80 @@
%YAML 1.2
--- |
@rem Copyright 2018 The gRPC Authors
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem Current package versions
set VERSION=${settings.csharp_version}
@rem Adjust the location of nuget.exe
set NUGET=C:\nuget\nuget.exe
set DOTNET=dotnet
mkdir ..\..\artifacts
@rem Collect the artifacts built by the previous build step
mkdir nativelibs
powershell -Command "cp -r ..\..\input_artifacts\csharp_ext_* nativelibs"
@rem Collect protoc artifacts built by the previous build step
mkdir protoc_plugins
powershell -Command "cp -r ..\..\input_artifacts\protoc_* protoc_plugins"
%%DOTNET% restore Grpc.sln || goto :error
@rem To be able to build, we also need to put grpc_csharp_ext to its normal location
xcopy /Y /I nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll ..\..\cmake\build\x64\Release${"\\"}
%%DOTNET% build --configuration Release Grpc.Core || goto :error
@rem build HealthCheck to get hold of Google.Protobuf.dll assembly
%%DOTNET% build --configuration Release Grpc.HealthCheck || goto :error
@rem copy Grpc assemblies to the unity package skeleton
@rem TODO(jtattermusch): Add Grpc.Auth assembly and its dependencies
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.dll || goto :error
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.pdb unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.pdb || goto :error
copy /Y Grpc.Core\bin\Release\net45\Grpc.Core.xml unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\lib\net45\Grpc.Core.xml || goto :error
@rem copy desktop native libraries to the unity package skeleton
copy /Y nativelibs\csharp_ext_linux_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x86\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_x64\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\linux\x64\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_macos_x86\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x86\grpc_csharp_ext.bundle || goto :error
copy /Y nativelibs\csharp_ext_macos_x64\libgrpc_csharp_ext.dylib unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\osx\x64\grpc_csharp_ext.bundle || goto :error
copy /Y nativelibs\csharp_ext_windows_x86\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x86\grpc_csharp_ext.dll || goto :error
copy /Y nativelibs\csharp_ext_windows_x64\grpc_csharp_ext.dll unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\win\x64\grpc_csharp_ext.dll || goto :error
@rem add Android and iOS native libraries
copy /Y nativelibs\csharp_ext_linux_android_armeabi-v7a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\armeabi-v7a\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_android_arm64-v8a\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\arm64-v8a\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_linux_android_x86\libgrpc_csharp_ext.so unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\android\x86\libgrpc_csharp_ext.so || goto :error
copy /Y nativelibs\csharp_ext_macos_ios\libgrpc_csharp_ext.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc_csharp_ext.a || goto :error
copy /Y nativelibs\csharp_ext_macos_ios\libgrpc.a unitypackage\unitypackage_skeleton\Plugins\Grpc.Core\runtimes\ios\libgrpc.a || goto :error
@rem add gRPC dependencies
@rem TODO(jtattermusch): also include XMLdoc
copy /Y Grpc.Core\bin\Release\net45\System.Interactive.Async.dll unitypackage\unitypackage_skeleton\Plugins\System.Interactive.Async\lib\net45\System.Interactive.Async.dll || goto :error
@rem add Google.Protobuf
@rem TODO(jtattermusch): also include XMLdoc
copy /Y Grpc.HealthCheck\bin\Release\net45\Google.Protobuf.dll unitypackage\unitypackage_skeleton\Plugins\Google.Protobuf\lib\net45\Google.Protobuf.dll || goto :error
@rem create a zipfile that will act as a Unity package
powershell -Command "Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('unitypackage\unitypackage_skeleton', 'grpc_unity_package.zip');"
copy /Y grpc_unity_package.zip ..\..\artifacts\grpc_unity_package.%VERSION%.zip || goto :error
goto :EOF
:error
echo Failed!
exit /b %errorlevel%

@ -10,7 +10,7 @@
"google/protobuf": "^v3.3.0" "google/protobuf": "^v3.3.0"
}, },
"require-dev": { "require-dev": {
"google/auth": "v0.9" "google/auth": "^v1.3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

@ -65,6 +65,7 @@ UNZIPPED_CSHARP_PACKAGES=$(mktemp -d)
unzip "$INPUT_ARTIFACTS/csharp_nugets_windows_dotnetcli.zip" -d "$UNZIPPED_CSHARP_PACKAGES" unzip "$INPUT_ARTIFACTS/csharp_nugets_windows_dotnetcli.zip" -d "$UNZIPPED_CSHARP_PACKAGES"
CSHARP_PACKAGES=( CSHARP_PACKAGES=(
"$UNZIPPED_CSHARP_PACKAGES"/* "$UNZIPPED_CSHARP_PACKAGES"/*
"$INPUT_ARTIFACTS"/grpc_unity_package.[0-9]*.zip
) )
# Python # Python

@ -178,6 +178,9 @@ LANG_RELEASE_MATRIX = {
{ {
'v1.13.1': None 'v1.13.1': None
}, },
{
'v1.14.0': None
},
], ],
'python': [ 'python': [
{ {

@ -56,7 +56,8 @@ def create_jobspec(name,
cwd=None, cwd=None,
shell=False, shell=False,
flake_retries=0, flake_retries=0,
timeout_retries=0): timeout_retries=0,
cpu_cost=1.0):
"""Creates jobspec.""" """Creates jobspec."""
jobspec = jobset.JobSpec( jobspec = jobset.JobSpec(
cmdline=cmdline, cmdline=cmdline,
@ -66,31 +67,36 @@ def create_jobspec(name,
timeout_seconds=10 * 60, timeout_seconds=10 * 60,
flake_retries=flake_retries, flake_retries=flake_retries,
timeout_retries=timeout_retries, timeout_retries=timeout_retries,
cpu_cost=cpu_cost,
shell=shell) shell=shell)
return jobspec return jobspec
class CSharpPackage: class CSharpPackage:
"""Builds C# nuget packages.""" """Builds C# packages."""
def __init__(self, linux=False): def __init__(self, unity=False):
self.linux = linux self.unity = unity
self.labels = ['package', 'csharp'] self.labels = ['package', 'csharp', 'windows']
if linux: if unity:
self.name = 'csharp_package_dotnetcli_linux' self.name = 'csharp_package_unity_windows'
self.labels += ['linux'] self.labels += ['unity']
else: else:
self.name = 'csharp_package_dotnetcli_windows' self.name = 'csharp_package_nuget_windows'
self.labels += ['windows'] self.labels += ['nuget']
def pre_build_jobspecs(self): def pre_build_jobspecs(self):
return [] return []
def build_jobspec(self): def build_jobspec(self):
if self.linux: if self.unity:
return create_docker_jobspec( # use very high CPU cost to avoid running nuget package build
self.name, 'tools/dockerfile/test/csharp_jessie_x64', # and unity build concurrently
'src/csharp/build_packages_dotnetcli.sh') return create_jobspec(
self.name, ['build_unitypackage.bat'],
cwd='src\\csharp',
cpu_cost=1e6,
shell=True)
else: else:
return create_jobspec( return create_jobspec(
self.name, ['build_packages_dotnetcli.bat'], self.name, ['build_packages_dotnetcli.bat'],
@ -153,7 +159,7 @@ def targets():
"""Gets list of supported targets""" """Gets list of supported targets"""
return [ return [
CSharpPackage(), CSharpPackage(),
CSharpPackage(linux=True), CSharpPackage(unity=True),
RubyPackage(), RubyPackage(),
PythonPackage(), PythonPackage(),
PHPPackage() PHPPackage()

Loading…
Cancel
Save