diff options
author | Mark D. Roth <roth@google.com> | 2016-08-31 10:46:58 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-08-31 10:46:58 -0700 |
commit | ceb39ae60c0469d9e7933ac94f10c6e63db55536 (patch) | |
tree | 9414f2dce9989de7530d11c9c827afeda7788754 /templates | |
parent | 0c137e2e1f737d84e95805bf406a7f7e8938c065 (diff) | |
parent | 79d7d996002ff1a4d0523af1895c2e007fdba159 (diff) |
Merge remote-tracking branch 'upstream/master' into http_connect
Diffstat (limited to 'templates')
20 files changed, 124 insertions, 70 deletions
diff --git a/templates/BUILD.template b/templates/BUILD.template index 23a656c360..af23fb2799 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -38,6 +38,8 @@ licenses(["notice"]) # 3-clause BSD + exports_files(["LICENSE"]) + package(default_visibility = ["//visibility:public"]) <%! diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index 4e4223493b..2b6c0b1a36 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -66,6 +66,12 @@ set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") project(<%text>${PACKAGE_NAME}</%text> C CXX) + if (NOT MSVC) + set(gRPC_INSTALL ON CACHE BOOL "Generate installation target") + else() + set(gRPC_INSTALL OFF CACHE BOOL "Generate installation target") + endif() + set(gRPC_ZLIB_PROVIDER "module" CACHE STRING "Provider of zlib library") set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package") @@ -77,6 +83,10 @@ set(gRPC_USE_PROTO_LITE OFF CACHE BOOL "Use the protobuf-lite library") + if (MSVC) + add_definitions( -D_WIN32_WINNT=0x600 ) + endif() + if (gRPC_USE_PROTO_LITE) set(_gRPC_PROTOBUF_LIBRARY_NAME "libprotobuf-lite") add_definitions("-DGRPC_USE_PROTO_LITE") @@ -116,6 +126,7 @@ set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/third_party/protobuf) endif() if(EXISTS "<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake/CMakeLists.txt") + set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries") add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}</%text>/cmake third_party/protobuf) if(TARGET <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>) set(_gRPC_PROTOBUF_LIBRARIES <%text>${_gRPC_PROTOBUF_LIBRARY_NAME}</%text>) @@ -255,17 +266,21 @@ </%def> <%def name="cc_install(tgt)"> - install(TARGETS ${tgt.name} EXPORT gRPCTargets - RUNTIME DESTINATION <%text>${CMAKE_INSTALL_BINDIR}</%text> - LIBRARY DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text> - ARCHIVE DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text> - ) + if (gRPC_INSTALL) + install(TARGETS ${tgt.name} EXPORT gRPCTargets + RUNTIME DESTINATION <%text>${CMAKE_INSTALL_BINDIR}</%text> + LIBRARY DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text> + ARCHIVE DESTINATION <%text>${CMAKE_INSTALL_LIBDIR}</%text> + ) + endif() </%def> - install(EXPORT gRPCTargets - DESTINATION <%text>${CMAKE_INSTALL_CMAKEDIR}</%text> - NAMESPACE gRPC:: - ) + if (gRPC_INSTALL) + install(EXPORT gRPCTargets + DESTINATION <%text>${CMAKE_INSTALL_CMAKEDIR}</%text> + NAMESPACE gRPC:: + ) + endif() foreach(_config gRPCConfig gRPCConfigVersion) configure_file(tools/cmake/<%text>${_config}</%text>.cmake.in diff --git a/templates/Makefile.template b/templates/Makefile.template index 9afc6566e2..e6a28d16bc 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -380,7 +380,7 @@ OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib - PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0-alpha-3 protobuf + PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0 protobuf else # HAS_PKG_CONFIG ifeq ($(SYSTEM),MINGW32) @@ -694,13 +694,6 @@ NO_DEPS = true endif - INSTALL_OK = false - ifeq ($(HAS_VALID_PROTOC),true) - ifeq ($(HAS_SYSTEM_PROTOBUF_VERIFY),true) - INSTALL_OK = true - endif - endif - .SECONDARY = %.pb.h %.pb.cc ifeq ($(DEP_MISSING),) @@ -1193,7 +1186,7 @@ $(Q) mkdir -p `dirname $@` $(Q) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< - install: install_c install_cxx install-plugins install-certs verify-install + install: install_c install_cxx install-plugins install-certs install_c: install-headers_c install-static_c install-shared_c @@ -1311,28 +1304,6 @@ $(Q) $(INSTALL) -d $(prefix)/share/grpc $(Q) $(INSTALL) etc/roots.pem $(prefix)/share/grpc/roots.pem - verify-install: - ifeq ($(INSTALL_OK),true) - @echo "Your system looks ready to go." - @echo - else - @echo "Warning: it looks like protoc 3.0.0+ isn't installed on your system," - @echo "which means that you won't be able to compile .proto files for use" - @echo "with gRPC." - @echo - @echo "If you are just using pre-compiled protocol buffers, or you otherwise" - @echo "have no need to compile .proto files, you can ignore this." - @echo - @echo "If you do need protobuf for some reason, you can download and install" - @echo "it from:" - @echo - @echo " https://github.com/google/protobuf/releases" - @echo - @echo "Once you've done so, you can re-run this check by doing:" - @echo - @echo " make verify-install" - endif - clean: $(E) "[CLEAN] Cleaning build directories." $(Q) $(RM) -rf $(OBJDIR) $(LIBDIR) $(BINDIR) $(GENDIR) cache.mk diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 644dc4a632..1d5a47336c 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -62,7 +62,7 @@ %> Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.0.0-pre1' + version = '1.0.0' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'http://www.grpc.io' @@ -71,7 +71,7 @@ s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "objective-c-v#{version}", + :tag => "v#{version}", # TODO(jcanizales): Depend explicitly on the nanopb pod, and disable submodules. :submodules => true, } @@ -149,7 +149,7 @@ ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL', '~> 5.0' + ss.dependency 'BoringSSL', '~> 6.0' # To save you from scrolling, this is the last part of the podspec. ss.source_files = ${ruby_multiline_list(grpc_private_files(libs), 22)} diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index ce775ffb90..f95adaf30f 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -29,7 +29,7 @@ s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0.3' + s.add_dependency 'google-protobuf', '~> 3.0' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' diff --git a/templates/package.json.template b/templates/package.json.template index f68f64d047..e9596d4d4c 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -37,7 +37,7 @@ "devDependencies": { "async": "^1.5.0", "google-auth-library": "^0.9.2", - "google-protobuf": "^3.0.0-alpha.5", + "google-protobuf": "^3.0.0", "istanbul": "^0.3.21", "jsdoc": "^3.3.2", "jshint": "^2.5.0", diff --git a/templates/package.xml.template b/templates/package.xml.template index 87b1038959..32ed3b633e 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -12,7 +12,7 @@ <email>grpc-packages@google.com</email> <active>yes</active> </lead> - <date>2016-07-28</date> + <date>2016-08-22</date> <time>16:06:07</time> <version> <release>${settings.php_version.php()}</release> @@ -24,7 +24,7 @@ </stability> <license>BSD</license> <notes> - - PHP7 Support continued, reduce code duplication #7543 + - Reject metadata keys which are not legal #7881 </notes> <contents> <dir baseinstalldir="/" name="/"> @@ -249,5 +249,50 @@ - PHP7 Support continued, reduce code duplication #7543 </notes> </release> + <release> + <version> + <release>1.0.0RC4</release> + <api>1.0.0RC4</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2016-08-09</date> + <license>BSD</license> + <notes> + - Fixed Ubuntu compile error #7571, #7642 + </notes> + </release> + <release> + <version> + <release>1.0.0</release> + <api>1.0.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2016-08-18</date> + <license>BSD</license> + <notes> + - gRPC 1.0.0 release + </notes> + </release> + <release> + <version> + <release>${settings.php_version.php()}</release> + <api>${settings.php_version.php()}</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2016-08-22</date> + <license>BSD</license> + <notes> + - Reject metadata keys which are not legal #7881 + </notes> + </release> </changelog> </package> diff --git a/templates/src/core/lib/surface/version.c.template b/templates/src/core/lib/surface/version.c.template index 5f0273e49d..12c490e6a9 100644 --- a/templates/src/core/lib/surface/version.c.template +++ b/templates/src/core/lib/surface/version.c.template @@ -32,10 +32,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - + /* This file is autogenerated from: templates/src/core/surface/version.c.template */ - + #include <grpc/grpc.h> - + const char *grpc_version_string(void) { return "${settings.core_version}"; } + + const char *grpc_g_stands_for(void) { return "${settings.g_stands_for}"; } diff --git a/templates/src/csharp/Grpc.Auth/project.json.template b/templates/src/csharp/Grpc.Auth/project.json.template index b3244e4d3c..19d4b42cf0 100644 --- a/templates/src/csharp/Grpc.Auth/project.json.template +++ b/templates/src/csharp/Grpc.Auth/project.json.template @@ -25,13 +25,13 @@ }, "dependencies": { "Grpc.Core": "${settings.csharp_version}", - "Google.Apis.Auth": "1.11.1" + "Google.Apis.Auth": "1.15.0" }, "frameworks": { "net45": { }, "netstandard1.5": { "imports": [ - "net45" + "portable-net45" ], "dependencies": { "Microsoft.NETCore.Portable.Compatibility": "1.0.1", diff --git a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template index 51c5e85c66..67151dbcfa 100644 --- a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template +++ b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template @@ -1,7 +1,7 @@ %YAML 1.2 --- | { - <%include file="../build_options.include" args="executable=True,includeRuntimes=False"/> + <%include file="../build_options.include" args="executable=True"/> "dependencies": { "Grpc.Examples": { "target": "project" diff --git a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template index 51c5e85c66..67151dbcfa 100644 --- a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template +++ b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template @@ -1,7 +1,7 @@ %YAML 1.2 --- | { - <%include file="../build_options.include" args="executable=True,includeRuntimes=False"/> + <%include file="../build_options.include" args="executable=True"/> "dependencies": { "Grpc.Examples": { "target": "project" diff --git a/templates/src/csharp/Grpc.Examples/project.json.template b/templates/src/csharp/Grpc.Examples/project.json.template index d5d63f658e..117f842e01 100644 --- a/templates/src/csharp/Grpc.Examples/project.json.template +++ b/templates/src/csharp/Grpc.Examples/project.json.template @@ -15,11 +15,12 @@ "System.IO": "" } }, - "netstandard1.5": { + "netcoreapp1.0": { "imports": [ "portable-net45" ], "dependencies": { + "Microsoft.NETCore.App": "1.0.0", "NETStandard.Library": "1.6.0" } } diff --git a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template index af1ee42509..93151f2b89 100644 --- a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template +++ b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template @@ -1,7 +1,7 @@ %YAML 1.2 --- | { - <%include file="../build_options.include" args="executable=True,includeData=True,includeRuntimes=False"/> + <%include file="../build_options.include" args="executable=True,includeData=True"/> "dependencies": { "Grpc.IntegrationTesting": { "target": "project" diff --git a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template index af1ee42509..93151f2b89 100644 --- a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template +++ b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template @@ -1,7 +1,7 @@ %YAML 1.2 --- | { - <%include file="../build_options.include" args="executable=True,includeData=True,includeRuntimes=False"/> + <%include file="../build_options.include" args="executable=True,includeData=True"/> "dependencies": { "Grpc.IntegrationTesting": { "target": "project" diff --git a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template index 0a7d5e9af4..1cb5ca4ba3 100644 --- a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template +++ b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template @@ -10,7 +10,7 @@ "target": "project" }, "Google.Protobuf": "3.0.0-beta3", - "CommandLineParser": "1.9.71", + "CommandLineParser.Unofficial": "2.0.275", "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, diff --git a/templates/src/csharp/build_options.include b/templates/src/csharp/build_options.include index a200897e0f..8597ae3367 100644 --- a/templates/src/csharp/build_options.include +++ b/templates/src/csharp/build_options.include @@ -1,4 +1,4 @@ -<%page args="executable=False,includeData=False,includeRuntimes=True"/>\ +<%page args="executable=False,includeData=False"/>\ "buildOptions": { % if executable: "emitEntryPoint": true @@ -52,10 +52,8 @@ } }, %endif - % if includeRuntimes: "runtimes": { "win7-x64": { }, "debian.8-x64": { }, "osx.10.11-x64": { } }, - % endif
\ No newline at end of file diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template index ea2acb661e..5cbd8e3746 100644 --- a/templates/src/csharp/build_packages.bat.template +++ b/templates/src/csharp/build_packages.bat.template @@ -33,10 +33,7 @@ @rem Current package versions set VERSION=${settings.csharp_version} - set PROTOBUF_VERSION=3.0.0-beta3 - - @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. - set VERSION_WITH_BETA=%VERSION%-beta + set PROTOBUF_VERSION=3.0.0 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe @@ -60,7 +57,6 @@ @rem Fetch all dependencies %%NUGET% restore ..\..\vsprojects\grpc_csharp_ext.sln || goto :error - %%NUGET% restore Grpc.sln || goto :error setlocal @@ -75,7 +71,7 @@ %%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :error %%NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :error - %%NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error + %%NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error %%NUGET% pack Grpc.nuspec -Version %VERSION% || goto :error %%NUGET% pack Grpc.Tools.nuspec -Version %VERSION% || goto :error diff --git a/templates/src/node/health_check/package.json.template b/templates/src/node/health_check/package.json.template index 96b9748aa7..c2bb232245 100644 --- a/templates/src/node/health_check/package.json.template +++ b/templates/src/node/health_check/package.json.template @@ -17,9 +17,9 @@ } ], "dependencies": { - "grpc": "^0.15.0", + "grpc": "^${settings.node_version}", "lodash": "^3.9.3", - "google-protobuf": "^3.0.0-alpha.5" + "google-protobuf": "^3.0.0" }, "files": [ "LICENSE", diff --git a/templates/src/php/composer.json.template b/templates/src/php/composer.json.template new file mode 100644 index 0000000000..bf876f345e --- /dev/null +++ b/templates/src/php/composer.json.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + { + "name": "grpc/grpc", + "type": "library", + "description": "gRPC library for PHP", + "keywords": ["rpc"], + "homepage": "http://grpc.io", + "license": "BSD-3-Clause", + "version": "${settings.php_version.php_composer()}", + "require": { + "php": ">=5.5.0", + "stanley-cheung/protobuf-php": "v0.6" + }, + "require-dev": { + "google/auth": "v0.9" + }, + "autoload": { + "psr-4": { + "Grpc\\": "lib/Grpc/" + } + } + } diff --git a/templates/tools/dockerfile/apt_get_pyenv.include b/templates/tools/dockerfile/apt_get_pyenv.include index 70e90289b7..816b27904f 100644 --- a/templates/tools/dockerfile/apt_get_pyenv.include +++ b/templates/tools/dockerfile/apt_get_pyenv.include @@ -15,4 +15,5 @@ RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/py RUN pyenv update RUN pyenv install 3.5-dev RUN pyenv install 3.6-dev -RUN pyenv local 3.5-dev 3.6-dev +RUN pyenv install pypy-5.3.1 +RUN pyenv local 3.5-dev 3.6-dev pypy-5.3.1 |