public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/
Date: Tue,  9 Nov 2021 11:51:59 +0000 (UTC)	[thread overview]
Message-ID: <1636458707.4772b88723f4162442835efabe7f886d58e10f39.arthurzam@gentoo> (raw)

commit:     4772b88723f4162442835efabe7f886d58e10f39
Author:     Miezhiko <Miezhiko <AT> gmail <DOT> com>
AuthorDate: Tue Nov  9 09:13:10 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  9 11:51:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4772b887

dev-python/protobuf-python: add 3.19.1

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Contributed-by: Miezhiko <Miezhiko <AT> gmail.com>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/protobuf-python/Manifest                |  1 +
 ...protobuf.pyext._message.PyUnknownFieldRef.patch | 22 +++++++++
 .../protobuf-python/protobuf-python-3.19.1.ebuild  | 52 ++++++++++++++++++++++
 3 files changed, 75 insertions(+)

diff --git a/dev-python/protobuf-python/Manifest b/dev-python/protobuf-python/Manifest
index 87ea4747892..e4219af26c3 100644
--- a/dev-python/protobuf-python/Manifest
+++ b/dev-python/protobuf-python/Manifest
@@ -4,3 +4,4 @@ DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101b
 DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8
 DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98
 DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12
+DIST protobuf-3.19.1.tar.gz 5291573 BLAKE2B a34f1a7cf99ecb6cb8a26bc858de6273bfd26aa9be1e89e48c16cb5df0f1e9576479344c8250017238dbac0d0c4ac33001125b5fc622cb64ed6b91023198b03a SHA512 f1271f5159a7be363a5f60ce4921dfea68a8468d66808330bacaeaa1cb7f652d045ab080b5d82816a6fd4e6d7d7fe79aaa6c8d66d81692721d36ce3bbf619f31

diff --git a/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch
new file mode 100644
index 00000000000..a03ad98b455
--- /dev/null
+++ b/dev-python/protobuf-python/files/protobuf-python-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch
@@ -0,0 +1,22 @@
+https://github.com/protocolbuffers/protobuf/issues/6205
+https://github.com/protocolbuffers/protobuf/pull/7016
+
+--- a/google/protobuf/pyext/unknown_fields.cc
++++ b/google/protobuf/pyext/unknown_fields.cc
+@@ -274,13 +274,13 @@
+   PyObject* data = NULL;
+   switch (field->type()) {
+     case UnknownField::TYPE_VARINT:
+-      data = PyLong_FromLong(field->varint());
++      data = PyLong_FromUnsignedLongLong(field->varint());
+       break;
+     case UnknownField::TYPE_FIXED32:
+-      data = PyLong_FromLong(field->fixed32());
++      data = PyLong_FromUnsignedLongLong(field->fixed32());
+       break;
+     case UnknownField::TYPE_FIXED64:
+-      data = PyLong_FromLong(field->fixed64());
++      data = PyLong_FromUnsignedLongLong(field->fixed64());
+       break;
+     case UnknownField::TYPE_LENGTH_DELIMITED:
+       data = PyBytes_FromStringAndSize(field->length_delimited().data(),

diff --git a/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild b/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild
new file mode 100644
index 00000000000..17947082fe8
--- /dev/null
+++ b/dev-python/protobuf-python/protobuf-python-3.19.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 2008-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+if [[ "${PV}" == "9999" ]]; then
+	inherit git-r3
+
+	EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+	EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}"
+	EGIT_SUBMODULES=()
+else
+	SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> protobuf-${PV}.tar.gz"
+fi
+S="${WORKDIR}/protobuf-${PV}/python"
+
+DESCRIPTION="Google's Protocol Buffers - Python bindings"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+
+LICENSE="BSD"
+SLOT="0/30"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+
+BDEPEND="${PYTHON_DEPS}
+	~dev-libs/protobuf-${PV}
+	dev-python/namespace-google[${PYTHON_USEDEP}]
+	dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="${PYTHON_DEPS}
+	~dev-libs/protobuf-${PV}"
+RDEPEND="${BDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-3.19.1-google.protobuf.pyext._message.PyUnknownFieldRef.patch"
+)
+
+distutils_enable_tests setup.py
+
+python_configure_all() {
+	mydistutilsargs=(
+		--cpp_implementation
+	)
+}
+
+python_install_all() {
+	distutils-r1_python_install_all
+
+	find "${ED}" -name "*.pth" -type f -delete || die
+}


             reply	other threads:[~2021-11-09 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 11:51 Arthur Zamarin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13  4:53 [gentoo-commits] repo/gentoo:master commit in: dev-python/protobuf-python/, dev-python/protobuf-python/files/ Sam James
2023-01-05 11:12 Michał Górny
2022-10-26 22:35 Sam James
2022-10-25 23:02 Sam James
2018-10-02 20:08 Mike Gilbert
2018-04-26 15:14 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1636458707.4772b88723f4162442835efabe7f886d58e10f39.arthurzam@gentoo \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox