[arch-commits] Commit in grpc/repos/community-x86_64 (6 files)
Massimiliano Torromeo
mtorromeo at gemini.archlinux.org
Mon Nov 29 11:37:25 UTC 2021
Date: Monday, November 29, 2021 @ 11:37:25
Author: mtorromeo
Revision: 1056685
archrelease: copy trunk to community-x86_64
Added:
grpc/repos/community-x86_64/PKGBUILD
(from rev 1056684, grpc/trunk/PKGBUILD)
grpc/repos/community-x86_64/python-grpcio-use-system-abseil.patch
(from rev 1056684, grpc/trunk/python-grpcio-use-system-abseil.patch)
Deleted:
grpc/repos/community-x86_64/PKGBUILD
grpc/repos/community-x86_64/benchmark-1.6.patch
grpc/repos/community-x86_64/grpc-assert.patch
grpc/repos/community-x86_64/python-grpcio-use-system-abseil.patch
---------------------------------------+
PKGBUILD | 358 +++++++++++++++-----------------
benchmark-1.6.patch | 40 ---
grpc-assert.patch | 12 -
python-grpcio-use-system-abseil.patch | 92 ++++----
4 files changed, 222 insertions(+), 280 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2021-11-29 11:37:17 UTC (rev 1056684)
+++ PKGBUILD 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -1,182 +0,0 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-# Contributor: Aleksey Filippov <sarum9in at gmail.com>
-# Contributor: Victor Aurélio Santos <victoraur.santos at gmail.com>
-
-pkgbase='grpc'
-pkgname=('grpc' 'python-grpcio' 'php-grpc' 'php7-grpc' 'grpc-cli')
-pkgver=1.41.1
-_gtestver=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
-pkgrel=1
-pkgdesc="High performance, open source, general RPC framework that puts mobile and HTTP/2 first."
-arch=('x86_64')
-url='https://grpc.io'
-license=('BSD')
-makedepends=('re2' 're2c' 'protobuf' 'php' 'php7' 'c-ares' 'openssl' 'chrpath' 'cython'
- 'cmake' 'benchmark' 'python-setuptools' 'abseil-cpp' 'ninja')
-source=("https://github.com/grpc/grpc/archive/v$pkgver/$pkgbase-$pkgver.tar.gz"
- "https://github.com/google/googletest/archive/$_gtestver/googletest-$_gtestver.tar.gz"
- "grpc-assert.patch"
- "python-grpcio-use-system-abseil.patch"
- "benchmark-1.6.patch")
-sha256sums=('12a4a6f8c06b96e38f8576ded76d0b79bce13efd7560ed22134c2f433bc496ad'
- '443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468'
- 'ec0fc6af1b191da8660d1fd807da0f38f1dca1e6ee3bc7abbe69d5bc2049116f'
- '3cfb289266f9d2697b917e4400f18a6592f95a99e658e401c1332870b219358b'
- '9ced7c26961872daa9e3053d2dfce3cdf50593354384ad0664910852566f3be2')
-
-prepare() {
- cd "$srcdir/$pkgbase-$pkgver"
- patch -Np1 -i ../grpc-assert.patch
- patch -Np1 -i ../python-grpcio-use-system-abseil.patch
- patch -Np1 -i ../benchmark-1.6.patch
-
- ln -sf "$srcdir/googletest-$_gtestver/"{googlemock,googletest} \
- third_party/googletest
-
- cp -a src/php{,7}
-
- cmake -Bbuild \
- -DCMAKE_BUILD_TYPE=None \
- -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
- -DgRPC_INSTALL=ON \
- -DBUILD_SHARED_LIBS=ON \
- -DCMAKE_CXX_STANDARD=17 \
- -DCMAKE_SKIP_INSTALL_RPATH=ON \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DgRPC_BUILD_TESTS=ON \
- -DgRPC_BUILD_CODEGEN=ON \
- -DgRPC_BUILD_CSHARP_EXT=ON \
- -DgRPC_BACKWARDS_COMPATIBILITY_MODE=OFF \
- -DgRPC_ZLIB_PROVIDER='package' \
- -DgRPC_CARES_PROVIDER='package' \
- -DgRPC_RE2_PROVIDER='package' \
- -DgRPC_SSL_PROVIDER='package' \
- -DgRPC_PROTOBUF_PROVIDER='package' \
- -DgRPC_PROTOBUF_PACKAGE_TYPE='MODULE' \
- -DgRPC_BENCHMARK_PROVIDER:STRING='package' \
- -DgRPC_ABSL_PROVIDER:STRING='package' \
- -DgRPC_USE_PROTO_LITE=OFF \
- -DgRPC_BUILD_GRPC_CPP_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_NODE_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_PHP_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON \
- -DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON \
- -GNinja
-}
-
-build() {
- cd "$srcdir/$pkgbase-$pkgver/build"
-
- cmake --build .
- export LDFLAGS="$LDFLAGS -L$PWD"
-
- # PHP
- cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
- phpize
- ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
- make
-
- # PHP7
- cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
- phpize7
- ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
- make
-
- # Python
- cd "$srcdir/$pkgbase-$pkgver"
- GRPC_PYTHON_CFLAGS="-fvisibility=hidden -fno-wrapv -fno-exceptions $(pkg-config --cflags protobuf) -std=c++17" \
- GRPC_PYTHON_LDFLAGS="$(pkg-config --libs protobuf)" \
- GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
- GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
- GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 \
- GRPC_PYTHON_BUILD_SYSTEM_CARES=1 \
- GRPC_PYTHON_BUILD_SYSTEM_RE2=1 \
- GRPC_PYTHON_BUILD_SYSTEM_ABSL=1 \
- GRPC_BUILD_WITH_BORING_SSL_ASM=0 \
- python setup.py build
-}
-
-check() {
- cd "$srcdir/$pkgbase-$pkgver"
- local _pyver=$(python -c "import sys; print('{0}.{1}'.format(*sys.version_info[:2]))")
- PYTHONPATH="python_build/lib.linux-$CARCH-$_pyver" python -c 'import grpc'
-}
-
-package_grpc() {
- depends=('c-ares' 'protobuf' 'openssl' 're2' 'abseil-cpp')
- provides=(
- 'libupb.so'
- 'libgrpcpp_channelz.so'
- 'libgrpc_unsecure.so'
- 'libgrpc_plugin_support.so'
- 'libgrpc.so'
- 'libgrpc++_unsecure.so'
- 'libgrpc++_reflection.so'
- 'libgrpc++_error_details.so'
- 'libgrpc++_alts.so'
- 'libgrpc++.so'
- 'libgpr.so'
- 'libaddress_sorting.so'
- )
-
- cd "$srcdir/$pkgbase-$pkgver/build"
- DESTDIR="$pkgdir" cmake --install .
- install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-package_python-grpcio() {
- pkgdesc='Python language bindings for grpc, remote procedure call (RPC) framework'
- depends=('c-ares' 'python' 're2' 'abseil-cpp')
-
- cd "$srcdir/$pkgbase-$pkgver"
- python setup.py install -O1 --skip-build --root="$pkgdir"
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
-package_php-grpc() {
- pkgdesc='gRPC module for PHP'
- depends=('grpc' 'php')
- backup=('etc/php/conf.d/grpc.ini')
-
- # Install PHP extension.
- cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
- make install "INSTALL_ROOT=$pkgdir"
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-
- # Remove RPATH
- chrpath -d "$pkgdir/usr/lib/php/modules/grpc.so"
-
- echo ';extension=grpc.so' >grpc.ini
- install -Dm644 grpc.ini "$pkgdir/etc/php/conf.d/grpc.ini"
-}
-
-package_php7-grpc() {
- pkgdesc='gRPC module for PHP'
- depends=('grpc' 'php7')
- backup=('etc/php7/conf.d/grpc.ini')
-
- # Install PHP extension.
- cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
- make install "INSTALL_ROOT=$pkgdir"
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-
- # Remove RPATH
- chrpath -d "$pkgdir/usr/lib/php7/modules/grpc.so"
-
- echo ';extension=grpc.so' >grpc.ini
- install -Dm644 grpc.ini "$pkgdir/etc/php7/conf.d/grpc.ini"
-}
-
-package_grpc-cli() {
- pkgdesc='gRPC protocol buffers cli'
- depends=('grpc')
-
- cd "$srcdir/$pkgbase-$pkgver"
- install -dm0755 "$pkgdir/usr/lib"
- cp -a build/libgrpc++_test_config.so* "$pkgdir/usr/lib/"
-
- install -Dm0755 build/grpc_cli "$pkgdir/usr/bin/grpc_cli"
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Copied: grpc/repos/community-x86_64/PKGBUILD (from rev 1056684, grpc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -0,0 +1,176 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contributor: Aleksey Filippov <sarum9in at gmail.com>
+# Contributor: Victor Aurélio Santos <victoraur.santos at gmail.com>
+
+pkgbase='grpc'
+pkgname=('grpc' 'python-grpcio' 'php-grpc' 'php7-grpc' 'grpc-cli')
+pkgver=1.42.0
+_gtestver=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
+pkgrel=1
+pkgdesc="High performance, open source, general RPC framework that puts mobile and HTTP/2 first."
+arch=('x86_64')
+url='https://grpc.io'
+license=('BSD')
+makedepends=('re2' 're2c' 'protobuf' 'php' 'php7' 'c-ares' 'openssl' 'chrpath' 'cython'
+ 'cmake' 'benchmark' 'python-setuptools' 'abseil-cpp' 'ninja')
+source=("https://github.com/grpc/grpc/archive/v$pkgver/$pkgbase-$pkgver.tar.gz"
+ "https://github.com/google/googletest/archive/$_gtestver/googletest-$_gtestver.tar.gz"
+ "python-grpcio-use-system-abseil.patch")
+sha256sums=('b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c'
+ '443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468'
+ '3cfb289266f9d2697b917e4400f18a6592f95a99e658e401c1332870b219358b')
+
+prepare() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ patch -Np1 -i ../python-grpcio-use-system-abseil.patch
+
+ ln -sf "$srcdir/googletest-$_gtestver/"{googlemock,googletest} \
+ third_party/googletest
+
+ cp -a src/php{,7}
+
+ cmake -Bbuild \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \
+ -DgRPC_INSTALL=ON \
+ -DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_CXX_STANDARD=17 \
+ -DCMAKE_SKIP_INSTALL_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DgRPC_BUILD_TESTS=ON \
+ -DgRPC_BUILD_CODEGEN=ON \
+ -DgRPC_BUILD_CSHARP_EXT=ON \
+ -DgRPC_BACKWARDS_COMPATIBILITY_MODE=OFF \
+ -DgRPC_ZLIB_PROVIDER='package' \
+ -DgRPC_CARES_PROVIDER='package' \
+ -DgRPC_RE2_PROVIDER='package' \
+ -DgRPC_SSL_PROVIDER='package' \
+ -DgRPC_PROTOBUF_PROVIDER='package' \
+ -DgRPC_PROTOBUF_PACKAGE_TYPE='MODULE' \
+ -DgRPC_BENCHMARK_PROVIDER:STRING='package' \
+ -DgRPC_ABSL_PROVIDER:STRING='package' \
+ -DgRPC_USE_PROTO_LITE=OFF \
+ -DgRPC_BUILD_GRPC_CPP_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_NODE_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_PHP_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=ON \
+ -DgRPC_BUILD_GRPC_RUBY_PLUGIN=ON \
+ -GNinja
+}
+
+build() {
+ cd "$srcdir/$pkgbase-$pkgver/build"
+
+ cmake --build .
+ export LDFLAGS="$LDFLAGS -L$PWD"
+
+ # PHP
+ cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
+ phpize
+ ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
+ make
+
+ # PHP7
+ cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
+ phpize7
+ ./configure --enable-grpc="$srcdir/$pkgbase-$pkgver"
+ make
+
+ # Python
+ cd "$srcdir/$pkgbase-$pkgver"
+ GRPC_PYTHON_CFLAGS="-fvisibility=hidden -fno-wrapv -fno-exceptions $(pkg-config --cflags protobuf) -std=c++17" \
+ GRPC_PYTHON_LDFLAGS="$(pkg-config --libs protobuf)" \
+ GRPC_PYTHON_BUILD_WITH_CYTHON=1 \
+ GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 \
+ GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 \
+ GRPC_PYTHON_BUILD_SYSTEM_CARES=1 \
+ GRPC_PYTHON_BUILD_SYSTEM_RE2=1 \
+ GRPC_PYTHON_BUILD_SYSTEM_ABSL=1 \
+ GRPC_BUILD_WITH_BORING_SSL_ASM=0 \
+ python setup.py build
+}
+
+check() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ local _pyver=$(python -c "import sys; print('{0}.{1}'.format(*sys.version_info[:2]))")
+ PYTHONPATH="python_build/lib.linux-$CARCH-$_pyver" python -c 'import grpc'
+}
+
+package_grpc() {
+ depends=('c-ares' 'protobuf' 'openssl' 're2' 'abseil-cpp')
+ provides=(
+ 'libupb.so'
+ 'libgrpcpp_channelz.so'
+ 'libgrpc_unsecure.so'
+ 'libgrpc_plugin_support.so'
+ 'libgrpc.so'
+ 'libgrpc++_unsecure.so'
+ 'libgrpc++_reflection.so'
+ 'libgrpc++_error_details.so'
+ 'libgrpc++_alts.so'
+ 'libgrpc++.so'
+ 'libgpr.so'
+ 'libaddress_sorting.so'
+ )
+
+ cd "$srcdir/$pkgbase-$pkgver/build"
+ DESTDIR="$pkgdir" cmake --install .
+ install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python-grpcio() {
+ pkgdesc='Python language bindings for grpc, remote procedure call (RPC) framework'
+ depends=('c-ares' 'python' 're2' 'abseil-cpp')
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ python setup.py install -O1 --skip-build --root="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_php-grpc() {
+ pkgdesc='gRPC module for PHP'
+ depends=('grpc' 'php')
+ backup=('etc/php/conf.d/grpc.ini')
+
+ # Install PHP extension.
+ cd "$srcdir/$pkgbase-$pkgver/src/php/ext/$pkgbase"
+ make install "INSTALL_ROOT=$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ # Remove RPATH
+ chrpath -d "$pkgdir/usr/lib/php/modules/grpc.so"
+
+ echo ';extension=grpc.so' >grpc.ini
+ install -Dm644 grpc.ini "$pkgdir/etc/php/conf.d/grpc.ini"
+}
+
+package_php7-grpc() {
+ pkgdesc='gRPC module for PHP'
+ depends=('grpc' 'php7')
+ backup=('etc/php7/conf.d/grpc.ini')
+
+ # Install PHP extension.
+ cd "$srcdir/$pkgbase-$pkgver/src/php7/ext/$pkgbase"
+ make install "INSTALL_ROOT=$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ # Remove RPATH
+ chrpath -d "$pkgdir/usr/lib/php7/modules/grpc.so"
+
+ echo ';extension=grpc.so' >grpc.ini
+ install -Dm644 grpc.ini "$pkgdir/etc/php7/conf.d/grpc.ini"
+}
+
+package_grpc-cli() {
+ pkgdesc='gRPC protocol buffers cli'
+ depends=('grpc')
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ install -dm0755 "$pkgdir/usr/lib"
+ cp -a build/libgrpc++_test_config.so* "$pkgdir/usr/lib/"
+
+ install -Dm0755 build/grpc_cli "$pkgdir/usr/bin/grpc_cli"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Deleted: benchmark-1.6.patch
===================================================================
--- benchmark-1.6.patch 2021-11-29 11:37:17 UTC (rev 1056684)
+++ benchmark-1.6.patch 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -1,40 +0,0 @@
-diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
-index 66bc5d8..d33991d 100644
---- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
-+++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc
-@@ -162,7 +162,7 @@ static void teardown() {
- */
- static void BM_Cq_Throughput(benchmark::State& state) {
- gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC);
-- auto thd_idx = state.thread_index;
-+ auto thd_idx = state.thread_index();
-
- gpr_mu_lock(&g_mu);
- g_threads_active++;
-diff --git a/test/cpp/microbenchmarks/bm_threadpool.cc b/test/cpp/microbenchmarks/bm_threadpool.cc
-index dd57bce..82cd08e 100644
---- a/test/cpp/microbenchmarks/bm_threadpool.cc
-+++ b/test/cpp/microbenchmarks/bm_threadpool.cc
-@@ -153,11 +153,11 @@ class SuicideFunctorForAdd : public grpc_completion_queue_functor {
- static void BM_ThreadPoolExternalAdd(benchmark::State& state) {
- static grpc_core::ThreadPool* external_add_pool = nullptr;
- // Setup for each run of test.
-- if (state.thread_index == 0) {
-+ if (state.thread_index() == 0) {
- const int num_threads = state.range(1);
- external_add_pool = new grpc_core::ThreadPool(num_threads);
- }
-- const int num_iterations = state.range(0) / state.threads;
-+ const int num_iterations = state.range(0) / state.threads();
- while (state.KeepRunningBatch(num_iterations)) {
- BlockingCounter counter(num_iterations);
- for (int i = 0; i < num_iterations; ++i) {
-@@ -167,7 +167,7 @@ static void BM_ThreadPoolExternalAdd(benchmark::State& state) {
- }
-
- // Teardown at the end of each test run.
-- if (state.thread_index == 0) {
-+ if (state.thread_index() == 0) {
- state.SetItemsProcessed(state.range(0));
- delete external_add_pool;
- }
Deleted: grpc-assert.patch
===================================================================
--- grpc-assert.patch 2021-11-29 11:37:17 UTC (rev 1056684)
+++ grpc-assert.patch 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -1,12 +0,0 @@
-diff --git a/src/core/lib/promise/detail/basic_seq.h b/src/core/lib/promise/detail/basic_seq.h
-index 72b91f9..a7be768 100644
---- a/src/core/lib/promise/detail/basic_seq.h
-+++ b/src/core/lib/promise/detail/basic_seq.h
-@@ -16,6 +16,7 @@
- #define GRPC_CORE_LIB_PROMISE_DETAIL_BASIC_SEQ_H
-
- #include <grpc/impl/codegen/port_platform.h>
-+#include <assert.h>
-
- #include "absl/types/variant.h"
- #include "absl/utility/utility.h"
Deleted: python-grpcio-use-system-abseil.patch
===================================================================
--- python-grpcio-use-system-abseil.patch 2021-11-29 11:37:17 UTC (rev 1056684)
+++ python-grpcio-use-system-abseil.patch 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -1,46 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 4d34c43..5826663 100644
---- a/setup.py
-+++ b/setup.py
-@@ -29,6 +29,7 @@ from distutils import extension as _extension
- from distutils import util
- import os
- import os.path
-+import pathlib
- import platform
- import re
- import shlex
-@@ -155,6 +156,11 @@ BUILD_WITH_SYSTEM_CARES = _env_bool_value('GRPC_PYTHON_BUILD_SYSTEM_CARES',
- # 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).
-@@ -297,6 +303,10 @@ if BUILD_WITH_SYSTEM_RE2:
- 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 +
-@@ -326,6 +336,10 @@ if BUILD_WITH_SYSTEM_CARES:
- 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 = []
Copied: grpc/repos/community-x86_64/python-grpcio-use-system-abseil.patch (from rev 1056684, grpc/trunk/python-grpcio-use-system-abseil.patch)
===================================================================
--- python-grpcio-use-system-abseil.patch (rev 0)
+++ python-grpcio-use-system-abseil.patch 2021-11-29 11:37:25 UTC (rev 1056685)
@@ -0,0 +1,46 @@
+diff --git a/setup.py b/setup.py
+index 4d34c43..5826663 100644
+--- a/setup.py
++++ b/setup.py
+@@ -29,6 +29,7 @@ from distutils import extension as _extension
+ from distutils import util
+ import os
+ import os.path
++import pathlib
+ import platform
+ import re
+ import shlex
+@@ -155,6 +156,11 @@ BUILD_WITH_SYSTEM_CARES = _env_bool_value('GRPC_PYTHON_BUILD_SYSTEM_CARES',
+ # 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).
+@@ -297,6 +303,10 @@ if BUILD_WITH_SYSTEM_RE2:
+ 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 +
+@@ -326,6 +336,10 @@ if BUILD_WITH_SYSTEM_CARES:
+ 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 = []
More information about the arch-commits
mailing list