summaryrefslogtreecommitdiff
path: root/dev-python/protobuf/protobuf-6.30.2-r1.ebuild
blob: 1075df18e02da09bfe5a58775cd7c9f6d994e2f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright 2008-2025 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_{9,10,11,12,13,14} )
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}.py.tar.gz
"

LICENSE="BSD"
SLOT="0/$(ver_cut 1-3)"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86 ~x64-macos"

src_prepare() {
	distutils-r1_src_prepare

	# strip old-style namespace
	rm google/__init__.py || die
}