Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/
Date: Fri, 02 Sep 2022 15:18:06
Message-Id: 1662131826.4e446d13fe820ffe83d4819e5d0ee38191c9741d.arthurzam@gentoo
1 commit: 4e446d13fe820ffe83d4819e5d0ee38191c9741d
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 2 14:30:16 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 15:17:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e446d13
7
8 dev-python/protobuf-python: add 3.20.1
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/protobuf-python/Manifest | 1 +
13 .../protobuf-python/protobuf-python-3.20.1.ebuild | 71 ++++++++++++++++++++++
14 2 files changed, 72 insertions(+)
15
16 diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
17 index 445bb0b6652e..dfb0564c5120 100644
18 --- a/dev-python/protobuf-python/Manifest
19 +++ b/dev-python/protobuf-python/Manifest
20 @@ -1 +1,2 @@
21 DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
22 +DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
23
24 diff --git a/dev-python/protobuf-python/protobuf-python-3.20.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.20.1.ebuild
25 new file mode 100644
26 index 000000000000..72300c2997d3
27 --- /dev/null
28 +++ b/dev-python/protobuf-python/protobuf-python-3.20.1.ebuild
29 @@ -0,0 +1,71 @@
30 +# Copyright 2008-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +DISTUTILS_USE_PEP517=setuptools
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +
38 +inherit distutils-r1
39 +
40 +if [[ "${PV}" == "9999" ]]; then
41 + inherit git-r3
42 +
43 + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
44 + EGIT_SUBMODULES=()
45 +fi
46 +
47 +DESCRIPTION="Google's Protocol Buffers - Python bindings"
48 +HOMEPAGE="
49 + https://developers.google.com/protocol-buffers/
50 + https://github.com/protocolbuffers/protobuf/
51 + https://pypi.org/project/protobuf/
52 +"
53 +if [[ "${PV}" != "9999" ]]; then
54 + SRC_URI="
55 + https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz
56 + -> protobuf-${PV}.tar.gz
57 + "
58 +fi
59 +S="${WORKDIR}/protobuf-${PV}/python"
60 +
61 +LICENSE="BSD"
62 +SLOT="0/30"
63 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
64 +
65 +BDEPEND="
66 + ${PYTHON_DEPS}
67 + ~dev-libs/protobuf-${PV}
68 + dev-python/six[${PYTHON_USEDEP}]
69 +"
70 +DEPEND="
71 + ${PYTHON_DEPS}
72 + ~dev-libs/protobuf-${PV}
73 +"
74 +RDEPEND="
75 + ${BDEPEND}
76 + !dev-python/namespace-google
77 +"
78 +
79 +if [[ "${PV}" == "9999" ]]; then
80 + EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
81 +fi
82 +
83 +distutils_enable_tests setup.py
84 +
85 +python_prepare_all() {
86 + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die
87 + eapply_user
88 + popd > /dev/null || die
89 +
90 + distutils-r1_python_prepare_all
91 +}
92 +
93 +src_configure() {
94 + DISTUTILS_ARGS=(--cpp_implementation)
95 +}
96 +
97 +python_compile() {
98 + distutils-r1_python_compile
99 + find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
100 +}