commit:     c8fa4b17b7bf52f4ec35c350cf1a043856351308
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 25 03:24:35 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 25 05:56:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8fa4b17

dev-python/grpcio: Bump to 1.74.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/grpcio/Manifest             |   3 +
 dev-python/grpcio/grpcio-1.74.0.ebuild | 120 +++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)

diff --git a/dev-python/grpcio/Manifest b/dev-python/grpcio/Manifest
index 2fb2e2de548b..e84c3ce28259 100644
--- a/dev-python/grpcio/Manifest
+++ b/dev-python/grpcio/Manifest
@@ -1,3 +1,6 @@
 DIST grpc-1.73.1.gh.tar.gz 14876868 BLAKE2B 
6321e16b4ebee97c8482be8756700de6409bcaf3eac5be0765b021672560fd9d063385fd6c3c03855134dd26157b1183efe38e99acdab72b31e149478b52c4de
 SHA512 
66e66828de7c95d3eb83bcba369f9c73be89044a5a755f99132de1694b08b72ebc848b33c73fdeed816174f1fc44e407be094237fcb4c5bc9732019cb3fae1b5
+DIST grpc-1.74.0.gh.tar.gz 15014902 BLAKE2B 
1c024dd44053cc076d8c3d42b9aa642120222ba36fb816a7be31b9e72b12fe1c14e2d8d81db38c1ea89a57589ebc6153d6089b32c0cbc4100d8b70b579bb42fe
 SHA512 
2b8e726743336ad33157705761159ae4f096209781d7c05cf0b2699852604dde28878f60f3028e08f19db7d8f7c003dc342594a387a9da55db67d39180fdc010
 DIST grpcio-1.73.1.tar.gz 12730355 BLAKE2B 
114ec5e67fc07835558d41fbd8b52708f3edebaf353d88c808ea0ea030089db8fd9fa4001d98b370b63684271d98e31c2308165032a4785c9aff0a22afa64b8f
 SHA512 
fda971f029d8131a021d99ebe1b72f3d5f9bbe2b6ce17cd9be23d02bb3edeba8fa650517c487b687d17b881d2e53460e55b89864b21ff511c5094a4f0caaf3b4
+DIST grpcio-1.74.0.tar.gz 12756048 BLAKE2B 
943f9b438985193e13d72cd3e270f8b0bb311e548a226803e62619fb30ce50fa9f14bdcccec8aa6cf57704bdc7ef8706509d987c3ed9806a4e26f5360492124b
 SHA512 
2f8bf61bf28b0b53422041f43fb226a7e4af0cd3c1942b58b84284a5d542e3224c3f54b40dc5346424dd0c260e1416b857732d8ee02fbca28384a15702f07ae0
 DIST grpcio_tools-1.73.1.tar.gz 5429529 BLAKE2B 
c6180d872430833fdc6153a4542865fa252937fc8adea8209bd2aabf942c9e8597199f98478868e494233916e1bec13f727b229325c839ee821c74f112475b84
 SHA512 
f3d943a1f4dea3351bacbe1a64f4ac6c0f79778706a6fc387661bbc390fbfa556c34c03a59ba6b587a55292a05815d581b19e698ad29b3da380ad992550bf0fd
+DIST grpcio_tools-1.74.0.tar.gz 5390007 BLAKE2B 
605c6d3021166fd903eb860b3119e5ca6af4c9aff8c9d1368a31756f316826f7acd24daa544228ea49aa73bdb8ef31938ac7f016ebaae0b426628c9b91eee5eb
 SHA512 
9a54c84dc3a7ecb82c7062b5054b6d137783752758ae28d8bebea430104d903bbe35aaaad139ecd39dc4d06315b28f84291f0434ac9cc81dac2a1e949bf68c1d

diff --git a/dev-python/grpcio/grpcio-1.74.0.ebuild 
b/dev-python/grpcio/grpcio-1.74.0.ebuild
new file mode 100644
index 000000000000..cc7dc16829ab
--- /dev/null
+++ b/dev-python/grpcio/grpcio-1.74.0.ebuild
@@ -0,0 +1,120 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..14} )
+
+inherit distutils-r1 flag-o-matic multiprocessing pypi
+
+MY_P=grpc-${PV}
+DESCRIPTION="HTTP/2-based RPC framework"
+HOMEPAGE="
+       https://grpc.io/
+       https://github.com/grpc/grpc/
+       https://pypi.org/project/grpcio/
+"
+# Tests need other packages from the source tree, so use a GitHub
+# archive.  sdist provides bundled library sources (git submodules).
+SRC_URI+="
+       test? (
+               https://github.com/grpc/grpc/archive/v${PV}.tar.gz
+                       -> ${MY_P}.gh.tar.gz
+               $(pypi_sdist_url grpcio_tools)
+       )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+
+DEPEND="
+       dev-libs/openssl:=
+       net-dns/c-ares:=
+       sys-libs/zlib:=
+"
+RDEPEND="
+       ${DEPEND}
+"
+# TODO: try to remove coverage dep
+BDEPEND="
+       >=dev-python/cython-3.1.1[${PYTHON_USEDEP}]
+       test? (
+               dev-python/coverage[${PYTHON_USEDEP}]
+               >=dev-python/protobuf-6.31.1[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_PLUGINS=()
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_configure() {
+       export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
+       # 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
+       # re2 needs to be built against the same abseil-cpp version
+       #export GRPC_PYTHON_BUILD_SYSTEM_RE2=1
+       export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
+       export GRPC_PYTHON_BUILD_WITH_CYTHON=1
+
+       # 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++17
+       # silence a lot of harmless noise from bad quality code
+       append-cxxflags -Wno-attributes
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # Internet
+               
tests/unit/_dns_resolver_test.py::DNSResolverTest::test_connect_loopback
+               # not a test
+               tests/unit/_compression_test.py::test_compression
+               
tests_aio/unit/channel_argument_test.py::test_if_reuse_port_enabled
+               # expects grpcio-admin
+               
tests/unit/test_all_modules_installed.py::TestAllModulesInstalled::test_import_all_modules
+               # TODO
+               
tests_py3_only/unit/_simple_stubs_test.py::SimpleStubsTest::test_default_ssl
+       )
+       local EPYTEST_IGNORE=(
+               # not a test
+               tests/unit/test_common.py
+               # requires oauth2client
+               tests/unit/beta/_implementations_test.py
+       )
+
+       cp -a "${BUILD_DIR}"/{install,test} || die
+       local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
+
+       # grpcio proper builds against system libs
+       # grpcio_tools supports bundled libs only, and requires different
+       # flags
+       unset GRPC_PYTHON_CFLAGS
+       cd "${WORKDIR}/grpcio_tools-${PV}" || die
+       distutils_pep517_install "${BUILD_DIR}"/test
+
+       cd "${WORKDIR}/${MY_P}" || die
+       local protodir=src/proto/grpc/testing
+       local testdir=src/python/grpcio_tests
+       "${EPYTHON}" -m grpc_tools.protoc -I. --python_out="${testdir}" \
+               "${protodir}"/{empty,messages}.proto || die
+       "${EPYTHON}" -m grpc_tools.protoc -I. --grpc_python_out="${testdir}" \
+               "${protodir}"/test.proto || die
+
+       cd "${testdir}" || die
+       "${EPYTHON}" -m grpc_tools.protoc -I. --python_out=. \
+               tests/testing/proto/{requests,services}.proto || die
+       "${EPYTHON}" -m grpc_tools.protoc -I. --grpc_python_out=. \
+               tests/testing/proto/services.proto || die
+
+       # TODO: aio tests are failing randomly, so we're skipping them entirely
+       epytest tests{_py3_only,}/unit
+}

Reply via email to