Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/
Date: Sun, 30 Oct 2022 22:05:04
Message-Id: 1667167489.8bbe203f050650af026afc89b45d3f8644856c52.sam@gentoo
1 commit: 8bbe203f050650af026afc89b45d3f8644856c52
2 Author: Thibaud CANALE <thican <AT> thican <DOT> net>
3 AuthorDate: Thu Oct 27 18:30:44 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 22:04:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bbe203f
7
8 dev-python/protobuf-python: add 4.21.9
9
10 Bug: https://bugs.gentoo.org/878467
11
12 Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-python/protobuf-python/Manifest | 1 +
16 .../protobuf-python/protobuf-python-4.21.9.ebuild | 79 ++++++++++++++++++++++
17 2 files changed, 80 insertions(+)
18
19 diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
20 index 74313749d43f..5dd5ef74895c 100644
21 --- a/dev-python/protobuf-python/Manifest
22 +++ b/dev-python/protobuf-python/Manifest
23 @@ -1,4 +1,5 @@
24 DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb
25 +DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
26 DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
27 DIST protobuf-3.19.6.tar.gz 5299501 BLAKE2B 3121f76b95f83c5309ce49ce296b738eff7be9d3a5093c564fbe2339fb5f3729e406f1b44bfcc05feb0d31ab63838bb4f54685017977c73a33b91215a6776072 SHA512 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4
28 DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
29
30 diff --git a/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild b/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild
31 new file mode 100644
32 index 000000000000..884546edf04c
33 --- /dev/null
34 +++ b/dev-python/protobuf-python/protobuf-python-4.21.9.ebuild
35 @@ -0,0 +1,79 @@
36 +# Copyright 2008-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=8
40 +
41 +DISTUTILS_USE_PEP517=setuptools
42 +PYTHON_COMPAT=( python3_{8..11} )
43 +
44 +inherit distutils-r1
45 +
46 +PARENT_PN="${PN/-python/}"
47 +PARENT_PV="$(ver_cut 2-)"
48 +PARENT_P="${PARENT_PN}-${PARENT_PV}"
49 +
50 +if [[ "${PV}" == *9999 ]]; then
51 + inherit git-r3
52 +
53 + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
54 + EGIT_SUBMODULES=()
55 + EGIT_CHECKOUT_DIR="${WORKDIR}/${PARENT_P}"
56 +else
57 + SRC_URI="
58 + https://github.com/protocolbuffers/protobuf/archive/v${PARENT_PV}.tar.gz
59 + -> ${PARENT_P}.tar.gz
60 + "
61 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
62 +fi
63 +
64 +DESCRIPTION="Google's Protocol Buffers - Python bindings"
65 +HOMEPAGE="
66 + https://developers.google.com/protocol-buffers/
67 + https://pypi.org/project/protobuf/
68 +"
69 +
70 +LICENSE="BSD"
71 +SLOT="0/32"
72 +
73 +S="${WORKDIR}/${PARENT_P}/python"
74 +
75 +BDEPEND="
76 +"
77 +DEPEND="
78 + ${PYTHON_DEPS}
79 +"
80 +RDEPEND="
81 + ${BDEPEND}
82 + dev-libs/protobuf:${SLOT}
83 +"
84 +
85 +distutils_enable_tests setup.py
86 +
87 +# Same than PATCHES but from repository's root directory,
88 +# please see function `python_prepare_all` below.
89 +# Simplier for users IMHO.
90 +PARENT_PATCHES=(
91 +)
92 +
93 +# Here for patches within "python/" subdirectory.
94 +PATCHES=(
95 + "${FILESDIR}"/${PN}-3.20.3-python311.patch
96 +)
97 +
98 +python_prepare_all() {
99 + pushd "${WORKDIR}/${PARENT_P}" > /dev/null || die
100 + [[ -n "${PARENT_PATCHES[@]}" ]] && eapply "${PARENT_PATCHES[@]}"
101 + eapply_user
102 + popd > /dev/null || die
103 +
104 + distutils-r1_python_prepare_all
105 +}
106 +
107 +src_configure() {
108 + DISTUTILS_ARGS=( --cpp_implementation )
109 +}
110 +
111 +python_compile() {
112 + distutils-r1_python_compile
113 + find "${BUILD_DIR}/install" -name "*.pth" -type f -delete || die
114 +}