diff options
| author | Michał Górny <mgorny@gentoo.org> | 2024-10-22 18:13:09 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2024-10-23 17:01:46 +0200 |
| commit | f4c8a24179182239c526eda01a17eb3250c0843b (patch) | |
| tree | a8d156f6ef654b1208c1b077b922989cf2c72e39 /dev-python | |
| parent | ef58fd8577cd1007551b8d7575bb93936e330b21 (diff) | |
| download | gentoo-f4c8a24179182239c526eda01a17eb3250c0843b.tar.gz gentoo-f4c8a24179182239c526eda01a17eb3250c0843b.tar.bz2 gentoo-f4c8a24179182239c526eda01a17eb3250c0843b.zip | |
dev-python/grpcio: Readd package, v1.67.0
Co-authored-by: Roman Popov <roma251078@mail.ru>
Signed-off-by: Roman Popov <roma251078@mail.ru>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/grpcio/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/grpcio/grpcio-1.67.0.ebuild | 109 | ||||
| -rw-r--r-- | dev-python/grpcio/metadata.xml | 12 |
3 files changed, 123 insertions, 0 deletions
diff --git a/dev-python/grpcio/Manifest b/dev-python/grpcio/Manifest new file mode 100644 index 000000000000..e0b54db5abf1 --- /dev/null +++ b/dev-python/grpcio/Manifest @@ -0,0 +1,2 @@ +DIST grpc-1.67.0.gh.tar.gz 17317493 BLAKE2B 81aaf9a4d293dd41d9d068e81eb8a9898b610498722dd6f9c5ff88118fc5a31a936ac83c7cdb4f56c288d131c7721beed8e307dd91bf3de5cc25951cdb06de5a SHA512 5e76a3147ca051e5304d5d64eefe124cd446dd5d7bd9a65667bae5474b59f70b32368d225e8345c9414bddb968c1390b8bcd08ed97abb62b543528289b29ec35 +DIST grpcio_tools-1.67.0.tar.gz 5159163 BLAKE2B 54a7db77514033c4747d20a13fded114828fed23f649587c649f5ad2716d4bb31b80eeda560d55ae087a564cb9d34563a612cc91df581ae6b9a761f307828397 SHA512 f9644b4424aa68f1ae4d679c7b635db9bbfc0b493c76caf7d2e9fe0a49e5e81b6f146666c8dba3fc1d1c0db141f8fb362dd0ede0842c34cb178009412a672ec5 diff --git a/dev-python/grpcio/grpcio-1.67.0.ebuild b/dev-python/grpcio/grpcio-1.67.0.ebuild new file mode 100644 index 000000000000..2583aa2206fd --- /dev/null +++ b/dev-python/grpcio/grpcio-1.67.0.ebuild @@ -0,0 +1,109 @@ +# Copyright 2024 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 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 +SRC_URI=" + https://github.com/grpc/grpc/archive/v${PV}.tar.gz + -> ${MY_P}.gh.tar.gz + test? ( + $(pypi_sdist_url grpcio-tools) + ) +" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=" + dev-cpp/abseil-cpp:= + dev-libs/openssl:= + dev-libs/re2:= + 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-python-5.26.1[${PYTHON_USEDEP}] + ) +" + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_configure() { + export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)" + 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" +} + +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 + pushd "${WORKDIR}/grpcio_tools-${PV}" >/dev/null || die + distutils_pep517_install "${BUILD_DIR}"/test + popd >/dev/null || 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 +} diff --git a/dev-python/grpcio/metadata.xml b/dev-python/grpcio/metadata.xml new file mode 100644 index 000000000000..97374d1add3c --- /dev/null +++ b/dev-python/grpcio/metadata.xml @@ -0,0 +1,12 @@ +<?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> |
