dev-python/protobuf: Bump to 7.34.0

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2026-02-27 04:07:01 +01:00
parent b67fb04bb7
commit 9c494998eb
2 changed files with 159 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ DIST protobuf-33.2.gh.tar.gz 6875303 BLAKE2B 74e09134d5a8c524f1c2c11244d41c7b26a
DIST protobuf-33.3.gh.tar.gz 6889779 BLAKE2B 8031047309ee32633860b23e93bb30984d87a65749cdb4d36b93abcccc6b22782aea0d69970d849a3f43dafc75a27a5c98335a18dc72c3600a4ffb04b16c357b SHA512 fa54336ad4ee40fdf7024122dac455b5da3262e965b25096b7e5f7e4cbc94ee9179aa02a0570b4a732c06f6f921a17d8b3d44dfd367afb0ec52fe5bd7e00068b
DIST protobuf-33.4.gh.tar.gz 6889595 BLAKE2B fd378ca66464f39d32551bcf8ccab719b7d97e0fafa896bb69fa34c3866b5ae0d3938e75f57df6a712831ca5ea302595b35508037b11ea35c14ee54bb43a2fa2 SHA512 540059a93721447cf4723bcca06e91c43a4399cb366c05bf84e9d8e2c439f3107ba17803f9d912549b54c471f2dcc4c9fc834145ec441dff31ca24f9a3543aa9
DIST protobuf-33.5.gh.tar.gz 6890609 BLAKE2B d6069a5189cc02d7d1c7586883caab626d09bde61194fca54619f4e940ac4669d73fa7af4145b7559eb53f2d5b2b3c6184391c7c15ad920b04eebe53b520b2c8 SHA512 71110cd2cbf9f2e7f1bda4eed346ad6cad84a05ab0214d1e0880afc20a788f43176e2ccc8ac284eab38ec21578db147c2837b58789baf2823e4615d4b3557937
DIST protobuf-34.0.gh.tar.gz 7036108 BLAKE2B da33db4c3a81cf40c327fc3560db253a694b947e7282e1b1a35a9699efe4e316616942041e9ddfbfbe6add687a9815235940a4943fdb7416b7468e88ab77f480 SHA512 ba7fb01479c169003d8258896092a217f9781f51dcd59ebe7f5cc9b274f7f242bab2963f8eacb7ae6e1250db6fe8c2099ab54a9a9f399ef2aaeb44455f9afb98
DIST protobuf-5.29.5.py.tar.gz 425226 BLAKE2B 1d7461e94ba8bc097d6f52170678665e3cd97ef44e4757e6c20bcb1bdfbfe673d26cd4a63f8e6972af964e381dfffedeb9a4959ec7a7d5a3a3f87f917c8aa329 SHA512 cbb39efe7f6499362b3e4cc9f073df921c8b83d3aafde245a2ca3432f3e744a428e946799c48b2797e08312342e164eced0bf2b8865b8d042b54913855abb1c8
DIST protobuf-5.29.6.py.tar.gz 425623 BLAKE2B 113d56d001efde5d432437b0740c92255d7178a6900bf7b8266cece0d9c99815f12029034697f7363566d7500b853fc0825c5b3c01d8104b483323fcdbbcbb07 SHA512 42cb4c9b69dec89f001e6b70e35a25ddc94708e2977076ecd7d0e414b9547b2d1a044a1e8bfbf7eb7bebe6395888056f30cfb4c29608d86c9d0fcb7733c2b69a
DIST protobuf-6.30.2.gh.tar.gz 9523913 BLAKE2B d3950abfe8b3b61dc2bb61f683b014de29451252c46b670dee75a81eb0b8ed30a3209227aa9483800244af16058469deb281521609d769a3456a798ca8a9a4a3 SHA512 f2ee857a36b49f87257a306b3f3c361770d74aaf24c4650b9d00994e1e1a0b09079fb0ce5ffb4d5a4a32d8ca46e3247d6db454918fa0b104fc8d58e8a0546a96
@@ -16,3 +17,4 @@ DIST protobuf-6.33.2.py.tar.gz 444296 BLAKE2B d91fd1164ac67c33b04a4f882aba253bd9
DIST protobuf-6.33.3.py.tar.gz 444318 BLAKE2B 42c4bf4e7878eee03a0728feaf83bfcb037614d28332dddb490052586484cb034c20fefc95d82926a8183b6171f9b8d53b7fdf00e5a254824d7a8c4b3c6e9bfb SHA512 ba532469efd48e9541db67fb127846080ffee8e89b4b72587587f584e31b577c737f36c830a7591186722e6c432674ed033c037ce8813360af8023b1399329e9
DIST protobuf-6.33.4.py.tar.gz 444346 BLAKE2B a6b0481e7ed353081bf32ded3fc821196b3c67cbefc3320c2dda0ffc1616fb5162f024a469df404aa91409eeff12d99ecbe67471d664d1d8e356f4301a0c2ff5 SHA512 d556fd78572967b3ce0421c1838cd4f0c3f5ebff981ce9f4b95919cd9c3ddb7faa10083ea3e160a8f571ba9893d9523533c077f75bc14d2254664dbf66c21453
DIST protobuf-6.33.5.py.tar.gz 444465 BLAKE2B c00267bc22ce78a8ae717b2feed153a8749088184842509178a5a9074def2236d04eba3b7fc7a6d5106625a4e094df76637d62c51fda68d9adfd3ade5b09d080 SHA512 56a92cf4b5092965c925a7c6faa058aea5ad03b09efb871e3a9485e6cb03b16b1cc7b1e74184981b5108153febdfec1ad457b5b177831309c20b0e12416d45e1
DIST protobuf-7.34.0.py.tar.gz 454726 BLAKE2B 8aef8d604226f0eaddb7c5a9a59f2fa92af1bc860c5221d8db728cb9df76759c210ecda60c0db06daa69a44d29f0d787b4ee446a874cf7ed7f4a2a3fadb53822 SHA512 e41a9ab227b8cadd7410d9e782d635899d63d22777931eabdf57f89d99e8eaeed994faf535d2ffc4a8f9f7e419155437d79065f0f466926bc51308257c68a219

View File

@@ -0,0 +1,157 @@
# Copyright 2008-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Default implementation currently is upb, which doesn't match dev-libs/protobuf
# https://github.com/protocolbuffers/protobuf/blob/main/python/README.md#implementation-backends
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} )
inherit distutils-r1 pypi
GH_PV=$(ver_cut 2-3)
GH_P=${PN}-${GH_PV}
DESCRIPTION="Google's Protocol Buffers - Python bindings"
HOMEPAGE="
https://protobuf.dev/
https://pypi.org/project/protobuf/
"
# Rename sdist to avoid conflicts with dev-libs/protobuf
SRC_URI="
$(pypi_sdist_url) -> ${P}.py.tar.gz
test? (
https://github.com/protocolbuffers/protobuf/archive/v${GH_PV}.tar.gz
-> ${GH_P}.gh.tar.gz
)
"
LICENSE="BSD"
SLOT="0/$(ver_cut 1-3)"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
# need protobuf compiler
BDEPEND="
test? (
dev-libs/protobuf[protoc(+)]
dev-python/absl-py[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=()
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_unpack() {
unpack "${P}.py.tar.gz"
if use test; then
mkdir "${WORKDIR}/test" || die
cd "${WORKDIR}/test" || die
unpack "${GH_P}.gh.tar.gz"
fi
}
src_prepare() {
distutils-r1_src_prepare
# strip old-style namespace
rm google/__init__.py || die
}
python_test() {
local EPYTEST_DESELECT=()
local EPYTEST_IGNORE=(
# TODO: figure out how to build the pybind11 test extension
# (NB: upstream actually ignores these tests...)
google/protobuf/internal/recursive_message_pybind11_test.py
google/protobuf/internal/proto_api_test.py
)
case ${EPYTHON} in
python3.11)
EPYTEST_IGNORE+=(
# syntax error...
google/protobuf/internal/json_format_test.py
)
;;
python3.14*)
EPYTEST_DESELECT+=(
# exception message mismatch
google/protobuf/internal/json_format_test.py::JsonFormatTest::testInvalidTimestamp
google/protobuf/internal/well_known_types_test.py::TimeUtilTest::testInvalidTimestamp
)
;;
esac
cp -r "${BUILD_DIR}"/{install,test} || die
local -x PATH="${BUILD_DIR}/test${EPREFIX}/usr/bin:${PATH}"
cd "${BUILD_DIR}/test$(python_get_sitedir)" || die
# copy test files from the source tree
cp -r "${WORKDIR}/test/${GH_P}/python/google/protobuf/internal/." \
google/protobuf/internal/ || die
# link the test data for text_format_test.py
# (it traverses directories upwards until to finds src/google...)
ln -s "${WORKDIR}/test/${GH_P}/src" ../src || die
# compile test-related protobufs
local test_protos=(
# from src
any_test.proto
map_proto2_unittest.proto
map_unittest.proto
unittest.proto
unittest_custom_options.proto
unittest_delimited.proto
unittest_delimited_import.proto
unittest_features.proto
unittest_import.proto
unittest_import_option.proto
unittest_import_public.proto
unittest_legacy_features.proto
unittest_mset.proto
unittest_mset_wire_format.proto
unittest_no_field_presence.proto
unittest_no_generic_services.proto
unittest_proto3.proto
unittest_proto3_arena.proto
unittest_proto3_extensions.proto
unittest_retention.proto
util/json_format.proto
util/json_format_proto3.proto
# from python
internal/descriptor_pool_test1.proto
internal/descriptor_pool_test2.proto
internal/factory_test1.proto
internal/factory_test2.proto
internal/file_options_test.proto
internal/import_test_package/import_public.proto
internal/import_test_package/import_public_nested.proto
internal/import_test_package/inner.proto
internal/import_test_package/outer.proto
internal/message_set_extensions.proto
internal/missing_enum_values.proto
internal/more_extensions.proto
internal/more_messages.proto
internal/no_package.proto
internal/packed_field_test.proto
internal/packed_field_test.proto
internal/self_recursive.proto
internal/test_bad_identifiers.proto
internal/test_proto2.proto
internal/test_proto3_optional.proto
internal/well_known_types_test.proto
)
local proto
for proto in "${test_protos[@]}"; do
protoc --python_out=. -I"${WORKDIR}/test/${GH_P}/src" -I. \
"google/protobuf/${proto}" || die
done
epytest
}