public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/
Date: Sat, 26 Oct 2024 17:48:29 +0000 (UTC)	[thread overview]
Message-ID: <1729964857.52c81936052e78716261b9d27cc9e121d370ca26.mgorny@gentoo> (raw)

commit:     52c81936052e78716261b9d27cc9e121d370ca26
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 26 16:47:02 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 26 17:47:37 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52c81936

dev-python/grpcio: Force bundled abseil-cpp to fix crashes

Closes: https://bugs.gentoo.org/942021
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...rpcio-1.67.0.ebuild => grpcio-1.67.0-r1.ebuild} | 33 ++++++++++++++++------
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/dev-python/grpcio/grpcio-1.67.0.ebuild b/dev-python/grpcio/grpcio-1.67.0-r1.ebuild
similarity index 72%
rename from dev-python/grpcio/grpcio-1.67.0.ebuild
rename to dev-python/grpcio/grpcio-1.67.0-r1.ebuild
index 2583aa2206fd..92a90bd06766 100644
--- a/dev-python/grpcio/grpcio-1.67.0.ebuild
+++ b/dev-python/grpcio/grpcio-1.67.0-r1.ebuild
@@ -7,7 +7,7 @@ DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{10..13} )
 
-inherit distutils-r1 multiprocessing pypi
+inherit distutils-r1 flag-o-matic multiprocessing pypi
 
 MY_P=grpc-${PV}
 DESCRIPTION="HTTP/2-based RPC framework"
@@ -16,13 +16,14 @@ HOMEPAGE="
 	https://github.com/grpc/grpc/
 	https://pypi.org/project/grpcio/
 "
-# Tests need other packages from the source tree
+# Tests need other packages from the source tree, so use a GitHub
+# archive.  grpcio-tools is required for tests, and requires a bunch
+# of bundled libraries   However, we also need bundled abseil-cpp,
+# so take that one from grpcio-tools to avoid two sdists.
 SRC_URI="
 	https://github.com/grpc/grpc/archive/v${PV}.tar.gz
 		-> ${MY_P}.gh.tar.gz
-	test? (
-		$(pypi_sdist_url grpcio-tools)
-	)
+	$(pypi_sdist_url grpcio-tools)
 "
 S=${WORKDIR}/${MY_P}
 
@@ -31,7 +32,6 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 
 DEPEND="
-	dev-cpp/abseil-cpp:=
 	dev-libs/openssl:=
 	dev-libs/re2:=
 	net-dns/c-ares:=
@@ -52,17 +52,32 @@ BDEPEND="
 EPYTEST_XDIST=1
 distutils_enable_tests pytest
 
+src_unpack() {
+	default
+
+	# reuse the bundled abseil-cpp from grpcio-tools sdist.
+	ln -s "${WORKDIR}/grpcio_tools-${PV}/third_party/abseil-cpp/absl" \
+		"${S}/third_party/abseil-cpp/absl" || die
+}
+
 src_configure() {
 	export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
-	export GRPC_PYTHON_BUILD_SYSTEM_ABSL=1
+	# system abseil-cpp crashes with USE=-debug, sigh
+	# https://bugs.gentoo.org/942021
+	#export GRPC_PYTHON_BUILD_SYSTEM_ABSL=1
 	export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
 	export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
 	export GRPC_PYTHON_BUILD_SYSTEM_RE2=1
 	export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
 	export GRPC_PYTHON_BUILD_WITH_CYTHON=1
 
-	# -std= required by modern abseil-cpp, rest copied from setup.py
-	export GRPC_PYTHON_CFLAGS="-std=c++17 -fvisibility=hidden -fno-wrapv -fno-exceptions"
+	# copied from setup.py, except for removed -std= that does not apply
+	# to C code and causes warnings
+	export GRPC_PYTHON_CFLAGS="-fvisibility=hidden -fno-wrapv -fno-exceptions"
+	# required by abseil-cpp
+	append-cxxflags -std=c++14
+	# silence a lot of harmless noise from bad quality code
+	append-cxxflags -Wno-attributes
 }
 
 python_test() {


             reply	other threads:[~2024-10-26 17:48 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26 17:48 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-08  1:08 [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/ Jakov Smolić
2025-01-24  7:21 Michał Górny
2025-01-18  9:38 Arthur Zamarin
2025-01-06 14:25 Michał Górny
2025-01-03 19:04 Michał Górny
2024-11-10 15:30 Sam James
2024-11-10  9:39 Sam James
2024-11-09 13:24 Arthur Zamarin
2024-10-29  6:51 Michał Górny
2024-10-23 15:02 Michał Górny
2024-03-21  5:58 Sam James
2024-01-14  3:16 Sam James
2023-11-29 11:45 Arthur Zamarin
2023-11-29 10:15 Michał Górny
2023-11-29 10:03 Michał Górny
2023-11-24 15:12 Arthur Zamarin
2023-11-06 14:41 Sam James
2023-07-28  9:32 Sam James
2023-03-16  3:50 Michał Górny
2023-01-05  9:01 Sam James
2023-01-05  8:53 Sam James
2022-11-28 22:21 Georgy Yakovlev
2022-11-28 21:45 Georgy Yakovlev
2022-02-04 10:27 Michał Górny
2022-02-04  9:12 Jakov Smolić
2022-02-04  7:28 Agostino Sarubbo
2021-12-20  5:04 Georgy Yakovlev
2021-12-18 15:39 Michał Górny
2021-12-18 15:09 Arthur Zamarin
2021-11-14  1:59 Georgy Yakovlev
2021-11-13 21:24 Michał Górny
2021-11-13 20:40 Jakov Smolić
2021-11-13  9:47 Jakov Smolić
2021-10-06 12:15 Arthur Zamarin
2021-07-25  1:04 Sam James
2021-07-24 15:12 Sam James
2021-06-29  5:53 Yixun Lan
2021-06-21 23:31 Georgy Yakovlev
2021-06-21 23:31 Georgy Yakovlev
2021-06-15  2:57 Georgy Yakovlev
2021-06-05 20:43 Sam James
2021-06-05 20:35 Sam James
2021-05-30  1:43 Georgy Yakovlev
2021-04-29 23:35 Georgy Yakovlev
2021-04-29  8:29 Georgy Yakovlev
2020-12-17 17:09 Michał Górny
2020-12-10 22:04 Thomas Deutschmann
2020-10-09 21:42 Georgy Yakovlev
2020-09-20 20:21 Agostino Sarubbo
2020-08-31 20:54 Thomas Deutschmann
2020-08-09 23:09 Zac Medico
2020-06-06 18:01 Michał Górny
2020-04-20  7:28 Georgy Yakovlev
2020-02-22  1:30 Georgy Yakovlev
2020-02-05 20:12 Georgy Yakovlev
2020-02-05 14:05 Michał Górny
2020-01-17 10:22 Georgy Yakovlev
2019-12-22  3:28 Georgy Yakovlev
2019-11-16  0:31 Georgy Yakovlev
2019-10-26  0:11 Georgy Yakovlev
2019-08-17  3:00 Georgy Yakovlev
2019-08-17  3:00 Georgy Yakovlev
2019-08-17  3:00 Georgy Yakovlev
2019-08-17  3:00 Georgy Yakovlev
2019-07-14  1:10 Georgy Yakovlev
2019-05-28  4:53 Georgy Yakovlev
2019-05-08  3:01 Georgy Yakovlev
2019-05-07 23:56 Georgy Yakovlev
2019-04-30  4:42 Georgy Yakovlev
2019-02-27  4:20 Georgy Yakovlev
2019-01-16  0:52 Georgy Yakovlev
2019-01-16  0:52 Georgy Yakovlev
2018-12-15  6:00 Georgy Yakovlev
2018-12-10  4:50 Georgy Yakovlev
2018-11-15  3:21 Georgy Yakovlev
2018-10-25  6:40 Georgy Yakovlev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1729964857.52c81936052e78716261b9d27cc9e121d370ca26.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox