diff options
Diffstat (limited to 'dev-python/protobuf-python')
6 files changed, 65 insertions, 11 deletions
diff --git a/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch b/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch new file mode 100644 index 000000000000..68318320b909 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-python-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch @@ -0,0 +1,22 @@ +https://github.com/protocolbuffers/protobuf/issues/6205 +https://github.com/protocolbuffers/protobuf/pull/7016 + +--- /python/google/protobuf/pyext/unknown_fields.cc ++++ /python/google/protobuf/pyext/unknown_fields.cc +@@ -277,13 +277,13 @@ + PyObject* data = NULL; + switch (field->type()) { + case UnknownField::TYPE_VARINT: +- data = PyInt_FromLong(field->varint()); ++ data = PyLong_FromUnsignedLongLong(field->varint()); + break; + case UnknownField::TYPE_FIXED32: +- data = PyInt_FromLong(field->fixed32()); ++ data = PyLong_FromUnsignedLong(field->fixed32()); + break; + case UnknownField::TYPE_FIXED64: +- data = PyInt_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.11.4.ebuild b/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild index 25568dc7f52a..f437b2cdbc0a 100644 --- a/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.11.4.ebuild @@ -3,7 +3,7 @@ EAPI="7" PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) -DISTUTILS_USE_SETUPTOOLS="manual" +DISTUTILS_USE_SETUPTOOLS="rdepend" inherit distutils-r1 @@ -30,7 +30,6 @@ IUSE="" BDEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV} dev-python/namespace-google[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}]" DEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV}" @@ -43,6 +42,15 @@ if [[ "${PV}" == "9999" ]]; then EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}" fi +python_prepare_all() { + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die + eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch" + eapply_user + popd > /dev/null || die + + distutils-r1_python_prepare_all +} + python_configure_all() { mydistutilsargs=(--cpp_implementation) } diff --git a/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild b/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild index 8fa95934c259..2d8e8aef7b07 100644 --- a/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.12.2.ebuild @@ -3,7 +3,7 @@ EAPI="7" PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) -DISTUTILS_USE_SETUPTOOLS="manual" +DISTUTILS_USE_SETUPTOOLS="rdepend" inherit distutils-r1 @@ -30,7 +30,6 @@ IUSE="" BDEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV} dev-python/namespace-google[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}]" DEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV}" @@ -43,6 +42,15 @@ if [[ "${PV}" == "9999" ]]; then EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}" fi +python_prepare_all() { + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die + eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch" + eapply_user + popd > /dev/null || die + + distutils-r1_python_prepare_all +} + python_configure_all() { mydistutilsargs=(--cpp_implementation) } diff --git a/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild b/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild index 4b2d3c1527db..e031479968b8 100644 --- a/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.12.4.ebuild @@ -3,7 +3,7 @@ EAPI="7" PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) -DISTUTILS_USE_SETUPTOOLS="manual" +DISTUTILS_USE_SETUPTOOLS="rdepend" inherit distutils-r1 @@ -24,13 +24,12 @@ fi LICENSE="BSD" SLOT="0/23" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" IUSE="" BDEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV} dev-python/namespace-google[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}]" DEPEND="${PYTHON_DEPS} ~dev-libs/protobuf-${PV}" @@ -43,6 +42,15 @@ if [[ "${PV}" == "9999" ]]; then EGIT_CHECKOUT_DIR="${WORKDIR}/protobuf-${PV}" fi +python_prepare_all() { + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die + eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch" + eapply_user + popd > /dev/null || die + + distutils-r1_python_prepare_all +} + python_configure_all() { mydistutilsargs=(--cpp_implementation) } diff --git a/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild b/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild index 88bd7b0ddad7..c5d593dd8c5b 100644 --- a/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild +++ b/dev-python/protobuf-python/protobuf-python-3.13.0.ebuild @@ -2,9 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" - -DISTUTILS_USE_SETUPTOOLS=rdepend PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) +DISTUTILS_USE_SETUPTOOLS="rdepend" inherit distutils-r1 @@ -44,6 +43,11 @@ if [[ "${PV}" == "9999" ]]; then fi python_prepare_all() { + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die + eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch" + eapply_user + popd > /dev/null || die + distutils-r1_python_prepare_all sed -e "/^[[:space:]]*setup_requires = \['wheel'\],$/d" -i setup.py || die diff --git a/dev-python/protobuf-python/protobuf-python-9999.ebuild b/dev-python/protobuf-python/protobuf-python-9999.ebuild index 65fd540c9796..c081829379e0 100644 --- a/dev-python/protobuf-python/protobuf-python-9999.ebuild +++ b/dev-python/protobuf-python/protobuf-python-9999.ebuild @@ -2,9 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 EAPI="7" - -DISTUTILS_USE_SETUPTOOLS=rdepend PYTHON_COMPAT=( python2_7 python3_{5,6,7,8,9} ) +DISTUTILS_USE_SETUPTOOLS="rdepend" inherit distutils-r1 @@ -44,6 +43,11 @@ if [[ "${PV}" == "9999" ]]; then fi python_prepare_all() { + pushd "${WORKDIR}/protobuf-${PV}" > /dev/null || die + eapply "${FILESDIR}/${PN}-3.13.0-google.protobuf.pyext._message.PyUnknownFieldRef.patch" + eapply_user + popd > /dev/null || die + distutils-r1_python_prepare_all sed -e "/^[[:space:]]*setup_requires = \['wheel'\],$/d" -i setup.py || die |
