!59 upgrade grpc to 1.50.1
From: @sherlock2010 Reviewed-by: @seuzw Signed-off-by: @seuzw
This commit is contained in:
commit
85cb7b1e7b
@ -1,46 +0,0 @@
|
||||
diff -Naur grpc-1.40.0-original/setup.py grpc-1.40.0/setup.py
|
||||
--- grpc-1.40.0-original/setup.py 2021-09-03 19:20:52.000000000 -0400
|
||||
+++ grpc-1.40.0/setup.py 2021-09-07 14:57:55.247990450 -0400
|
||||
@@ -29,6 +29,7 @@
|
||||
from distutils import util
|
||||
import os
|
||||
import os.path
|
||||
+import pathlib
|
||||
import platform
|
||||
import re
|
||||
import shlex
|
||||
@@ -154,6 +155,11 @@
|
||||
# runtime, the shared library must be installed
|
||||
BUILD_WITH_SYSTEM_RE2 = _env_bool_value('GRPC_PYTHON_BUILD_SYSTEM_RE2', 'False')
|
||||
|
||||
+# Export this variable to use the system installation of abseil. You need to
|
||||
+# have the header files installed (in /usr/include/absl) and during
|
||||
+# runtime, the shared library must be installed
|
||||
+BUILD_WITH_SYSTEM_ABSL = os.environ.get('GRPC_PYTHON_BUILD_SYSTEM_ABSL', False)
|
||||
+
|
||||
# Export this variable to force building the python extension with a statically linked libstdc++.
|
||||
# At least on linux, this is normally not needed as we can build manylinux-compatible wheels on linux just fine
|
||||
# without statically linking libstdc++ (which leads to a slight increase in the wheel size).
|
||||
@@ -296,6 +302,10 @@
|
||||
CORE_C_FILES = filter(lambda x: 'third_party/re2' not in x, CORE_C_FILES)
|
||||
RE2_INCLUDE = (os.path.join('/usr', 'include', 're2'),)
|
||||
|
||||
+if BUILD_WITH_SYSTEM_ABSL:
|
||||
+ CORE_C_FILES = filter(lambda x: 'third_party/abseil-cpp' not in x, CORE_C_FILES)
|
||||
+ ABSL_INCLUDE = (os.path.join('/usr', 'include'),)
|
||||
+
|
||||
EXTENSION_INCLUDE_DIRECTORIES = ((PYTHON_STEM,) + CORE_INCLUDE + ABSL_INCLUDE +
|
||||
ADDRESS_SORTING_INCLUDE + CARES_INCLUDE +
|
||||
RE2_INCLUDE + SSL_INCLUDE + UPB_INCLUDE +
|
||||
@@ -325,6 +335,10 @@
|
||||
EXTENSION_LIBRARIES += ('cares',)
|
||||
if BUILD_WITH_SYSTEM_RE2:
|
||||
EXTENSION_LIBRARIES += ('re2',)
|
||||
+if BUILD_WITH_SYSTEM_ABSL:
|
||||
+ EXTENSION_LIBRARIES += tuple(
|
||||
+ lib.stem[3:] for lib in pathlib.Path('/usr').glob('lib*/libabsl_*.so')
|
||||
+ )
|
||||
|
||||
DEFINE_MACROS = (('_WIN32_WINNT', 0x600),)
|
||||
asm_files = []
|
||||
|
||||
Binary file not shown.
17
grpc.spec
17
grpc.spec
@ -1,9 +1,9 @@
|
||||
%global c_so_version 19
|
||||
%global cpp_so_version 1.41
|
||||
%global c_so_version 28
|
||||
%global cpp_so_version 1.50
|
||||
|
||||
Name: grpc
|
||||
Version: 1.41.1
|
||||
Release: 4
|
||||
Version: 1.50.1
|
||||
Release: 1
|
||||
Summary: A modern, open source high performance RPC framework that can run in any environment
|
||||
License: ASL 2.0
|
||||
URL: https://www.grpc.io
|
||||
@ -11,7 +11,6 @@ Source0: https://github.com/grpc/grpc/archive/v%{version}/%{name}-%{versio
|
||||
|
||||
Patch0006: repair-pkgconfig-path.patch
|
||||
Patch0007: add-secure-compile-option-in-Makefile.patch
|
||||
Patch0010: backport-grpc-1.41.1-python-grpcio-use-system-abseil.patch
|
||||
|
||||
BuildRequires: gcc-c++ pkgconfig protobuf-devel protobuf-compiler
|
||||
BuildRequires: openssl-devel c-ares-devel gtest-devel zlib-devel gperftools-devel
|
||||
@ -58,6 +57,8 @@ Python3 bindings for gRPC.
|
||||
sed -i 's:^prefix ?= .*:prefix ?= %{_prefix}:' Makefile
|
||||
sed -i 's:$(prefix)/lib:$(prefix)/%{_lib}:' Makefile
|
||||
sed -i 's:^GTEST_LIB =.*::' Makefile
|
||||
#avoid downloading
|
||||
mkdir %{_builddir}/%{name}-%{version}/third_party/opencensus-proto/src
|
||||
|
||||
%build
|
||||
mkdir -p cmake/build
|
||||
@ -138,6 +139,12 @@ cd ../..
|
||||
%{python3_sitearch}/grpcio-%{version}-py*
|
||||
|
||||
%changelog
|
||||
* Fri Nov 11 2022 zhouyihang <zhouyihang3@h-partners.com> - 1.50.1-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:upgrade grpc to 1.50.1
|
||||
|
||||
* Thu Oct 20 2022 zhouyihang <zhouyihang3@h-partners.com> - 1.41.1-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
@ -16,9 +16,9 @@ diff -urN grpc/CMakeLists.txt grpc_new/CMakeLists.txt
|
||||
--- grpc/CMakeLists.txt 2020-08-24 09:14:14.361862041 +0800
|
||||
+++ grpc_new/CMakeLists.txt 2020-08-27 14:50:00.371507303 +0800
|
||||
@@ -42,6 +42,7 @@
|
||||
set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers")
|
||||
set(gRPC_INSTALL_CMAKEDIR "lib/cmake/${PACKAGE_NAME}" CACHE STRING "Installation directory for cmake config files")
|
||||
set(gRPC_INSTALL_SHAREDIR "share/grpc" CACHE STRING "Installation directory for root certificates")
|
||||
set(gRPC_BUILD_MSVC_MP_COUNT 0 CACHE STRING "The maximum number of processes for MSVC /MP option")
|
||||
+set(gRPC_INSTALL_PKGCONFIGDIR "lib/pkgconfig" CACHE STRING "Installation directory for pkgconfig")
|
||||
|
||||
# Options
|
||||
@ -27,7 +27,7 @@ diff -urN grpc/CMakeLists.txt grpc_new/CMakeLists.txt
|
||||
"${output_filepath}"
|
||||
@ONLY)
|
||||
install(FILES "${output_filepath}"
|
||||
- DESTINATION "lib/pkgconfig/")
|
||||
- DESTINATION "${gRPC_INSTALL_LIBDIR}/pkgconfig")
|
||||
+ DESTINATION ${gRPC_INSTALL_PKGCONFIGDIR})
|
||||
endfunction()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user