Merge pull request #2361 from blshkv/master

grpcio-tools
This commit is contained in:
github-actions[bot] 2025-06-02 02:43:35 +00:00 committed by GitHub
commit deea6b05b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 16 additions and 200 deletions

View file

@ -1 +1 @@
DIST grpcio_testing-1.71.0.tar.gz 22483 BLAKE2B 0c935103785d229502646be2ecc936e64d0046a5a0b1b3dfee5a65aee74342b0177a2b614cb0f7f2e3ecf646ef0360a205c5ea5164a5af7f24ea1392ff802bb5 SHA512 71f6b1a33ca5e7b374c7a3d637518d82e743c7da09e689877dc1c94ab346b4d0e602d626544aa7f25a415474b3330ceda162a56465586b91d016c96aa01483e5
DIST grpcio_testing-1.72.0.tar.gz 22525 BLAKE2B fd3201169a1bce475702ef08845f109ed62562fa57a1919961bf773ae8f882e9ba88ffdb01240bd84c2c7be17f989a401a39a425d6832fc3cd8156f40b63cc93 SHA512 48c7fdc743a9a5c0da5aae6be01f0fbe7ff4aa3bee897a1ee026119f9cfbcb5fdc677c673f5c5f4cea15b27e3d18820125a95f390b46dbc98497ecfab9371ffb

View file

@ -1,11 +1,10 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..13} )
DISTUTILS_USE_PEP517=setuptools
PYPI_PN="grpcio_testing"
inherit distutils-r1 pypi
@ -19,7 +18,7 @@ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
RDEPEND="
~dev-python/grpcio-${PV}[${PYTHON_USEDEP}]
<dev-python/protobuf-5[${PYTHON_USEDEP}]
>=dev-python/protobuf-4.21.3[${PYTHON_USEDEP}]
>=dev-python/protobuf-6.30.0[${PYTHON_USEDEP}]
<dev-python/protobuf-7[${PYTHON_USEDEP}]
"
BDEPEND="${RDEPEND}"

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>unknown@pentoo.ch</email>
<name>Author Unknown</name>
</maintainer>
<upstream>
<remote-id type="pypi">grpcio_testing</remote-id>
</upstream>
</pkgmetadata>

View file

@ -1,2 +1 @@
DIST grpcio_tools-1.68.1.tar.gz 5275384 BLAKE2B 29f504ccb3335c8f183c78c286b36c8e220dd30bd3ffb07770d330b232e40f87977bfe10e0099b05ca2a1d86c5743b056a5a4ae54f5343d9de0a9036a9b5cde4 SHA512 a967137875a50a28293d90a2b4ba6ceb35ce7532b73ea727cca0a40e734227a70e2b1f4ce201477b8418c4b29766e21d40fe33c92522d7d94c92c3a55cf265c4
DIST grpcio_tools-1.72.0.tar.gz 5396558 BLAKE2B db25a36efd70270b0b91c0e3b73f7595cf32b613dacf6c9d053659610e5a10773666a18776bf01d4904222ebe2b855def3accfc4c778ecd1f37f0d1f7913a3ba SHA512 b2317fdaba0d1c7cffc652443a42fd4d452fa9d188d9908eb73826448bafbce76ac898497da2fb3dbf709fed6666916f026c05af3e4a6dd5db71a13f895d345a

View file

@ -1,58 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
PYTHON_COMPAT=( python3_{11..13} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 multiprocessing prefix pypi
DESCRIPTION="Protobuf code generator for gRPC"
HOMEPAGE="https://grpc.io"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 ~arm ~arm64 ~x86"
RDEPEND="
~dev-python/grpcio-${PV}[${PYTHON_USEDEP}]
>=dev-python/protobuf-5.26.1[${PYTHON_USEDEP}]
<dev-python/protobuf-6[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
BDEPEND="
virtual/pkgconfig
dev-python/cython[${PYTHON_USEDEP}]
"
python_prepare_all() {
distutils-r1_python_prepare_all
hprefixify setup.py
#absl/base/config.h ABSL_LTS_RELEASE_VERSION
# system: 20240722
#google/protobuf/wrappers.pb.h
# Protobuf C++ Version: 5.28.0
# PROTOBUF_VERSION
# protobuf/compiler/versions.h
# #define PROTOBUF_CPP_VERSION_STRING
# use system protobuf
# sed -r -i \
# -e '/^CC_FILES=\[/,/\]/{/^CC_FILES=\[/n;/\]/!d;}' \
# -e '/^CC_INCLUDES=\[/,/\]/{/^CC_INCLUDES=\[/n;/\]/!d;}' \
# -e "s@^(PROTO_INCLUDE=')[^']+'@\1/usr/include'@" \
# -e '/^PROTOBUF_SUBMODULE_VERSION=/d' \
# protoc_lib_deps.py
# fix the include path
# ln -s ../../../.. grpc_root
}
python_configure_all() {
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
}

View file

@ -14,7 +14,7 @@ HOMEPAGE="https://grpc.io"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
KEYWORDS="amd64 arm64 x86"
RDEPEND="
~dev-python/grpcio-${PV}[${PYTHON_USEDEP}]

View file

@ -1,3 +0,0 @@
DIST grpc-1.68.1.gh.tar.gz 17320674 BLAKE2B 46f4ae35c6a3a6ddfd47918a68a42d10e115ef81052715e8d8a73abf973063c730ddda06373278f3a4a6280dd4938e530a5e7377ab76aa653bb208583deab7f3 SHA512 cfb88a1290e2ee46fbd5f2b50b9c066ac174b1077170088c3b1a30bd37e66c6ca5254d2b951329a3991ac2b4320d12a50b1464babffbfc3bcf4eab670a449fd1
DIST grpcio-1.68.1.tar.gz 12694654 BLAKE2B 73dc8ef4371f43d232e452b4aba4a7a3c32f83a93631179123a020660484ecb54ce6da14ef262442ab537a60859c624876e9b6285882f998a17c3a1a144c5416 SHA512 98f517687a9e46f316a08943122e2d002eac03637049e319b070832121ec8b4f140a0e0e1c530d6f3e83973e3503b5a50cdf1532b59e23a2b2e3d8514cd4132d
DIST grpcio_tools-1.68.1.tar.gz 5275384 BLAKE2B 29f504ccb3335c8f183c78c286b36c8e220dd30bd3ffb07770d330b232e40f87977bfe10e0099b05ca2a1d86c5743b056a5a4ae54f5343d9de0a9036a9b5cde4 SHA512 a967137875a50a28293d90a2b4ba6ceb35ce7532b73ea727cca0a40e734227a70e2b1f4ce201477b8418c4b29766e21d40fe33c92522d7d94c92c3a55cf265c4

View file

@ -1,115 +0,0 @@
# 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_{10..13} )
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[${PYTHON_USEDEP}]
test? (
dev-python/coverage[${PYTHON_USEDEP}]
>=dev-python/protobuf-5.26.1[${PYTHON_USEDEP}]
)
"
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++14
# 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_aio/unit/channel_argument_test.py::test_if_reuse_port_enabled
)
local EPYTEST_IGNORE=(
# not a test
tests/unit/test_common.py
# requires oauth2client
tests/unit/beta/_implementations_test.py
)
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
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
}

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<upstream>
<remote-id type="pypi">grpcio</remote-id>
<remote-id type="github">grpc/grpc</remote-id>
</upstream>
</pkgmetadata>

View file

@ -344,8 +344,3 @@ dev-python/inquirer3
# needed for python 3.13
~dev-python/pyaudio-0.2.14 ~amd64
#https://github.com/pentoo/pentoo-overlay/issues/2357
~dev-python/grpcio-1.72.0
~dev-python/grpcio-tools-1.72.0