Skip to content

Commit

Permalink
Merge pull request #285 from regro-cf-autotick-bot/1.54.0_h1d8409
Browse files Browse the repository at this point in the history
grpc-cpp v1.54.0
  • Loading branch information
h-vetinari authored Apr 19, 2023
2 parents 5860517 + 8c5b7d6 commit aa6ac0c
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 41 deletions.
7 changes: 0 additions & 7 deletions .ci_support/migrations/libabseil20230125.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .ci_support/migrations/re220230202.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% set version = "1.52.1" %}
{% set version = "1.54.0" %}

# core package & vendored libs use different version scheme than CPP libs, see
# https://github.com/grpc/grpc/blob/v1.48.1/CMakeLists.txt#L28-L32
# the difference of 22 is empirical and has held since grpc 1.40
{% set core_major = version.split(".")[1] | int - 22 %}
# the difference of 23 is empirical and most recently changed with 1.54
{% set core_major = version.split(".")[1] | int - 23 %}
{% set core_version = core_major | string ~ ".0.0" %}

{% set core_libs = ["gpr", "grpc", "grpc_unsecure"] %}
Expand All @@ -19,7 +19,7 @@ package:

source:
url: https://github.com/grpc/grpc/archive/v{{ version }}.tar.gz
sha256: ec125d7fdb77ecc25b01050a0d5d32616594834d3fe163b016768e2ae42a2df6
sha256: 5e53505a6c84030a26c4fddd71b3f46feec8e0a8eccff2a903b189d349ca6ff5
patches:
- patches/0001-windows-ssl-lib-names.patch # [win]
- patches/0002-fix-win-setup-cmds.patch # [win]
Expand All @@ -29,7 +29,7 @@ source:
- patches/0006-fix-abseil-setup.patch

build:
number: 1
number: 0

outputs:
- name: libgrpc
Expand Down
4 changes: 2 additions & 2 deletions recipe/patches/0001-windows-ssl-lib-names.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 5c1b4e9324448cb808cfc0cce73c7f910f4e0c6a Mon Sep 17 00:00:00 2001
From e0240fc049a39c26a277bee7271e52c5b8a3821f Mon Sep 17 00:00:00 2001
From: Jonathan Helmus <jjhelmus@gmail.com>
Date: Mon, 17 Feb 2020 15:45:06 -0600
Subject: [PATCH 1/6] windows ssl lib names
Expand All @@ -11,7 +11,7 @@ Co-Authored-By: Marius van Niekerk <marius.v.niekerk@gmail.com>
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index 3a50c975d8..7dc5bb6723 100644
index 6501b43d61..2fb22df98c 100644
--- a/setup.py
+++ b/setup.py
@@ -328,10 +328,10 @@ if "win32" in sys.platform:
Expand Down
8 changes: 4 additions & 4 deletions recipe/patches/0002-fix-win-setup-cmds.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 902b7346f5c8376edeba9c347821f0895d9f3f90 Mon Sep 17 00:00:00 2001
From ea69ffecf7e5af9c185ed627b091f36b8de75d41 Mon Sep 17 00:00:00 2001
From: Mike Sarahan <msarahan@gmail.com>
Date: Tue, 18 Feb 2020 13:53:05 -0600
Subject: [PATCH 2/6] fix win setup cmds
Expand All @@ -13,7 +13,7 @@ Co-Authored-By: H. Vetinari <h.vetinari@gmx.com>
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/setup.py b/setup.py
index 7dc5bb6723..f5aa42ffe1 100644
index 2fb22df98c..633240302a 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,6 @@ from distutils.unixccompiler import UnixCCompiler
Expand Down Expand Up @@ -54,7 +54,7 @@ index 7dc5bb6723..f5aa42ffe1 100644
EXTRA_ENV_LINK_ARGS += (
' -static-libgcc -static-libstdc++ -mcrtdll={msvcr}'
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index d93b6c7039..024512624a 100644
index 6d8228ffa0..150bd70b6c 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -226,6 +226,8 @@ class BuildExt(build_ext.build_ext):
Expand All @@ -65,7 +65,7 @@ index d93b6c7039..024512624a 100644
+ return False
try:
# TODO(lidiz) Remove the generated a.out for success tests.
cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++14', '-'],
cc = os.environ.get('CC', 'cc')
--
2.38.1.windows.1

6 changes: 3 additions & 3 deletions recipe/patches/0003-Link-against-grpc.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 09d6862015f1564d04bf9143c1f922f0fb8cb63d Mon Sep 17 00:00:00 2001
From 2f7de924bad393e31bee46774c75378f9855d0f6 Mon Sep 17 00:00:00 2001
From: Marius van Niekerk <marius.v.niekerk@gmail.com>
Date: Mon, 13 Jun 2022 17:13:07 -0400
Subject: [PATCH 3/6] Link against grpc
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 3/6] Link against grpc
1 file changed, 10 insertions(+)

diff --git a/setup.py b/setup.py
index f5aa42ffe1..63847a7781 100644
index 633240302a..776b190967 100644
--- a/setup.py
+++ b/setup.py
@@ -170,6 +170,8 @@ BUILD_WITH_SYSTEM_ABSL = os.environ.get('GRPC_PYTHON_BUILD_SYSTEM_ABSL', False)
Expand All @@ -32,7 +32,7 @@ index f5aa42ffe1..63847a7781 100644

DEFINE_MACROS = (('_WIN32_WINNT', 0x600),)
asm_files = []
@@ -446,6 +453,9 @@ def cython_extensions_and_necessity():
@@ -448,6 +455,9 @@ def cython_extensions_and_necessity():
prefix + 'libgpr.a', prefix + 'libgrpc.a'
]
core_c_files = []
Expand Down
4 changes: 2 additions & 2 deletions recipe/patches/0004-force-protoc-executable.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From fbcdbf86f4b90d078d024392559bac2984d7e4eb Mon Sep 17 00:00:00 2001
From 4f607605de2986861a59ceec2e26a17b9d9f6fcd Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <uwe.korn@quantco.com>
Date: Fri, 11 Sep 2020 14:20:04 +0200
Subject: [PATCH 4/6] force protoc executable
Expand All @@ -8,7 +8,7 @@ Subject: [PATCH 4/6] force protoc executable
1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake
index f23f65d40e..574068017a 100644
index aff1d36526..0d295b5886 100644
--- a/cmake/protobuf.cmake
+++ b/cmake/protobuf.cmake
@@ -75,21 +75,8 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
Expand Down
12 changes: 7 additions & 5 deletions recipe/patches/0005-switch-to-C-17-for-grpcio.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From fcd36cc0e41cb14f263f6840ba300134a3340abf Mon Sep 17 00:00:00 2001
From 8603a101d576aab53aa86fe72c48895a8c9b6e9d Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sat, 3 Sep 2022 19:23:15 +0200
Subject: [PATCH 5/6] switch to C++17 for grpcio

---
setup.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
setup.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 63847a7781..0e535e259a 100644
index 776b190967..9de7a1e48a 100644
--- a/setup.py
+++ b/setup.py
@@ -210,7 +210,7 @@ def check_linker_need_libatomic():
Expand All @@ -29,15 +29,17 @@ index 63847a7781..0e535e259a 100644
stdin=PIPE,
stdout=PIPE,
stderr=PIPE)
@@ -238,7 +238,7 @@ def check_linker_need_libatomic():
@@ -238,8 +238,9 @@ def check_linker_need_libatomic():
EXTRA_ENV_COMPILE_ARGS = os.environ.get('GRPC_PYTHON_CFLAGS', None)
EXTRA_ENV_LINK_ARGS = os.environ.get('GRPC_PYTHON_LDFLAGS', None)
if EXTRA_ENV_COMPILE_ARGS is None:
- EXTRA_ENV_COMPILE_ARGS = ' -std=c++14'
+ EXTRA_ENV_COMPILE_ARGS = ' -std=c++17'
if 'win32' in sys.platform:
+ EXTRA_ENV_COMPILE_ARGS = ' /std:c++17'
if sys.version_info < (3, 5):
EXTRA_ENV_COMPILE_ARGS += ' -D_hypot=hypot'
# We use define flags here and don't directly add to DEFINE_MACROS below to
--
2.38.1.windows.1

17 changes: 11 additions & 6 deletions recipe/patches/0006-fix-abseil-setup.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
From 3fe072b196fec268a6d1e4f1ae3bd59efd0d4bb3 Mon Sep 17 00:00:00 2001
From d20b687c55b6c557e7c078a3aa6cb7203d6e5053 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 4 Sep 2022 14:34:52 +0200
Subject: [PATCH 6/6] fix abseil setup

---
setup.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
setup.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 0e535e259a..fee180d4ef 100644
index 9de7a1e48a..1b3966f92e 100644
--- a/setup.py
+++ b/setup.py
@@ -340,13 +340,16 @@ if BUILD_WITH_SYSTEM_CARES:
@@ -341,13 +341,21 @@ if BUILD_WITH_SYSTEM_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'))
+ if "win32" in sys.platform:
+ absl_libs = ('abseil_dll', 'absl_flags',)
+ absl_libs = (
+ 'abseil_dll', 'absl_flags', 'absl_flags_commandlineflag', 'absl_flags_commandlineflag_internal',
+ 'absl_flags_config', 'absl_flags_internal', 'absl_flags_marshalling', 'absl_flags_parse',
+ 'absl_flags_private_handle_accessor', 'absl_flags_program_name', 'absl_flags_reflection',
+ 'absl_flags_usage', 'absl_flags_usage_internal',
+ )
+ else:
+ absl_glob = pathlib.Path(os.environ['PREFIX']).glob('lib/libabsl_*.so')
+ absl_libs = tuple(lib.stem[3:] for lib in absl_glob)
Expand Down

0 comments on commit aa6ac0c

Please sign in to comment.