From 637ef6452b81a19681bf6e5280cf7c5fb6522ce8 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Fri, 14 Dec 2018 22:51:14 +0300 Subject: [PATCH] Update to 1.17.1 and add python bindings --- .gitignore | 3 +++ grpc.spec | 33 ++++++++++++++++++++++++++++++++- sources | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9f2cdaf..6f31de4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ +/*.src.rpm +/results_grpc /grpc-1.17.0.tar.gz +/grpc-1.17.1.tar.gz diff --git a/grpc.spec b/grpc.spec index 50c6c95..d683e9b 100644 --- a/grpc.spec +++ b/grpc.spec @@ -1,5 +1,5 @@ Name: grpc -Version: 1.17.0 +Version: 1.17.1 Release: 1%{?dist} Summary: Modern, open source, high-performance remote procedure call (RPC) framework License: ASL 2.0 @@ -14,6 +14,12 @@ BuildRequires: openssl-devel BuildRequires: c-ares-devel BuildRequires: gflags-devel BuildRequires: gtest-devel +BuildRequires: zlib-devel +BuildRequires: gperftools-devel + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-Cython Patch0: 0001-enforce-system-crypto-policies.patch # https://github.com/grpc/grpc/pull/15532 @@ -62,6 +68,14 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development headers and files for gRPC libraries. +%package -n python3-grpcio +Summary: Python language bindings for grpc, remote procedure call (RPC) framework +Requires: %{name}%{?_isa} = %{version}-%{release} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-grpcio +Python3 bindings for gRPC library. + %prep %autosetup -p1 sed -i 's:^prefix ?= .*:prefix ?= %{_prefix}:' Makefile @@ -71,10 +85,19 @@ sed -i 's:^GTEST_LIB =.*::' Makefile %build %make_build shared plugins +# build python module +export GRPC_PYTHON_BUILD_WITH_CYTHON=True +export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=True +export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True +export GRPC_PYTHON_BUILD_SYSTEM_CARES=True +export CFLAGS="%optflags" +%py3_build + %install make install prefix="%{buildroot}%{_prefix}" make install-grpc-cli prefix="%{buildroot}%{_prefix}" find %{buildroot} -type f -name '*.a' -exec rm -f {} \; +%py3_install %ldconfig_scriptlets @@ -100,6 +123,14 @@ find %{buildroot} -type f -name '*.a' -exec rm -f {} \; %{_includedir}/grpc++ %{_includedir}/grpcpp +%files -n python3-grpcio +%license LICENSE +%{python3_sitearch}/grpc +%{python3_sitearch}/grpcio-%{version}-py?.?.egg-info + %changelog +* Fri Dec 14 2018 Sergey Avseyev - 1.17.1-1 +- Update to 1.17.1 and package python bindings + * Fri Dec 07 2018 Sergey Avseyev - 1.17.0-1 - Initial revision diff --git a/sources b/sources index 0387f88..c948bf9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (grpc-1.17.0.tar.gz) = c1c6a1c668975e454abd36fa13550ffd40e04e752a2a5090541463c20683ad9382052d22874115f2772ad9c0dda74c4dfb1835176b07ea69a1b99186afeb5cf7 +SHA512 (grpc-1.17.1.tar.gz) = 45ba731fd4d1bc3cf590511e53ea6a73de6970f4bb379eb0ef90d550cdc13358f673ead8c6877c02c71dccdba914ad4765c58e173e0dd7895b5d25ebbad38e8e