From 8263b6e27373027310a0a8905f8bfcf9a0eb3d84 Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Thu, 30 Apr 2026 20:41:09 +0800 Subject: [PATCH 1/5] SPECS: Add python-docstring-parser. --- .../python-docstring-parser.spec | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 SPECS/python-docstring-parser/python-docstring-parser.spec diff --git a/SPECS/python-docstring-parser/python-docstring-parser.spec b/SPECS/python-docstring-parser/python-docstring-parser.spec new file mode 100644 index 000000000..72a9ed5c7 --- /dev/null +++ b/SPECS/python-docstring-parser/python-docstring-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: HNO3Miracle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname docstring-parser +%global pypi_name docstring_parser + +Name: python-%{srcname} +Version: 0.17.0 +Release: %autorelease +Summary: Parse Python docstrings in reST, Google and Numpydoc format +License: MIT +URL: https://github.com/rr-/docstring_parser +#!RemoteAsset: sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912 +Source0: https://files.pythonhosted.org/packages/source/d/%{srcname}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{pypi_name} +BuildOption(check): %{pypi_name} + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(hatchling) +BuildRequires: python3dist(pytest) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +docstring-parser parses Python docstrings written in reStructuredText, Google +or Numpydoc style into a structured representation. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md CHANGELOG.md +%license LICENSE.md + +%changelog +%autochangelog From bdc2510d569b71bc7ec517a0d9ae502594451e1e Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Thu, 30 Apr 2026 20:41:10 +0800 Subject: [PATCH 2/5] SPECS: Add python-httpx-sse. --- ...rop-setuptools-scm-build-requirement.patch | 23 +++++++++ SPECS/python-httpx-sse/python-httpx-sse.spec | 51 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 SPECS/python-httpx-sse/2000-python-httpx-sse-drop-setuptools-scm-build-requirement.patch create mode 100644 SPECS/python-httpx-sse/python-httpx-sse.spec diff --git a/SPECS/python-httpx-sse/2000-python-httpx-sse-drop-setuptools-scm-build-requirement.patch b/SPECS/python-httpx-sse/2000-python-httpx-sse-drop-setuptools-scm-build-requirement.patch new file mode 100644 index 000000000..c82903600 --- /dev/null +++ b/SPECS/python-httpx-sse/2000-python-httpx-sse-drop-setuptools-scm-build-requirement.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: HNO3Miracle +Date: Sat, 21 Mar 2026 22:00:00 +0800 +Subject: [PATCH] python-httpx-sse: drop setuptools-scm build requirement + +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index ff59838..af304a8 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,5 +1,5 @@ + [build-system] +-requires = ["setuptools", "setuptools-scm", "wheel"] ++requires = ["setuptools"] + build-backend = "setuptools.build_meta" + + [project] +-- +2.51.0 + diff --git a/SPECS/python-httpx-sse/python-httpx-sse.spec b/SPECS/python-httpx-sse/python-httpx-sse.spec new file mode 100644 index 000000000..18ebbec8a --- /dev/null +++ b/SPECS/python-httpx-sse/python-httpx-sse.spec @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: HNO3Miracle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname httpx-sse +%global pypi_name httpx_sse + +Name: python-%{srcname} +Version: 0.4.3 +Release: %autorelease +Summary: Consume Server-Sent Event messages with HTTPX +License: MIT +URL: https://github.com/florimondmanca/httpx-sse +#!RemoteAsset: sha256:9b1ed0127459a66014aec3c56bebd93da3c1bc8bb6618c8082039a44889a755d +Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +# Patches +# Drop setuptools-scm to build with distro-provided static version metadata +Patch2000: 2000-python-httpx-sse-drop-setuptools-scm-build-requirement.patch + +BuildOption(install): -l %{pypi_name} +BuildOption(check): %{pypi_name} + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(httpx) +BuildRequires: python3dist(setuptools) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +httpx-sse provides helpers to consume Server-Sent Event (SSE) streams through +HTTPX clients. + +%prep +%autosetup -p1 -n %{pypi_name}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md CHANGELOG.md +%license LICENSE + +%changelog +%autochangelog From 03260e1cff3b113254149e0df156f7d8751a3993 Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Thu, 30 Apr 2026 20:41:11 +0800 Subject: [PATCH 3/5] SPECS: Add python-multipart. --- SPECS/python-multipart/python-multipart.spec | 44 ++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 SPECS/python-multipart/python-multipart.spec diff --git a/SPECS/python-multipart/python-multipart.spec b/SPECS/python-multipart/python-multipart.spec new file mode 100644 index 000000000..d6550f48c --- /dev/null +++ b/SPECS/python-multipart/python-multipart.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: HNO3Miracle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname python-multipart +%global pypi_name python_multipart + +Name: python-%{srcname} +Version: 0.0.22 +Release: %autorelease +Summary: Streaming multipart parser for Python +License: Apache-2.0 +URL: https://github.com/Kludex/python-multipart +#!RemoteAsset: sha256:7340bef99a7e0032613f56dc36027b959fd3b30a787ed62d310e951f7c3a3a58 +Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{pypi_name} +auto +BuildOption(check): %{pypi_name} multipart + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(hatchling) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +python-multipart is a streaming parser for multipart/form-data content, useful +for web upload handling. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md CHANGELOG.md +%license LICENSE.txt +%{python3_sitelib}/multipart/ + +%changelog +%autochangelog From 5fbb6d70dbae8cabbe71471e308e634d5c9908ee Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Thu, 30 Apr 2026 20:41:12 +0800 Subject: [PATCH 4/5] SPECS: Add python-sse-starlette. --- .../python-sse-starlette.spec | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 SPECS/python-sse-starlette/python-sse-starlette.spec diff --git a/SPECS/python-sse-starlette/python-sse-starlette.spec b/SPECS/python-sse-starlette/python-sse-starlette.spec new file mode 100644 index 000000000..f7887330c --- /dev/null +++ b/SPECS/python-sse-starlette/python-sse-starlette.spec @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: HNO3Miracle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname sse-starlette +%global pypi_name sse_starlette + +Name: python-%{srcname} +Version: 3.3.3 +Release: %autorelease +Summary: Server-Sent Events plugin for Starlette +License: BSD-3-Clause +URL: https://github.com/sysid/sse-starlette +#!RemoteAsset: sha256:72a95d7575fd5129bd0ae15275ac6432bb35ac542fdebb82889c24bb9f3f4049 +Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): -l %{pypi_name} +BuildOption(check): %{pypi_name} + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(anyio) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(starlette) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +sse-starlette provides asynchronous Server-Sent Events support for Starlette +applications. + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE + +%changelog +%autochangelog From e809fc82c4762bc785870c29083231375d608020 Mon Sep 17 00:00:00 2001 From: HNO3Miracle Date: Thu, 30 Apr 2026 20:41:13 +0800 Subject: [PATCH 5/5] SPECS: Add python-mcp. --- ...p-use-static-version-and-distro-deps.patch | 42 +++++++++++++ SPECS/python-mcp/python-mcp.spec | 63 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 SPECS/python-mcp/2000-python-mcp-use-static-version-and-distro-deps.patch create mode 100644 SPECS/python-mcp/python-mcp.spec diff --git a/SPECS/python-mcp/2000-python-mcp-use-static-version-and-distro-deps.patch b/SPECS/python-mcp/2000-python-mcp-use-static-version-and-distro-deps.patch new file mode 100644 index 000000000..40c3af9f1 --- /dev/null +++ b/SPECS/python-mcp/2000-python-mcp-use-static-version-and-distro-deps.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: HNO3Miracle +Date: Thu, 30 Apr 2026 21:00:00 +0800 +Subject: [PATCH] python-mcp: use static version and distro dependency names + +--- + pyproject.toml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/pyproject.toml 2026-04-30 20:40:34.672705599 +0800 ++++ b/pyproject.toml 2026-04-30 20:40:34.680705600 +0800 +@@ -1,6 +1,6 @@ + [project] + name = "mcp" +-dynamic = ["version"] ++version = "1.26.0" + description = "Model Context Protocol SDK" + readme = "README.md" + requires-python = ">=3.10" +@@ -31,9 +31,9 @@ + "sse-starlette>=1.6.1", + "pydantic-settings>=2.5.2", + "uvicorn>=0.31.1; sys_platform != 'emscripten'", +- "jsonschema>=4.20.0", ++ "jsonschema>=4.17.3", + "pywin32>=310; sys_platform == 'win32'", +- "pyjwt[crypto]>=2.10.1", ++ "pyjwt>=2.10.1", + "typing-extensions>=4.9.0", + "typing-inspection>=0.4.1", + ] +@@ -72,7 +72,7 @@ + ] + + [build-system] +-requires = ["hatchling", "uv-dynamic-versioning"] ++requires = ["hatchling"] + build-backend = "hatchling.build" + + [tool.hatch.version] +-- +2.51.0 diff --git a/SPECS/python-mcp/python-mcp.spec b/SPECS/python-mcp/python-mcp.spec new file mode 100644 index 000000000..0c2c6300b --- /dev/null +++ b/SPECS/python-mcp/python-mcp.spec @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: HNO3Miracle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%global srcname mcp + +Name: python-%{srcname} +Version: 1.26.0 +Release: %autorelease +Summary: Model Context Protocol SDK +License: MIT +URL: https://github.com/modelcontextprotocol/python-sdk +#!RemoteAsset: sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66 +Source0: https://files.pythonhosted.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +# Patches +# Disable uv-dynamic-versioning and align dependency names with openRuyi. +Patch2000: 2000-python-mcp-use-static-version-and-distro-deps.patch + +BuildOption(install): -l %{srcname} +BuildOption(check): -e 'mcp.cli*' %{srcname} + +BuildRequires: pyproject-rpm-macros +BuildRequires: pkgconfig(python3) +BuildRequires: python3dist(anyio) +BuildRequires: python3dist(hatchling) +BuildRequires: python3dist(httpx) +BuildRequires: python3dist(httpx-sse) +BuildRequires: python3dist(jsonschema) +BuildRequires: python3dist(pydantic) +BuildRequires: python3dist(pydantic-settings) +BuildRequires: python3dist(pyjwt) +BuildRequires: python3dist(python-multipart) +BuildRequires: python3dist(sse-starlette) +BuildRequires: python3dist(starlette) +BuildRequires: python3dist(typing-extensions) +BuildRequires: python3dist(typing-inspection) +BuildRequires: python3dist(uvicorn) + +Provides: python3-%{srcname} = %{version}-%{release} +%python_provide python3-%{srcname} + +%description +Python SDK for the Model Context Protocol (MCP), providing client and server +components for MCP-based integrations. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%generate_buildrequires +%pyproject_buildrequires + +%files -f %{pyproject_files} +%doc README.md +%license LICENSE +%{_bindir}/mcp + +%changelog +%autochangelog