* Minor rebase of fix-return-values.patch to apply cleanly. * Drop setting _default_patch_fuzz to 2 as all patches have been rebased to apply cleanly. OBS-URL: https://build.opensuse.org/package/show/network/python-grpcio?expand=0&rev=107
99 lines
3.4 KiB
RPMSpec
99 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package python-grpcio
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global modname grpcio
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-grpcio
|
|
Version: 1.76.0
|
|
Release: 0
|
|
Summary: HTTP/2-based Remote Procedure Call implementation
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://grpc.io
|
|
Source: https://files.pythonhosted.org/packages/source/g/grpcio/grpcio-%{version}.tar.gz
|
|
# PATCH-FIX-SLE xxhash-avoid-armv6-unaligned-access.patch alarrosa@suse.com -- do not expect unaligned accesses to work on armv6
|
|
Patch1: xxhash-avoid-armv6-unaligned-access.patch
|
|
# PATCH-FIX-SLE xxhash-ppc64le-gcc7.patch boo#1208794 alarrosa@suse.com -- fix build failure on ppc64le when using gcc 7
|
|
Patch2: xxhash-ppc64le-gcc7.patch
|
|
Patch3: fix-return-values.patch
|
|
BuildRequires: %{python_module Cython >= 3.0.0}
|
|
BuildRequires: %{python_module devel >= 3.9}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module protobuf >= 6.30 }
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module typing_extensions >= 4.13}
|
|
BuildRequires: %{python_module wheel >= 0.29}
|
|
BuildRequires: abseil-cpp-devel >= 20250127.0
|
|
BuildRequires: ca-certificates
|
|
BuildRequires: fdupes
|
|
%if 0%{?suse_version} < 1600
|
|
BuildRequires: gcc13
|
|
BuildRequires: gcc13-c++
|
|
%else
|
|
BuildRequires: gcc
|
|
BuildRequires: gcc-c++
|
|
%endif
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: pkgconfig(libcares)
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(re2)
|
|
BuildRequires: pkgconfig(zlib)
|
|
Requires: ca-certificates
|
|
Requires: python-typing_extensions >= 4.13
|
|
Recommends: python-enum34 >= 1.0.4
|
|
Recommends: python-futures >= 2.2.0
|
|
%python_subpackages
|
|
|
|
%description
|
|
gRPC is a remote procedure call (RPC) framework. gRPC enables client
|
|
and server applications to communicate, and enables the building of
|
|
connected systems.
|
|
|
|
%prep
|
|
%autosetup -p1 -n grpcio-%{version}
|
|
|
|
%build
|
|
%if 0%{?suse_version} < 1600
|
|
export CC=gcc-13
|
|
export CXX=g++-13
|
|
%endif
|
|
export GRPC_BUILD_WITH_BORING_SSL_ASM=false
|
|
export GRPC_PYTHON_BUILD_SYSTEM_ABSL=true
|
|
export GRPC_PYTHON_BUILD_SYSTEM_CARES=true
|
|
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true
|
|
export GRPC_PYTHON_BUILD_SYSTEM_RE2=true
|
|
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=true
|
|
export GRPC_PYTHON_BUILD_WITH_CYTHON=true
|
|
export GRPC_PYTHON_CFLAGS="%{optflags}"
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
# a symlink to the shared system certificates is used
|
|
%python_expand ln -sf %{_localstatedir}/lib/ca-certificates/ca-bundle.pem %{buildroot}%{$python_sitearch}/grpc/_cython/_credentials/roots.pem
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{python_sitearch}/grpc/
|
|
%{python_sitearch}/%{modname}-%{version}.dist-info
|
|
|
|
%changelog
|