diff --git a/SPECS/grpc/2000-force-system-libraries-in-isolated-environments.patch b/SPECS/grpc/2000-force-system-libraries-in-isolated-environments.patch new file mode 100644 index 000000000..17e4a9a2f --- /dev/null +++ b/SPECS/grpc/2000-force-system-libraries-in-isolated-environments.patch @@ -0,0 +1,30 @@ +From: Li Guan +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 + diff --git a/SPECS/grpc/add-missing-includes.patch b/SPECS/grpc/add-missing-includes.patch deleted file mode 100644 index 64836698f..000000000 --- a/SPECS/grpc/add-missing-includes.patch +++ /dev/null @@ -1,55 +0,0 @@ -From d54219b508423f0a2ff6a0b98c16fb6dafd44b84 Mon Sep 17 00:00:00 2001 -From: "Mark D. Roth" -Date: Tue, 6 Jan 2026 10:09:45 -0800 -Subject: [PATCH] [build] add missing includes (#41351) - -Fixes #41305. - -Closes #41351 - -COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41351 from markdroth:add_missing_includes 223be6932adb00d085149c53167c1b0318745f6c -PiperOrigin-RevId: 852829597 ---- - include/grpc/event_engine/memory_request.h | 2 ++ - src/core/channelz/v2tov1/property_list.cc | 1 + - src/core/util/glob.cc | 2 ++ - 3 files changed, 5 insertions(+) - -diff --git a/include/grpc/event_engine/memory_request.h b/include/grpc/event_engine/memory_request.h -index 76bcbb2036113..ad8cab842ed5e 100644 ---- a/include/grpc/event_engine/memory_request.h -+++ b/include/grpc/event_engine/memory_request.h -@@ -17,6 +17,8 @@ - #include - #include - -+#include -+ - #include "absl/strings/string_view.h" - - namespace grpc_event_engine { -diff --git a/src/core/channelz/v2tov1/property_list.cc b/src/core/channelz/v2tov1/property_list.cc -index e38320e35be87..371084395cb5a 100644 ---- a/src/core/channelz/v2tov1/property_list.cc -+++ b/src/core/channelz/v2tov1/property_list.cc -@@ -15,6 +15,7 @@ - #include "src/core/channelz/v2tov1/property_list.h" - - #include -+#include - #include - #include - -diff --git a/src/core/util/glob.cc b/src/core/util/glob.cc -index 1b1c16e23d360..22e54259f06e7 100644 ---- a/src/core/util/glob.cc -+++ b/src/core/util/glob.cc -@@ -12,6 +12,8 @@ - // See the License for the specific language governing permissions and - // limitations under the License. - -+#include -+ - #include "absl/strings/string_view.h" - - namespace grpc_core { diff --git a/SPECS/grpc/grpc.spec b/SPECS/grpc/grpc.spec index 9ef10b4ba..5bfbe0b82 100644 --- a/SPECS/grpc/grpc.spec +++ b/SPECS/grpc/grpc.spec @@ -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 # SPDX-FileContributor: yyjeqhc # SPDX-FileContributor: misaka00251 # SPDX-FileContributor: purofle +# SPDX-FileContributor: Li Guan # # 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" @@ -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 @@ -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 @@ -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 diff --git a/SPECS/grpc/telemetry.patch b/SPECS/grpc/telemetry.patch deleted file mode 100644 index 450039093..000000000 --- a/SPECS/grpc/telemetry.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: -Date: 2025-02-12 15:22:18.058482440 +0100 - -CMakeLists.txt is using a bundled copy of otel, so there is no .pc file to depend on. - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: grpc-1.76.0/CMakeLists.txt -=================================================================== ---- a/CMakeLists.txt 2025-10-18 10:30:24.000000000 +0800 -+++ b/CMakeLists.txt 2025-12-30 14:10:47.125844166 +0800 -@@ -52020,7 +52020,7 @@ - "gRPC++ OpenTelemetry Plugin" - "OpenTelemetry Plugin for gRPC C++" - "${gRPC_CPP_VERSION}" -- "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_bits absl_btree absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_dynamic_annotations absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_layout absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_node_hash_map absl_optional absl_prefetch absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_string_view absl_strings absl_strings_internal absl_synchronization absl_time absl_type_traits absl_utility gpr grpc grpc++ opentelemetry_api" -+ "absl_absl_check absl_absl_log absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_bits absl_btree absl_check absl_cleanup absl_config absl_cord absl_core_headers absl_dynamic_annotations absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_layout absl_log absl_log_globals absl_log_severity absl_memory absl_no_destructor absl_node_hash_map absl_optional absl_prefetch absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_string_view absl_strings absl_strings_internal absl_synchronization absl_time absl_type_traits absl_utility gpr grpc grpc++" - "libcares openssl re2 zlib" - "-lgrpcpp_otel_plugin" - "-laddress_sorting -lupb_textformat_lib -lupb_json_lib -lupb_reflection_lib -lupb_wire_lib -lupb_message_lib -lutf8_range_lib -lupb_mini_descriptor_lib -lupb_mini_table_lib -lupb_hash_lib -lupb_mem_lib -lupb_base_lib -lupb_lex_lib" diff --git a/SPECS/python-fakeredis/python-fakeredis.spec b/SPECS/python-fakeredis/python-fakeredis.spec new file mode 100644 index 000000000..8150e231b --- /dev/null +++ b/SPECS/python-fakeredis/python-fakeredis.spec @@ -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 +# +# 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 diff --git a/SPECS/python-grpcio-reflection/python-grpcio-reflection.spec b/SPECS/python-grpcio-reflection/python-grpcio-reflection.spec new file mode 100644 index 000000000..a9c4f8596 --- /dev/null +++ b/SPECS/python-grpcio-reflection/python-grpcio-reflection.spec @@ -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 +# +# 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 diff --git a/SPECS/python-lupa/python-lupa.spec b/SPECS/python-lupa/python-lupa.spec new file mode 100644 index 000000000..ad0715d87 --- /dev/null +++ b/SPECS/python-lupa/python-lupa.spec @@ -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 +# +# 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 diff --git a/SPECS/python-optuna/python-optuna.spec b/SPECS/python-optuna/python-optuna.spec new file mode 100644 index 000000000..892e19c69 --- /dev/null +++ b/SPECS/python-optuna/python-optuna.spec @@ -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 +# +# 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 diff --git a/SPECS/python-partial-json-parser/python-partial-json-parser.spec b/SPECS/python-partial-json-parser/python-partial-json-parser.spec new file mode 100644 index 000000000..d20623f88 --- /dev/null +++ b/SPECS/python-partial-json-parser/python-partial-json-parser.spec @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Li Guan +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname partial-json-parser +%global pypi_name partial_json_parser +%global pypi_version 0.2.1.1.post7 + +Name: python-%{srcname} +Version: 0.2.1.1~post7 +Release: %autorelease +Summary: Parse partial JSON generated by LLM +License: MIT +URL: https://github.com/promplate/partial-json-parser +#!RemoteAsset: sha256:86590e1ba6bcb6739a2dfc17d2323f028cb5884f4c6ce23db376999132c9a922 +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{pypi_name}-%{pypi_version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{pypi_name} -L + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(rich) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Sometimes we need LLM (Large Language Models) to produce structural +information instead of natural language. The easiest way is to use JSON. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE +%{_bindir}/json-playground + +%changelog +%autochangelog