* [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/
@ 2021-06-05 21:33 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-06-05 21:33 UTC (permalink / raw
To: gentoo-commits
commit: 0948d90764a5bb3ae06b549eb4a2271b8fdfaa88
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 5 21:30:12 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 5 21:33:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0948d907
dev-python/grpcio: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/grpcio/Manifest | 1 -
...up.py-respect-CC-variable-in-latomic-test.patch | 28 --------------
dev-python/grpcio/grpcio-1.32.0-r1.ebuild | 45 ----------------------
3 files changed, 74 deletions(-)
diff --git a/dev-python/grpcio/Manifest b/dev-python/grpcio/Manifest
index f46500fde60..3962d984650 100644
--- a/dev-python/grpcio/Manifest
+++ b/dev-python/grpcio/Manifest
@@ -1,3 +1,2 @@
-DIST grpcio-1.32.0.tar.gz 20809917 BLAKE2B e28cb44d09fd775b9b6dc87dcd52bf7f144643b09912ff8b76bf39cb250743f90bc7e3769252d47f205f9532157ae68b6ac0a9202158cb14e7b9ad448d951656 SHA512 f802a7b83bd166502fdcbfaf162652adcda36da1b2e91b5073e3b3d97d38191fe989a6dcbec6c1bf27fff162633e54bdbdb20a92e74e14280fac4576baa92157
DIST grpcio-1.37.1.tar.gz 21678919 BLAKE2B ea1c9a1ce1d888d0e9aca27a9e12ebcaca5c79b6f70a282e4e9a12a4aba982c2cef3f755cc2e789de2302071ce3abf12c91f329febd04159b3c8abded96818d5 SHA512 e7697a6d0da40b7d63be7f4f31223d2314bf16fcab8887a41bc4750c844a58ad55fd27fca0a9f1016fc725076a16c3b2db5a9eb040a86a2acb9f45083835d90e
DIST grpcio-1.38.0.tar.gz 21391828 BLAKE2B efbbf42ad4e67a2c39369c47f345b2a823427341f3e535737d28ff4061941bc649bca179cab84ff5457bab2ccef49146fd2cf7daeb0cae7303e47f192f250feb SHA512 7def460f1a96df65b99fae8aa149428286002aecd14242f62885622fda1568f2d44fc69c3bea28cd1568e3eaa46f03b0fbfda2a9cee23e1e5dfb44ac99ffe597
diff --git a/dev-python/grpcio/files/1.32.0-setup.py-respect-CC-variable-in-latomic-test.patch b/dev-python/grpcio/files/1.32.0-setup.py-respect-CC-variable-in-latomic-test.patch
deleted file mode 100644
index c6729e9808b..00000000000
--- a/dev-python/grpcio/files/1.32.0-setup.py-respect-CC-variable-in-latomic-test.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c8e7e1c3cd55bf44b6fad6afa716dec9de3bf14f Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Fri, 25 Sep 2020 15:34:19 -0700
-Subject: [PATCH] setup.py: respect CC variable in latomic test
-
----
- setup.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 20a6d76..d1cd707 100644
---- a/setup.py
-+++ b/setup.py
-@@ -164,9 +164,10 @@ ENABLE_DOCUMENTATION_BUILD = os.environ.get(
-
- def check_linker_need_libatomic():
- """Test if linker on system needs libatomic."""
-+ cc = os.environ.get('CC', 'cc')
- code_test = (b'#include <atomic>\n' +
- b'int main() { return std::atomic<int64_t>{}; }')
-- cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'],
-+ cc_test = subprocess.Popen([cc, '-x', 'c++', '-std=c++11', '-'],
- stdin=PIPE,
- stdout=PIPE,
- stderr=PIPE)
---
-2.28.0
-
diff --git a/dev-python/grpcio/grpcio-1.32.0-r1.ebuild b/dev-python/grpcio/grpcio-1.32.0-r1.ebuild
deleted file mode 100644
index c9c963aa55e..00000000000
--- a/dev-python/grpcio/grpcio-1.32.0-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1 multiprocessing prefix
-
-DESCRIPTION="High-performance RPC framework (python libraries)"
-HOMEPAGE="https://grpc.io"
-SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
-
-RDEPEND="
- >=dev-libs/openssl-1.0.2:0=[-bindist]
- >=dev-python/cython-0.28.3[${PYTHON_USEDEP}]
- dev-python/protobuf-python[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
- net-dns/c-ares:=
- sys-libs/zlib:=
-"
-
-DEPEND="${RDEPEND}"
-
-PATCHES=( "${FILESDIR}/1.32.0-setup.py-respect-CC-variable-in-latomic-test.patch" )
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
- hprefixify setup.py
-}
-
-python_configure_all() {
- # os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', True)
- export GRPC_BUILD_WITH_BORING_SSL_ASM=
- export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
- export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
- export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
- export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
- export GRPC_PYTHON_BUILD_WITH_CYTHON=1
- export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/
@ 2021-06-15 2:50 Georgy Yakovlev
0 siblings, 0 replies; 5+ messages in thread
From: Georgy Yakovlev @ 2021-06-15 2:50 UTC (permalink / raw
To: gentoo-commits
commit: a275799528a1109e58d7191ead0959a8a570cd7a
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 15 02:49:59 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jun 15 02:50:43 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2757995
dev-python/grpcio: don't pass gnu99 to cxx
Closes: https://bugs.gentoo.org/730228
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../grpcio/files/1.37.1-cc-flag-test-fix.patch | 26 ++++++++++++++++
dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch | 35 ++++++++++++++++++++++
dev-python/grpcio/grpcio-1.37.1.ebuild | 5 ++++
dev-python/grpcio/grpcio-1.38.0.ebuild | 2 ++
4 files changed, 68 insertions(+)
diff --git a/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch b/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch
new file mode 100644
index 00000000000..0869c57dd11
--- /dev/null
+++ b/dev-python/grpcio/files/1.37.1-cc-flag-test-fix.patch
@@ -0,0 +1,26 @@
+From c21ddf679bf46c0a13046060f17d7a87608923e3 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 14 Jun 2021 19:38:37 -0700
+Subject: [PATCH] fix cc flag test
+
+---
+ src/python/grpcio/commands.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
+index df8fc46..de71ea5 100644
+--- a/src/python/grpcio/commands.py
++++ b/src/python/grpcio/commands.py
+@@ -234,7 +234,8 @@ class BuildExt(build_ext.build_ext):
+ """
+ try:
+ # TODO(lidiz) Remove the generated a.out for success tests.
+- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'],
++ cc = os.environ.get('CC', 'cc')
++ cc_test = subprocess.Popen([cc, '-x', 'c', '-std=c++11', '-'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+--
+2.32.0
+
diff --git a/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch b/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch
new file mode 100644
index 00000000000..71e02eafeb6
--- /dev/null
+++ b/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch
@@ -0,0 +1,35 @@
+From 05ae3c5a87ba1037bd4c7a94e6b574c8df847065 Mon Sep 17 00:00:00 2001
+From: Lidi Zheng <lidiz@google.com>
+Date: Tue, 6 Apr 2021 06:50:40 -0700
+Subject: [PATCH] Remove -std=gnu99 CFlag when compiling C++ with clang
+ (#25778)
+
+* Remove -std=gnu99 CFlag when compiling C++ with clang
+
+* Use endswith instead of hard-coded slices
+
+* Fix a typo
+---
+ src/python/grpcio/commands.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
+index f4a3d2bdc041..df8fc46a3cad 100644
+--- a/src/python/grpcio/commands.py
++++ b/src/python/grpcio/commands.py
+@@ -258,10 +258,14 @@ def compiler_ok_with_extra_std():
+ old_compile = self.compiler._compile
+
+ def new_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
+- if src[-2:] == '.c':
++ if src.endswith('.c'):
+ extra_postargs = [
+ arg for arg in extra_postargs if not '-std=c++' in arg
+ ]
++ elif src.endswith('.cc') or src.endswith('.cpp'):
++ extra_postargs = [
++ arg for arg in extra_postargs if not '-std=gnu99' in arg
++ ]
+ return old_compile(obj, src, ext, cc_args, extra_postargs,
+ pp_opts)
+
diff --git a/dev-python/grpcio/grpcio-1.37.1.ebuild b/dev-python/grpcio/grpcio-1.37.1.ebuild
index 9516150c799..4c178de93a2 100644
--- a/dev-python/grpcio/grpcio-1.37.1.ebuild
+++ b/dev-python/grpcio/grpcio-1.37.1.ebuild
@@ -27,6 +27,11 @@ RDEPEND="
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/1.37.1-cxx-no-gnu99.patch"
+ "${FILESDIR}/1.37.1-cc-flag-test-fix.patch"
+)
+
python_prepare_all() {
distutils-r1_python_prepare_all
hprefixify setup.py
diff --git a/dev-python/grpcio/grpcio-1.38.0.ebuild b/dev-python/grpcio/grpcio-1.38.0.ebuild
index 9a037a3b070..016123e4194 100644
--- a/dev-python/grpcio/grpcio-1.38.0.ebuild
+++ b/dev-python/grpcio/grpcio-1.38.0.ebuild
@@ -27,6 +27,8 @@ RDEPEND="
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/1.37.1-cc-flag-test-fix.patch" )
+
python_prepare_all() {
distutils-r1_python_prepare_all
hprefixify setup.py
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/
@ 2021-07-25 8:41 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-07-25 8:41 UTC (permalink / raw
To: gentoo-commits
commit: 13eb84ad4527eb76abeb19745499cc0280620f5d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 25 06:55:24 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 25 08:41:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13eb84ad
dev-python/grpcio: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/grpcio/Manifest | 1 -
dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch | 35 ----------------
dev-python/grpcio/grpcio-1.37.1-r1.ebuild | 50 -----------------------
3 files changed, 86 deletions(-)
diff --git a/dev-python/grpcio/Manifest b/dev-python/grpcio/Manifest
index 982c9eebc3f..4da9bd27415 100644
--- a/dev-python/grpcio/Manifest
+++ b/dev-python/grpcio/Manifest
@@ -1,2 +1 @@
-DIST grpcio-1.37.1.tar.gz 21678919 BLAKE2B ea1c9a1ce1d888d0e9aca27a9e12ebcaca5c79b6f70a282e4e9a12a4aba982c2cef3f755cc2e789de2302071ce3abf12c91f329febd04159b3c8abded96818d5 SHA512 e7697a6d0da40b7d63be7f4f31223d2314bf16fcab8887a41bc4750c844a58ad55fd27fca0a9f1016fc725076a16c3b2db5a9eb040a86a2acb9f45083835d90e
DIST grpcio-1.38.1.tar.gz 21392075 BLAKE2B 92f1ad9e119fe346bc1f8f10ffe7067fb736c975ecd276eb8ab37a3b25d0a818fff76cec164db5745ac157ba7b94b841c6e66bb332d9f3b2c08974cab415a973 SHA512 c4f831ee654eec78f01c099fa5a6d9dc7e9551b1db5e5c89e3b8bd4e5c3bae622aee32cac9212bb60bc1baec98e4a49f8e18c0043bc90d1144729dee337072f9
diff --git a/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch b/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch
deleted file mode 100644
index 71e02eafeb6..00000000000
--- a/dev-python/grpcio/files/1.37.1-cxx-no-gnu99.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 05ae3c5a87ba1037bd4c7a94e6b574c8df847065 Mon Sep 17 00:00:00 2001
-From: Lidi Zheng <lidiz@google.com>
-Date: Tue, 6 Apr 2021 06:50:40 -0700
-Subject: [PATCH] Remove -std=gnu99 CFlag when compiling C++ with clang
- (#25778)
-
-* Remove -std=gnu99 CFlag when compiling C++ with clang
-
-* Use endswith instead of hard-coded slices
-
-* Fix a typo
----
- src/python/grpcio/commands.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
-index f4a3d2bdc041..df8fc46a3cad 100644
---- a/src/python/grpcio/commands.py
-+++ b/src/python/grpcio/commands.py
-@@ -258,10 +258,14 @@ def compiler_ok_with_extra_std():
- old_compile = self.compiler._compile
-
- def new_compile(obj, src, ext, cc_args, extra_postargs, pp_opts):
-- if src[-2:] == '.c':
-+ if src.endswith('.c'):
- extra_postargs = [
- arg for arg in extra_postargs if not '-std=c++' in arg
- ]
-+ elif src.endswith('.cc') or src.endswith('.cpp'):
-+ extra_postargs = [
-+ arg for arg in extra_postargs if not '-std=gnu99' in arg
-+ ]
- return old_compile(obj, src, ext, cc_args, extra_postargs,
- pp_opts)
-
diff --git a/dev-python/grpcio/grpcio-1.37.1-r1.ebuild b/dev-python/grpcio/grpcio-1.37.1-r1.ebuild
deleted file mode 100644
index 4a41d63de85..00000000000
--- a/dev-python/grpcio/grpcio-1.37.1-r1.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-inherit distutils-r1 multiprocessing prefix
-
-DESCRIPTION="High-performance RPC framework (python libraries)"
-HOMEPAGE="https://grpc.io"
-SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
-
-RDEPEND="
- >=dev-libs/openssl-1.0.2:0=[-bindist(-)]
- >=dev-libs/re2-0.2021.04.01:=
- >=dev-python/cython-0.28.3[${PYTHON_USEDEP}]
- dev-python/protobuf-python[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
- net-dns/c-ares:=
- sys-libs/zlib:=
-"
-
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}/1.37.1-cxx-no-gnu99.patch"
- "${FILESDIR}/1.37.1-cc-flag-test-fix.patch"
-)
-
-python_prepare_all() {
- distutils-r1_python_prepare_all
- hprefixify setup.py
-}
-
-python_configure_all() {
- # os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', True)
- export GRPC_BUILD_WITH_BORING_SSL_ASM=
- export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
- export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
- export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
- export GRPC_PYTHON_BUILD_WITH_SYSTEM_RE2=1
- export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
- export GRPC_PYTHON_BUILD_WITH_CYTHON=1
- export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/
@ 2022-11-28 22:21 Georgy Yakovlev
0 siblings, 0 replies; 5+ messages in thread
From: Georgy Yakovlev @ 2022-11-28 22:21 UTC (permalink / raw
To: gentoo-commits
commit: 0ff6a32f5ca325f48d9a7ffab4ce59ec523d5813
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 22:10:04 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 22:21:30 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ff6a32f
dev-python/grpcio: re-add CC patch in 1.51.0
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-python/grpcio/files/1.51.0-respect-cc.patch | 28 +++++++++++++++++++++++++
dev-python/grpcio/grpcio-1.51.0.ebuild | 2 +-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/dev-python/grpcio/files/1.51.0-respect-cc.patch b/dev-python/grpcio/files/1.51.0-respect-cc.patch
new file mode 100644
index 000000000000..8a2c8313aa8f
--- /dev/null
+++ b/dev-python/grpcio/files/1.51.0-respect-cc.patch
@@ -0,0 +1,28 @@
+From 209e9e0c21dd5bdf62d943dfd9caca40565734b5 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Mon, 28 Nov 2022 14:08:17 -0800
+Subject: [PATCH] respect CC variable
+
+https://github.com/grpc/grpc/pull/26480
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ src/python/grpcio/commands.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
+index 58ab57be47..6d8228ffa0 100644
+--- a/src/python/grpcio/commands.py
++++ b/src/python/grpcio/commands.py
+@@ -228,7 +228,8 @@ class BuildExt(build_ext.build_ext):
+ """
+ try:
+ # TODO(lidiz) Remove the generated a.out for success tests.
+- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++14', '-'],
++ cc = os.environ.get('CC', 'cc')
++ cc_test = subprocess.Popen([cc, '-x', 'c', '-std=c++14', '-'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+--
+2.38.1
+
diff --git a/dev-python/grpcio/grpcio-1.51.0.ebuild b/dev-python/grpcio/grpcio-1.51.0.ebuild
index e0957a3fca22..316ccdb61a70 100644
--- a/dev-python/grpcio/grpcio-1.51.0.ebuild
+++ b/dev-python/grpcio/grpcio-1.51.0.ebuild
@@ -28,7 +28,7 @@ RDEPEND="
DEPEND="${RDEPEND}"
-PATCHES=( "${FILESDIR}/1.37.1-cc-flag-test-fix.patch" )
+PATCHES=( "${FILESDIR}/1.51.0-respect-cc.patch" )
python_prepare_all() {
distutils-r1_python_prepare_all
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/
@ 2023-11-06 14:40 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-11-06 14:40 UTC (permalink / raw
To: gentoo-commits
commit: d6f68f48a5d578608b07ec63017a0a23c80c9017
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 6 14:39:35 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 6 14:39:50 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6f68f48
dev-python/grpcio: fix cython-3 compat
Closes: https://bugs.gentoo.org/911370
Closes: https://bugs.gentoo.org/905740
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-python/grpcio/files/1.51.0-cython3.patch | 150 +++++++++++++++++++++++++++
dev-python/grpcio/grpcio-1.51.0-r1.ebuild | 50 +++++++++
2 files changed, 200 insertions(+)
diff --git a/dev-python/grpcio/files/1.51.0-cython3.patch b/dev-python/grpcio/files/1.51.0-cython3.patch
new file mode 100644
index 000000000000..97e70e150455
--- /dev/null
+++ b/dev-python/grpcio/files/1.51.0-cython3.patch
@@ -0,0 +1,150 @@
+https://bugs.gentoo.org/911370
+https://github.com/grpc/grpc/issues/33918#issuecomment-1703386656
+https://github.com/grpc/grpc/issues/33918#issuecomment-1788823585
+https://github.com/grpc/grpc/pull/34242
+https://src.fedoraproject.org/rpms/grpc/blob/8bf11b8c20d2c54dcf7b88777d7590237b6b0555/f/0001-Specify-noexcept-for-cdef-functions.patch
+
+From 45d31dba83999638808891ee7bf93638106bdb71 Mon Sep 17 00:00:00 2001
+From: Atri Bhattacharya <badshah400@gmail.com>
+Date: Thu, 7 Sep 2023 07:06:56 +0200
+Subject: [PATCH] Specify noexcept for cdef functions.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To build against cython 3.0, cdef functions that do not raise exceptions
+need to be explicitly declared as noexcept. Fixes issue #33918.
+
+Co-Authored-By: Miro HronĨok <miro@hroncok.cz>
+---
+ .../grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi | 2 +-
+ .../grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi | 2 +-
+ .../grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi | 2 +-
+ .../grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi | 12 ++++++------
+ .../grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi | 6 +++---
+ .../grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi | 6 +++---
+ 6 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
+index e54e510..26edbdb 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pxd.pxi
+@@ -48,7 +48,7 @@ cdef class CallbackWrapper:
+ @staticmethod
+ cdef void functor_run(
+ grpc_completion_queue_functor* functor,
+- int succeed)
++ int succeed) noexcept
+
+ cdef grpc_completion_queue_functor *c_functor(self)
+
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+index f2d94a9..5dda90a 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+@@ -50,7 +50,7 @@ cdef class CallbackWrapper:
+ @staticmethod
+ cdef void functor_run(
+ grpc_completion_queue_functor* functor,
+- int success):
++ int success) noexcept:
+ cdef CallbackContext *context = <CallbackContext *>functor
+ cdef object waiter = <object>context.waiter
+ if not waiter.cancelled():
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+index 23de3a0..52071f5 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+@@ -314,7 +314,7 @@ def server_credentials_ssl_dynamic_cert_config(initial_cert_config,
+ return credentials
+
+ cdef grpc_ssl_certificate_config_reload_status _server_cert_config_fetcher_wrapper(
+- void* user_data, grpc_ssl_server_certificate_config **config) with gil:
++ void* user_data, grpc_ssl_server_certificate_config **config) noexcept with gil:
+ # This is a credentials.ServerCertificateConfig
+ cdef ServerCertificateConfig cert_config = None
+ if not user_data:
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
+index a925bdd..5e97a6d 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pxd.pxi
+@@ -15,15 +15,15 @@
+
+ cdef extern from "pthread.h" nogil:
+ int pthread_atfork(
+- void (*prepare)() nogil,
+- void (*parent)() nogil,
+- void (*child)() nogil)
++ void (*prepare)() noexcept nogil,
++ void (*parent)() noexcept nogil,
++ void (*child)() noexcept nogil) noexcept
+
+
+-cdef void __prefork() nogil
++cdef void __prefork() noexcept nogil
+
+
+-cdef void __postfork_parent() nogil
++cdef void __postfork_parent() noexcept nogil
+
+
+-cdef void __postfork_child() nogil
+\ No newline at end of file
++cdef void __postfork_child() noexcept nogil
+\ No newline at end of file
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
+index 53657e8..d4d1cff 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/fork_posix.pyx.pxi
+@@ -34,7 +34,7 @@ _GRPC_ENABLE_FORK_SUPPORT = (
+
+ _fork_handler_failed = False
+
+-cdef void __prefork() nogil:
++cdef void __prefork() noexcept nogil:
+ with gil:
+ global _fork_handler_failed
+ _fork_handler_failed = False
+@@ -48,14 +48,14 @@ cdef void __prefork() nogil:
+ _fork_handler_failed = True
+
+
+-cdef void __postfork_parent() nogil:
++cdef void __postfork_parent() noexcept nogil:
+ with gil:
+ with _fork_state.fork_in_progress_condition:
+ _fork_state.fork_in_progress = False
+ _fork_state.fork_in_progress_condition.notify_all()
+
+
+-cdef void __postfork_child() nogil:
++cdef void __postfork_child() noexcept nogil:
+ with gil:
+ try:
+ if _fork_handler_failed:
+diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
+index da4b81b..f594100 100644
+--- a/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
++++ b/src/python/grpcio/grpc/_cython/_cygrpc/vtable.pyx.pxi
+@@ -13,16 +13,16 @@
+ # limitations under the License.
+
+ # TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
+-cdef void* _copy_pointer(void* pointer):
++cdef void* _copy_pointer(void* pointer) noexcept:
+ return pointer
+
+
+ # TODO(https://github.com/grpc/grpc/issues/15662): Reform this.
+-cdef void _destroy_pointer(void* pointer):
++cdef void _destroy_pointer(void* pointer) noexcept:
+ pass
+
+
+-cdef int _compare_pointer(void* first_pointer, void* second_pointer):
++cdef int _compare_pointer(void* first_pointer, void* second_pointer) noexcept:
+ if first_pointer < second_pointer:
+ return -1
+ elif first_pointer > second_pointer:
+--
+2.41.0
diff --git a/dev-python/grpcio/grpcio-1.51.0-r1.ebuild b/dev-python/grpcio/grpcio-1.51.0-r1.ebuild
new file mode 100644
index 000000000000..3fd7cdbe2a7f
--- /dev/null
+++ b/dev-python/grpcio/grpcio-1.51.0-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1 multiprocessing prefix pypi
+
+DESCRIPTION="High-performance RPC framework (python libraries)"
+HOMEPAGE="https://grpc.io"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv x86"
+
+RDEPEND="
+ >=dev-libs/openssl-1.1.1:0=[-bindist(-)]
+ >=dev-libs/re2-0.2021.11.01:=
+ <dev-python/protobuf-python-5[${PYTHON_USEDEP}]
+ >=dev-python/protobuf-python-4.21.3[${PYTHON_USEDEP}]
+ net-dns/c-ares:=
+ sys-libs/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-python/cython[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}/1.51.0-respect-cc.patch"
+ "${FILESDIR}/1.51.0-cython3.patch"
+)
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ hprefixify setup.py
+}
+
+python_configure_all() {
+ # os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', True)
+ export GRPC_BUILD_WITH_BORING_SSL_ASM=
+ export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
+ export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
+ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
+ export GRPC_PYTHON_BUILD_WITH_SYSTEM_RE2=1
+ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
+ export GRPC_PYTHON_BUILD_WITH_CYTHON=1
+ export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$(makeopts_jobs)"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-06 14:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-28 22:21 [gentoo-commits] repo/gentoo:master commit in: dev-python/grpcio/, dev-python/grpcio/files/ Georgy Yakovlev
-- strict thread matches above, loose matches on Subject: below --
2023-11-06 14:40 Sam James
2021-07-25 8:41 Michał Górny
2021-06-15 2:50 Georgy Yakovlev
2021-06-05 21:33 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox