summaryrefslogtreecommitdiff
path: root/dev-python/protobuf-python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/protobuf-python')
-rw-r--r--dev-python/protobuf-python/Manifest6
-rw-r--r--dev-python/protobuf-python/files/editions.patch58
-rw-r--r--dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch13
-rw-r--r--dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch21
-rw-r--r--dev-python/protobuf-python/metadata.xml14
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.21.12.ebuild78
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.21.9.ebuild6
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.22.5.ebuild86
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.23.3.ebuild4
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.24.4.ebuild57
-rw-r--r--dev-python/protobuf-python/protobuf-python-4.25.3.ebuild57
-rw-r--r--dev-python/protobuf-python/protobuf-python-5.27.1.ebuild54
-rw-r--r--dev-python/protobuf-python/protobuf-python-5.27.2.ebuild30
13 files changed, 239 insertions, 245 deletions
diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
index 476fc3b84d30..f5b9bc33329a 100644
--- a/dev-python/protobuf-python/Manifest
+++ b/dev-python/protobuf-python/Manifest
@@ -1,5 +1,5 @@
+DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f82c42c70054d47d1899e6bb79f3fdde2666cad5b8eff6e1bc539c3b0cdf9f2b125ce7e5d3a459a69e84d67ab535e SHA512 2dc8f552388438268d8b9f7a9e84c6abf1736be3d5031438c789c317410c9f4b5cedd25bf7da6d67b3ba32ca890869f9ddaab2284d6ac0e734a5b135ffbb1346
DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
+DIST protobuf-22.5.tar.gz 4924661 BLAKE2B d69c73f4ebfddf45fd94b4f5f898faf00256fe674f2cbc0443c60a88d7a0f47fb96f2f6262879927c6da88095b4ea3ee7fd4c471c100bf42a2bae9edf48c07f1 SHA512 058ab2fec5b11007972e6043071056d1944c3b6fe1d31246cddba8eb57686e3b5280f6ad3d58e78940ca63005e74a8de3c72237f9f7c5066548c5a2513ddc584
DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b
-DIST protobuf-24.4.tar.gz 5180235 BLAKE2B 1c7e9035d9f3810886baaea7d679414c882463c79828c99dd8895a9549638c1ca17f9ab3b38d461019f3e1412d9cb9584b995b1da99866eb6fdbb8bdeb063e6f SHA512 52b6ab5587d03cbd1f35cf3cdc388e1710fa50f3031559ac53cf754965407ded7602cdead56080444ab695588112cc3391a1d7fdd5e565d90d0af7ad08706315
-DIST protobuf-25.3.tar.gz 5878962 BLAKE2B 9268f9bd993a1cfd6d3937a2ad56ba4cfe3d84923756513841cbf13039d4a07acb260468745cb1294f30334cb34b45c6fde272f5c40d9de63ac6a4ce5c263077 SHA512 1f73e237c919082e5423ae9e2ea8813dccf672c059051d1531fe89ffaa45872d3cf3052b8c3af26f674296ec17d7dc861c67b8f0834ed80261ce4a6a14ed7115
-DIST protobuf-5.27.1.tar.gz 401656 BLAKE2B 6e29467b8f38043c0f274e655f110361bc4b56d82dc13b2db90aaadf3b1c29cfa042b34fb6234072b13c0dbcf769e900878cb832b95fc087976fb977cf95d469 SHA512 4324a73182e2cceb61a0e06aa0157d6b75024fc277e0bc23e224cf75c85ecd2eb9ada2f7cd627a691d049eb03334c4666c96573d7f38acb72ceeb69849d38d61
+DIST protobuf-python-5.27.2.tar.gz 401640 BLAKE2B 9d3420b75536ffd452cc2a3317a6ad1e16a62df36085f1e329f0178026032f5533e1a96f7b613f91093ac12a44d7ad4059ebededea636f38ded29da563afd075 SHA512 b3afcf13e223d7e855ac0aa000cc395e3ea1301b2e3dfe3c0d5435d8031be3726e6aec1fb6228c572aa1685f75aba2d97d2c9dfdb6d9e058a2e88321d6ba9180
diff --git a/dev-python/protobuf-python/files/editions.patch b/dev-python/protobuf-python/files/editions.patch
deleted file mode 100644
index bd81416897a9..000000000000
--- a/dev-python/protobuf-python/files/editions.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 2eee41224e2eac1aa4e8e8f4a28ff11748e49a41 Mon Sep 17 00:00:00 2001
-From: Mike Kruskal <mkruskal@google.com>
-Date: Thu, 10 Aug 2023 15:35:41 -0700
-Subject: [PATCH] Remove editions test proto from setup.py.
-
-This proto is only used in C++ tests, and doesn't need to be built in python. Python doesn't support editions yet, so we should just remove it for now. This also fixes some other issues with setup.py where tests fail.
-
-Closes #13501
-
-PiperOrigin-RevId: 555681295
----
- python/google/protobuf/internal/descriptor_test.py | 5 ++---
- python/setup.py | 2 +-
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/python/google/protobuf/internal/descriptor_test.py b/python/google/protobuf/internal/descriptor_test.py
-index b070bca87dc..b7e8d71f4d6 100755
---- a/python/google/protobuf/internal/descriptor_test.py
-+++ b/python/google/protobuf/internal/descriptor_test.py
-@@ -67,7 +67,7 @@
- message ResponseMessage {
- }
-
--service Service {
-+service DescriptorTestService {
- rpc CallMethod(.protobuf_unittest.NestedMessage) returns (.protobuf_unittest.ResponseMessage);
- }
-
-@@ -97,8 +97,7 @@ def setUp(self):
- enum_proto.value.add(name='FOREIGN_BAZ', number=6)
-
- file_proto.message_type.add(name='ResponseMessage')
-- service_proto = file_proto.service.add(
-- name='Service')
-+ service_proto = file_proto.service.add(name='DescriptorTestService')
- method_proto = service_proto.method.add(
- name='CallMethod',
- input_type='.protobuf_unittest.NestedMessage',
-diff --git a/python/setup.py b/python/setup.py
-index e65631013eb..c686ddc25a7 100755
---- a/python/setup.py
-+++ b/python/setup.py
-@@ -131,7 +131,6 @@ def GenerateUnittestProtos():
- GenProto('../src/google/protobuf/map_unittest.proto', False)
- GenProto('../src/google/protobuf/test_messages_proto3.proto', False)
- GenProto('../src/google/protobuf/test_messages_proto2.proto', False)
-- GenProto('../src/google/protobuf/unittest_arena.proto', False)
- GenProto('../src/google/protobuf/unittest.proto', False)
- GenProto('../src/google/protobuf/unittest_custom_options.proto', False)
- GenProto('../src/google/protobuf/unittest_import.proto', False)
-@@ -140,6 +139,7 @@ def GenerateUnittestProtos():
- GenProto('../src/google/protobuf/unittest_mset_wire_format.proto', False)
- GenProto('../src/google/protobuf/unittest_no_generic_services.proto', False)
- GenProto('../src/google/protobuf/unittest_proto3_arena.proto', False)
-+ GenProto('../src/google/protobuf/unittest_retention.proto', False)
- GenProto('../src/google/protobuf/util/json_format.proto', False)
- GenProto('../src/google/protobuf/util/json_format_proto3.proto', False)
- GenProto('google/protobuf/internal/any_test.proto', False)
diff --git a/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch b/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch
new file mode 100644
index 000000000000..3ca6a5776d04
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-4.22.5-c++-17.patch
@@ -0,0 +1,13 @@
+diff --git a/python/setup.py b/python/setup.py
+index e65631013..8a6cbe59a 100755
+--- a/python/setup.py
++++ b/python/setup.py
+@@ -370,7 +370,7 @@ if __name__ == '__main__':
+ extra_compile_args.append('-Wno-invalid-offsetof')
+ extra_compile_args.append('-Wno-sign-compare')
+ extra_compile_args.append('-Wno-unused-variable')
+- extra_compile_args.append('-std=c++14')
++ extra_compile_args.append('-std=c++17')
+
+ if sys.platform == 'darwin':
+ extra_compile_args.append('-Wno-shorten-64-to-32')
diff --git a/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch
new file mode 100644
index 000000000000..65cb22d5f653
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-4.22.5-python.patch
@@ -0,0 +1,21 @@
+See also https://github.com/protocolbuffers/protobuf/pull/9098
+--- a/google/protobuf/internal/json_format_test.py
++++ b/google/protobuf/internal/json_format_test.py
+@@ -1060,7 +1060,7 @@ class JsonFormatTest(JsonFormatBase):
+ def testInvalidTimestamp(self):
+ message = json_format_proto3_pb2.TestTimestamp()
+ text = '{"value": "10000-01-01T00:00:00.00Z"}'
+- self.assertRaisesRegexp(
++ self.assertRaisesRegex(
+ json_format.ParseError, 'Failed to parse value field: '
+ 'time data \'10000-01-01T00:00:00\' does not match'
+ ' format \'%Y-%m-%dT%H:%M:%S\' at TestTimestamp.value.',
+@@ -1097,7 +1097,7 @@ class JsonFormatTest(JsonFormatBase):
+ def testInvalidOneof(self):
+ message = json_format_proto3_pb2.TestOneof()
+ text = '{"oneofInt32Value": 1, "oneofStringValue": "2"}'
+- self.assertRaisesRegexp(
++ self.assertRaisesRegex(
+ json_format.ParseError, 'Message type "proto3.TestOneof"'
+ ' should not have multiple "oneof_value" oneof fields at "TestOneof".',
+ json_format.Parse, text, message)
diff --git a/dev-python/protobuf-python/metadata.xml b/dev-python/protobuf-python/metadata.xml
index 52a56dcdbaf1..af249ed82217 100644
--- a/dev-python/protobuf-python/metadata.xml
+++ b/dev-python/protobuf-python/metadata.xml
@@ -1,20 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
- <maintainer type="person">
- <email>arfrever.fta@gmail.com</email>
- <name>Arfrever Frehtes Taifersar Arahesis</name>
- </maintainer>
- <maintainer type="project">
- <email>cjk@gentoo.org</email>
- <name>Cjk</name>
- </maintainer>
- <origin>ports</origin>
+ <origin>gentoo-staging</origin>
<slots>
<subslots>Soname version number of Protobuf</subslots>
</slots>
diff --git a/dev-python/protobuf-python/protobuf-python-4.21.12.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.12.ebuild
new file mode 100644
index 000000000000..12885afc9088
--- /dev/null
+++ b/dev-python/protobuf-python/protobuf-python-4.21.12.ebuild
@@ -0,0 +1,78 @@
+# Copyright 2008-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_{8,9,10,11,12} )
+
+inherit distutils-r1
+
+PARENT_PN="${PN/-python/}"
+PARENT_PV="$(ver_cut 2-)"
+PARENT_P="${PARENT_PN}-${PARENT_PV}"
+
+if [[ "${PV}" == *9999 ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
+ EGIT_SUBMODULES=()
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
+else
+ SRC_URI="
+ https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
+ -> ${PARENT_P}.tar.gz
+ "
+ KEYWORDS="~alpha amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Google's Protocol Buffers - Python bindings"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+ https://pypi.org/project/protobuf/
+"
+
+LICENSE="BSD"
+SLOT="0/3.${PARENT_PV}.0"
+
+S="${WORKDIR}/${PARENT_P}/python"
+
+DEPEND="
+ ${PYTHON_DEPS}
+"
+RDEPEND="
+ ${BDEPEND}
+ dev-libs/protobuf:${SLOT}
+"
+
+distutils_enable_tests setup.py
+
+# Same than PATCHES but from repository's root directory,
+# please see function `python_prepare_all` below.
+# Simplier for users IMHO.
+PARENT_PATCHES=(
+)
+
+# Here for patches within "python/" subdirectory.
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.20.3-python311.patch
+)
+
+python_prepare_all() {
+ pushd "${WORKDIR}/${PARENT_P}" > /dev/null || die
+ [[ -n "${PARENT_PATCHES[@]}" ]] && eapply "${PARENT_PATCHES[@]}"
+ eapply_user
+ popd > /dev/null || die
+
+ distutils-r1_python_prepare_all
+}
+
+src_configure() {
+ DISTUTILS_ARGS=( --cpp_implementation )
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
+}
diff --git a/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild
index fd5dd50205b7..5a4ae7aa90ad 100644
--- a/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild
@@ -24,7 +24,7 @@ else
https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
-> ${PARENT_P}.tar.gz
"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
DESCRIPTION="Google's Protocol Buffers - Python bindings"
@@ -67,6 +67,10 @@ python_prepare_all() {
eapply_user
popd > /dev/null || die
+ # py3.12
+ sed -i -e 's:assertRaisesRegexp:assertRaisesRegex:' \
+ google/protobuf/internal/json_format_test.py || die
+
distutils-r1_python_prepare_all
}
diff --git a/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild b/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild
new file mode 100644
index 000000000000..c73f6a9949dd
--- /dev/null
+++ b/dev-python/protobuf-python/protobuf-python-4.22.5.ebuild
@@ -0,0 +1,86 @@
+# Copyright 2008-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_{8,9,10,11,12} )
+
+inherit distutils-r1
+
+PARENT_PN="${PN/-python/}"
+PARENT_PV="$(ver_cut 2-)"
+PARENT_P="${PARENT_PN}-${PARENT_PV}"
+
+if [[ "${PV}" == *9999 ]]; then
+ inherit git-r3
+
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
+ EGIT_SUBMODULES=()
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
+else
+ SRC_URI="
+ https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
+ -> ${PARENT_P}.tar.gz
+ "
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Google's Protocol Buffers - Python bindings"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+ https://pypi.org/project/protobuf/
+"
+
+LICENSE="BSD"
+SLOT="0/22.5.0"
+
+S="${WORKDIR}/${PARENT_P}/python"
+
+DEPEND="
+ ${PYTHON_DEPS}
+"
+RDEPEND="
+ dev-libs/protobuf:${SLOT}
+"
+
+distutils_enable_tests setup.py
+
+# Same than PATCHES but from repository's root directory,
+# please see function `python_prepare_all` below.
+# Simplier for users IMHO.
+PARENT_PATCHES=(
+ "${FILESDIR}/${P}-c++-17.patch"
+)
+
+# Here for patches within "python/" subdirectory.
+PATCHES=(
+ "${FILESDIR}/${PN}-4.22.5-python.patch"
+)
+
+python_prepare_all() {
+ pushd "${WORKDIR}/${PARENT_P}" > /dev/null || die
+ [[ -n "${PARENT_PATCHES[@]}" ]] && eapply "${PARENT_PATCHES[@]}"
+ eapply_user
+ popd > /dev/null || die
+
+ distutils-r1_python_prepare_all
+}
+
+src_configure() {
+ DISTUTILS_ARGS=( --cpp_implementation )
+}
+
+python_compile() {
+ distutils-r1_python_compile
+ find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ einfo "Installing headers"
+ insinto /usr/include/google/protobuf
+ doins google/protobuf/proto_api.h
+}
diff --git a/dev-python/protobuf-python/protobuf-python-4.23.3.ebuild b/dev-python/protobuf-python/protobuf-python-4.23.3.ebuild
index 0d86c559c2a4..6f92f8570f38 100644
--- a/dev-python/protobuf-python/protobuf-python-4.23.3.ebuild
+++ b/dev-python/protobuf-python/protobuf-python-4.23.3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2008-2023 Gentoo Authors
+# Copyright 2008-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -24,7 +24,7 @@ else
https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
-> ${PARENT_P}.tar.gz
"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+ KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
DESCRIPTION="Google's Protocol Buffers - Python bindings"
diff --git a/dev-python/protobuf-python/protobuf-python-4.24.4.ebuild b/dev-python/protobuf-python/protobuf-python-4.24.4.ebuild
deleted file mode 100644
index 54e79a43a6b0..000000000000
--- a/dev-python/protobuf-python/protobuf-python-4.24.4.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2023 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8,9,10,11,12} )
-
-inherit distutils-r1 flag-o-matic
-
-PARENT_PN="${PN/-python/}"
-PARENT_PV="$(ver_cut 2-)"
-PARENT_P="${PARENT_PN}-${PARENT_PV}"
-
-SRC_URI="
- https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz -> ${PARENT_P}.tar.gz
-"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
- https://pypi.org/project/protobuf/
-"
-
-LICENSE="BSD"
-SLOT="0/24.4.0"
-
-S="${WORKDIR}/${PARENT_P}/python"
-
-BDEPEND="
-"
-DEPEND="
- ${PYTHON_DEPS}
-"
-RDEPEND="
- ${BDEPEND}
- dev-libs/protobuf:${SLOT}
-"
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
- eapply_user
-
- distutils-r1_python_prepare_all
-}
-
-src_configure() {
- append-cxxflags -std=c++17
- DISTUTILS_ARGS=( --cpp_implementation )
-}
-
-python_compile() {
- distutils-r1_python_compile
- find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}
diff --git a/dev-python/protobuf-python/protobuf-python-4.25.3.ebuild b/dev-python/protobuf-python/protobuf-python-4.25.3.ebuild
deleted file mode 100644
index cce4f9cfeb4a..000000000000
--- a/dev-python/protobuf-python/protobuf-python-4.25.3.ebuild
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2023-2024 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8,9,10,11,12} )
-
-inherit distutils-r1 flag-o-matic
-
-PARENT_PN="${PN/-python/}"
-PARENT_PV="$(ver_cut 2-)"
-PARENT_P="${PARENT_PN}-${PARENT_PV}"
-
-SRC_URI="
- https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz -> ${PARENT_P}.tar.gz
-"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
- https://pypi.org/project/protobuf/
-"
-
-LICENSE="BSD"
-SLOT="0/25.3.0"
-
-S="${WORKDIR}/${PARENT_P}/python"
-
-BDEPEND="
-"
-DEPEND="
- ${PYTHON_DEPS}
-"
-RDEPEND="
- ${BDEPEND}
- dev-libs/protobuf:${SLOT}
-"
-
-distutils_enable_tests setup.py
-
-python_prepare_all() {
- eapply_user
-
- distutils-r1_python_prepare_all
-}
-
-src_configure() {
- append-cxxflags -std=c++17
- DISTUTILS_ARGS=( --cpp_implementation )
-}
-
-python_compile() {
- distutils-r1_python_compile
- find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}
diff --git a/dev-python/protobuf-python/protobuf-python-5.27.1.ebuild b/dev-python/protobuf-python/protobuf-python-5.27.1.ebuild
deleted file mode 100644
index b17e7d263f27..000000000000
--- a/dev-python/protobuf-python/protobuf-python-5.27.1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2023-2024 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{8,9,10,11,12} )
-
-inherit distutils-r1 flag-o-matic
-
-PARENT_PN="${PN/-python/}"
-PARENT_P="${PARENT_PN}-${PV}"
-
-SRC_URI="https://files.pythonhosted.org/packages/20/5f/00d891817d4031bbf4e846a99834bf949a76714c10a726833aa184176772/protobuf-5.27.1.tar.gz"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-DESCRIPTION="Google's Protocol Buffers - Python bindings"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
- https://pypi.org/project/protobuf/
-"
-
-LICENSE="BSD"
-SLOT="0/27.1.0"
-
-S="${WORKDIR}/${PARENT_P}"
-
-BDEPEND="
-"
-DEPEND="
- ${PYTHON_DEPS}
-"
-RDEPEND="
- ${BDEPEND}
- dev-libs/protobuf:${SLOT}
-"
-
-distutils_enable_tests setup.py
-
-
-python_prepare_all() {
- eapply_user
-
- distutils-r1_python_prepare_all
-}
-
-src_configure() {
- append-cxxflags -std=c++17
-}
-
-python_compile() {
- distutils-r1_python_compile
- find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
-}
diff --git a/dev-python/protobuf-python/protobuf-python-5.27.2.ebuild b/dev-python/protobuf-python/protobuf-python-5.27.2.ebuild
new file mode 100644
index 000000000000..c21d50f587cb
--- /dev/null
+++ b/dev-python/protobuf-python/protobuf-python-5.27.2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 2008-2024 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_{8,9,10,11,12} )
+PYPI_PN="protobuf"
+
+inherit distutils-r1 pypi
+
+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}.tar.gz
+"
+
+LICENSE="BSD"
+SLOT="0/$(ver_cut 1-3)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"