File python-fastmcp.spec of Package python-fastmcp
#
# spec file for package python-fastmcp
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-fastmcp
Version: 2.12.4
Release: 0
Summary: The fast, Pythonic way to build MCP servers and clients
License: Apache-2.0
URL: https://gofastmcp.com
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/f/fastmcp/fastmcp-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module uv-dynamic-versioning >= 0.7.0}
# SECTION test requirements
BuildRequires: %{python_module Authlib >= 1.5.2}
BuildRequires: %{python_module cyclopts >= 3.0.0}
BuildRequires: %{python_module exceptiongroup >= 1.2.2}
BuildRequires: %{python_module httpx >= 0.28.1}
BuildRequires: %{python_module mcp >= 1.12.4}
BuildRequires: %{python_module openapi-core >= 0.19.5}
BuildRequires: %{python_module openapi-pydantic >= 0.5.1}
BuildRequires: %{python_module pydantic >= 2.11.7}
BuildRequires: %{python_module pyperclip >= 1.9.0}
BuildRequires: %{python_module python-dotenv >= 1.1.0}
BuildRequires: %{python_module rich >= 13.9.4}
# /SECTION
BuildRequires: fdupes
Requires: python-Authlib >= 1.5.2
Requires: python-cyclopts >= 3.0.0
Requires: python-exceptiongroup >= 1.2.2
Requires: python-httpx >= 0.28.1
Requires: python-mcp >= 1.12.4
Requires: python-openapi-core >= 0.19.5
Requires: python-openapi-pydantic >= 0.5.1
Requires: python-pydantic >= 2.11.7
Requires: python-pyperclip >= 1.9.0
Requires: python-python-dotenv >= 1.1.0
Requires: python-rich >= 13.9.4
Suggests: python-websockets >= 15.0.1
Suggests: python-openai >= 1.102.0
BuildArch: noarch
%python_subpackages
%description
Model Context Protocol (or Master Control Program?) implementation
for python.
%prep
%autosetup -p1 -n fastmcp-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/fastmcp
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# check
# CHOOSE: pytest OR pyunittest -v OR CUSTOM
%post
%python_install_alternative fastmcp
%postun
%python_uninstall_alternative fastmcp
%files %{python_files}
%doc README.md README_OPENAPI.md
%license LICENSE LICENSE
%python_alternative %{_bindir}/fastmcp
%{python_sitelib}/fastmcp
%{python_sitelib}/fastmcp-%{version}.dist-info
%changelog