%global _srcname linux-mcp-server %global _mcp_version 1.23.0 Name: python-%{_srcname} Version: 0.1.0a3 Release: 1.20251203130503541302.pr61.13.g5e12016%{?dist} Summary: MCP server for read-only Linux system administration. License: Apache-2.0 URL: https://github.com/rhel-lightspeed/linux-mcp-server Source0: linux-mcp-server-0.1.0a3.tar.gz Source1: %{pypi_source mcp %{_mcp_version}} BuildSystem: pyproject BuildOption(install): -l linux_mcp_server BuildOption(generate_buildrequires): -p BuildArch: noarch BuildRequires: python3-devel BuildRequires: tomcli # TODO(r0x0d): Vendoring the mcp dependency as of now since it is not # available in Fedora. Provides: bundled(python3dist(mcp)) = %{_mcp_version} %global _description %{expand: MCP server for read-only Linux system administration, diagnostics, and troubleshooting } %description %_description %package -n python3-%{_srcname} Summary: %{summary} %description -n python3-%{_srcname} %_description %prep -a # Drop the mcp dependency as we are bundling it from Source1. tomcli set pyproject.toml arrays delitem project.dependencies "mcp.*" # Extract mcp to _vendor tar -xzf %{SOURCE1} -C %{srcname}-%{version}/src/linux_mcp_server/_vendor/ --strip-components=1 export PIP_FIND_LINKS=$PWD/_vendor export PYTHONPATH=$PWD/_vendor:$PYTHONPATH %files -n python3-%{_srcname} -f %{pyproject_files} %changelog %autochangelog