summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-07 23:56:16 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-06-08 00:04:49 -0700
commit4e00d0a56ca1dd9be9d99a3d80a12d2f0b6b1cfc (patch)
tree734e13df675d4a9c7e6e30b64fe4493ca3d48f86 /dev-python/grpcio
parentwww-servers/uwsgi: arm stable (bug #718828) (diff)
downloadgentoo-4e00d0a56ca1dd9be9d99a3d80a12d2f0b6b1cfc.tar.gz
gentoo-4e00d0a56ca1dd9be9d99a3d80a12d2f0b6b1cfc.tar.bz2
gentoo-4e00d0a56ca1dd9be9d99a3d80a12d2f0b6b1cfc.zip
dev-python/grpcio: respect CC in setup.py
Upstream-PR: https://github.com/grpc/grpc/pull/23159 Bug: https://bugs.gentoo.org/727478 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-python/grpcio')
-rw-r--r--dev-python/grpcio/files/setup.py-respect-cc.patch33
-rw-r--r--dev-python/grpcio/grpcio-1.28.1.ebuild2
2 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/grpcio/files/setup.py-respect-cc.patch b/dev-python/grpcio/files/setup.py-respect-cc.patch
new file mode 100644
index 000000000000..545346e8152e
--- /dev/null
+++ b/dev-python/grpcio/files/setup.py-respect-cc.patch
@@ -0,0 +1,33 @@
+From 0a6c58fc0161e697bbf64b4f3d4ef14b03ac186b Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sun, 7 Jun 2020 23:35:31 -0700
+Subject: [PATCH] setup.py: respect CC variable in latomic test
+
+some configurations do not provide generic cc binary.
+while rest of the build calls CHOST prefixed binaries,
+this check fails. fix it.
+
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 2379703eb7..0f92270607 100644
+--- a/setup.py
++++ b/setup.py
+@@ -144,9 +144,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.27.0
+
diff --git a/dev-python/grpcio/grpcio-1.28.1.ebuild b/dev-python/grpcio/grpcio-1.28.1.ebuild
index 8fd8e8b73c1c..52d65ba9345c 100644
--- a/dev-python/grpcio/grpcio-1.28.1.ebuild
+++ b/dev-python/grpcio/grpcio-1.28.1.ebuild
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
"
+PATCHES=( "${FILESDIR}/setup.py-respect-cc.patch" )
+
python_configure_all() {
export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
export GRPC_PYTHON_BUILD_SYSTEM_CARES=1