Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
Date: Wed, 29 Apr 2026 20:42:21 +0800
Subject: [PATCH] Force system libraries in isolated environments.

---
setup.py | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/setup.py b/setup.py
index f02499a..44b10d1 100644
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,14 @@ import sysconfig
from setuptools import Extension
from setuptools.command import egg_info

+# Force system libraries in isolated environments.
+os.environ["GRPC_PYTHON_BUILD_SYSTEM_ABSL"] = "1"
+os.environ["GRPC_PYTHON_BUILD_SYSTEM_OPENSSL"] = "1"
+os.environ["GRPC_PYTHON_BUILD_SYSTEM_ZLIB"] = "1"
+os.environ["GRPC_PYTHON_BUILD_SYSTEM_RE2"] = "1"
+os.environ["GRPC_PYTHON_BUILD_SYSTEM_CARES"] = "1"
+os.environ["GRPC_PYTHON_BUILD_WITH_CYTHON"] = "1"
+
# Redirect the manifest template from MANIFEST.in to PYTHON-MANIFEST.in.
egg_info.manifest_maker.template = "PYTHON-MANIFEST.in"

--
2.53.0

55 changes: 0 additions & 55 deletions SPECS/grpc/add-missing-includes.patch

This file was deleted.

32 changes: 14 additions & 18 deletions SPECS/grpc/grpc.spec
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
# SPDX-FileCopyrightText: (C) 2025, 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2025, 2026 openRuyi Project Contributors
# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
# SPDX-FileContributor: Zheng Junjie <zhengjunjie@iscas.ac.cn>
# SPDX-FileContributor: yyjeqhc <jialin.oerv@isrc.iscas.ac.cn>
# SPDX-FileContributor: misaka00251 <liuxin@iscas.ac.cn>
# SPDX-FileContributor: purofle <yuguo.or@isrc.iscas.ac.cn>
# SPDX-FileContributor: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

Name: grpc
Version: 1.76.0
Version: 1.80.0
Release: %autorelease
Summary: An HTTP/2-based Remote Procedure Call framework
License: Apache-2.0
URL: https://grpc.io/
VCS: git:https://github.com/grpc/grpc
#!RemoteAsset
#!RemoteAsset: sha256:38f58596277fa632064cc0719b9ece4381c8c77461cb51e9b66ca149574b7865
Source: https://github.com/grpc/grpc/archive/refs/tags/v%{version}.tar.gz
BuildSystem: cmake

# From openSUSE:Factory:RISCV/grpc to fix unresolved deps: pkgconfig(opentelemetry_api)
Patch0: telemetry.patch
# From https://github.com/grpc/grpc/pull/41351
Patch1: add-missing-includes.patch
Patch2000: 2000-force-system-libraries-in-isolated-environments.patch

BuildOption(conf): -DgRPC_INSTALL:BOOL=ON
BuildOption(conf): -DgRPC_INSTALL_LIBDIR:PATH="%_lib"
Expand Down Expand Up @@ -59,10 +57,11 @@ BuildRequires: python3dist(setuptools)
gRPC is a modern, open source, high-performance Remote Procedure Call (RPC)
framework that can run in any environment.

%package -n python-grpcio
%package -n python-grpcio
Summary: Python bindings for gRPC
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: python3-grpcio
Provides: python3-grpcio%{?_isa} = %{version}-%{release}
Provides: python3-grpcio = %{version}-%{release}
%python_provide python3-grpcio

%description -n python-grpcio
Expand All @@ -82,13 +81,11 @@ develop applications that use the gRPC framework.
find . -type f -regex ".*\.py\|.*\.sh" -exec sed -i -e 's|/usr/bin/env python.*|/usr/bin/python3|' -e 's|/usr/bin/python.*|/usr/bin/python3|' {} +
rm -Rf third_party/abseil-cpp/

# Fixing a bug in gRPC 1.78+ where upstream source files are hard-coded (Issue #41696)
mkdir -p third_party/abseil-cpp/absl/log/
touch third_party/abseil-cpp/absl/log/initialize.cc

%build -a
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 GRPC_PYTHON_BUILD_SYSTEM_RE2='True'
export GRPC_PYTHON_BUILD_SYSTEM_ABSL='True'
%pyproject_wheel

%install -a
Expand Down Expand Up @@ -117,9 +114,8 @@ rm -Rf %{buildroot}%{_datadir}/grpc/*.pem
%{_libdir}/pkgconfig/grpc++_unsecure.pc
%{_libdir}/pkgconfig/grpc.pc
%{_libdir}/pkgconfig/grpc_unsecure.pc
%{_libdir}/pkgconfig/grpcpp_otel_plugin.pc
%dir %{_libdir}/cmake
%{_libdir}/cmake/grpc/

%changelog
%{?autochangelog}
%autochangelog
22 changes: 0 additions & 22 deletions SPECS/grpc/telemetry.patch

This file was deleted.

41 changes: 41 additions & 0 deletions SPECS/python-fakeredis/python-fakeredis.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname fakeredis

Name: python-%{srcname}
Version: 2.35.1
Release: %autorelease
Summary: Python implementation of redis API
License: BSD-3-Clause
URL: https://github.com/cunla/fakeredis-py
#!RemoteAsset: sha256:5bae5eba7b9d93cb968944ac40936373cf2397ff71667d4b595df65c3d2e413f
Source0: https://files.pythonhosted.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject

BuildOption(install): -l %{srcname}

BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(lupa)

Provides: python3-%{srcname} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
FakeRedis is a pure-Python implementation of the Redis Protocol API.
It provides enhanced versions of the redis-py/valkey-py Python bindings for Redis.

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.md
%license LICENSE

%changelog
%autochangelog
41 changes: 41 additions & 0 deletions SPECS/python-grpcio-reflection/python-grpcio-reflection.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname grpcio-reflection
%global pypi_name grpcio_reflection

Name: python-%{srcname}
Version: 1.80.0
Release: %autorelease
Summary: Standard Protobuf Reflection Service for gRPC
License: Apache-2.0
URL: https://grpc.io/
VCS: git:https://github.com/grpc/grpc
#!RemoteAsset: sha256:e9c76aabc4324279945b70bc76a3d41bc4f9396bffcf1cfc1011a571c2c56221
Source0: https://files.pythonhosted.org/packages/source/g/%{srcname}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject

BuildOption(install): -l grpc_reflection

BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)

Provides: python3-%{srcname} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
Standard Protobuf Reflection Service for gRPC.

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.rst
%license LICENSE

%changelog
%autochangelog
41 changes: 41 additions & 0 deletions SPECS/python-lupa/python-lupa.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname lupa

Name: python-%{srcname}
Version: 2.8
Release: %autorelease
Summary: Python wrapper around Lua and LuaJIT
License: MIT
URL: https://github.com/scoder/lupa
#!RemoteAsset: sha256:d8022641b9ec8ecf2c5ecbe9f47e5a70e0b87c4b5ae921b92cb02a638e0acd08
Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz
BuildSystem: pyproject

BuildOption(install): -l %{srcname}

BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)

Provides: python3-%{srcname} = %{version}-%{release}
Provides: python3-%{srcname}%{?_isa} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
Lupa integrates the runtimes of Lua or LuaJIT2 into CPython.
It is a partial rewrite of LunaticPython in Cython with some
additional features such as proper coroutine support.

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.rst
%license LICENSE.txt

%changelog
%autochangelog
47 changes: 47 additions & 0 deletions SPECS/python-optuna/python-optuna.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: Li Guan <guanli.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

%global srcname optuna

Name: python-%{srcname}
Version: 4.8.0
Release: %autorelease
Summary: A hyperparameter optimization framework
License: MIT
URL: https://github.com/optuna/optuna
#!RemoteAsset: sha256:6f7043e9f8ecb5e607af86a7eb00fb5ec2be26c3b08c201209a73d36aff37a38
Source0: https://files.pythonhosted.org/packages/source/o/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject

BuildOption(install): -l %{srcname}
# No module named 'optuna_integration'
BuildOption(check): -e optuna.integration.*
# `optuna.multi_objective` were deleted at v4.0.0.
BuildOption(check): -e optuna.multi_objective

BuildRequires: pyproject-rpm-macros
BuildRequires: pkgconfig(python3)
BuildRequires: python3dist(fakeredis)
BuildRequires: python3dist(pytest)

Provides: python3-%{srcname} = %{version}-%{release}
%python_provide python3-%{srcname}

%description
Optuna is an automatic hyperparameter optimization software framework,
particularly designed for machine learning.

%generate_buildrequires
%pyproject_buildrequires

%files -f %{pyproject_files}
%doc README.md
%license LICENSE
%{_bindir}/optuna

%changelog
%autochangelog
Loading
Loading