## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global extras openai Name: python-fastmcp Version: 2.14.7 Release: %autorelease Summary: The fast, Pythonic way to build MCP servers and clients License: Apache-2.0 URL: https://gofastmcp.com Source: %{pypi_source fastmcp} # The uv-dynamic-version library is not present in Fedora 43, only Fedora 44. # The below patch is replacing the dependency for `hatch-vcs`, as the sole # purpose is to detect the version for this library. Patch: replace-uv-dynamic-version-with-hatchling-vcs.diff # The following patches exists to fix either the `command` or `env` properties # of some FastMCP transports. # # * Fixes for the `command` property: # - The tests were trying to use `python`, and while this is a valid # binary in most cases, during the build we are expecting to use # `python3`, and to be more precise and avoid problems later, we are # using the full binary path `/usr/bin/python3` for this fix. # # * Fixes for the `env` property: # - Some tests create a small python script that require importing # `fastmcp`, where they create a simple tool calling program for the # test. To fix those, we are passing the full `os.environ` copy to the # sub-process spawned by `fastmcp`. We could just pass `PYTHONPATH`, as # this is really the only thing that is required for the test, but to be # more complete, we are passing the all the available environments down # to the sub-process. Patch1: fix-python-stdio-trasnport-with-env-vars.diff Patch2: fix-command-for-python3-instead-of-python.diff Patch3: fix-environment-for-test-server.diff Patch4: fix-temporary-settings-test.diff Patch5: fix-environment-for-test-run.diff BuildArch: noarch BuildRequires: python3-devel BuildRequires: tomcli # Test dependencies BuildRequires: python3-pytest BuildRequires: python3-pytest-httpx BuildRequires: python3-pytest-asyncio BuildRequires: python3-inline-snapshot BuildRequires: python3-dirty-equals BuildRequires: python3-fastapi BuildRequires: python3-psutil %global _description %{expand: FastMCP is the standard framework for building MCP applications, providing the fastest path from idea to production. The Model Context Protocol (MCP) is a standardized way to provide context and tools to LLMs. FastMCP makes building production-ready MCP servers simple, with enterprise auth, deployment tools, and a complete ecosystem built in.} %description %_description %package -n python3-fastmcp Summary: %{summary} %description -n python3-fastmcp %_description %pyproject_extras_subpkg -n python3-fastmcp %{extras} %prep %autosetup -p1 -n fastmcp-%{version} # Relax authlib version tomcli set pyproject.toml arrays replace "project.dependencies" "authlib.*" "authlib >=1.4.0,<1.6.5" # Relax pyperclip version tomcli set pyproject.toml arrays replace "project.dependencies" "pyperclip.*" "pyperclip >=1.8.2,<1.9.0" tomcli set pyproject.toml arrays replace "dependency-groups.dev" "pyperclip.*" "pyperclip >=1.8.2,<1.9.0" # Adjust version of fakeredis tomcli set pyproject.toml arrays replace "project.dependencies" "fakeredis.*" "fakeredis[lua]>=2.35" %generate_buildrequires %pyproject_buildrequires -x %{extras} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l fastmcp %check # Ignore anthropic as it is not present in Fedora and we are ignoring this # extra. %pyproject_check_import -e fastmcp.client.sampling.handlers.anthropic # This test tries to reach out to github to download the full GitHub API # schema, and while we could add this as `SourceX` to the spec, not sure if # that would be worth it to enable just this test. # # The test in case is only checking if fastmcp can parse the schema quick # enough, which is around 10mb~. k="${k-}${k+ and }not test_github_api_schema_performance" # The following tests are skipped due to the update of pydantic>=2.13.4, and # since the goal is to update fastmcp>=3, we will leave this disabled until we # can report/work with upstream. # See: https://bugzilla.redhat.com/show_bug.cgi?id=2477293 k="${k-}${k+ and }not test_simple_output_schema" k="${k-}${k+ and }not test_output_schema_wrapped_primitive_full_handshake" k="${k-}${k+ and }not test_output_schema_complex_type_full_handshake" k="${k-}${k+ and }not test_callable_object" k="${k-}${k+ and }not test_basic_function" k="${k-}${k+ and }not test_async_function" k="${k-}${k+ and }not test_async_callable_object" k="${k-}${k+ and }not test_instance_method" k="${k-}${k+ and }not test_simple_return_annotation" k="${k-}${k+ and }not test_complex_return_annotation" k="${k-}${k+ and }not test_output_schema_inferred_when_not_specified" k="${k-}${k+ and }not test_structured_content_interaction_with_wrapping" k="${k-}${k+ and }not test_transform_inherits_parent_output_schema" k="${k-}${k+ and }not test_transform_with_custom_function_inferred_schema" # Those two tests fails randomly. Sometimes they work, sometimes they just # fail. Skipping them for now is easier. k="${k-}${k+ and }not test_custom_client_identification" k="${k-}${k+ and }not test_global_rate_limiting" # Three tests in tests/server/proxy/test_stateful_proxy_client.py fail on # Python 3.15 with # RuntimeError: Attempted to exit a cancel scope that isn't the current # tasks's current cancel scope # raised from anyio's CancelScope.__exit__ during client teardown. # # fastmcp/utilities/exceptions.py:_exception_handler re-raises a leaf # exception from inside an exceptiongroup catch() handler while the cancel # scope is unwinding, leaving anyio's per-task cancel scope bookkeeping # inconsistent. Python 3.15's asyncio changes expose the ordering. # # Not fixed upstream: 2.14.7 is the final 2.x release, and # utilities/exceptions.py is byte-identical in 3.4.7. Upstream CI covers # Python 3.10 and 3.13 only. # # Note the shape of this one. -k substring-matches against parent names too, # and the module node is test_stateful_proxy_client.py, so a plain # "not test_stateful_proxy" would swallow the whole file -- including # test_stateless_proxy, which passes. So: drop the module, rescue that one. k="${k-}${k+ and }not (test_stateful_proxy_client and not test_stateless_proxy)" # Ignore the test that test the anthropic handler, which is not present in # Fedora and not being packaged as a extra. ignore="${ignore-} --ignore tests/client/sampling/handlers/test_anthropic_handler.py" # The tests under `test_uv_transport` require the `uv` tool to be installed. # While this is present in Fedora, the test will try to pull other dependencies # when running through `uv`. Instead of modifying the test itself to run in # isolation, we are ignoring it as our idea is to test the framework itself. ignore="${ignore-} --ignore tests/client/transports/test_uv_transport.py" %pytest --inline-snapshot=disable -v -k "${k-}" ${ignore-} %files -n python3-fastmcp -f %{pyproject_files} %doc SECURITY.md %doc CODE_OF_CONDUCT.md %doc README.md %{_bindir}/fastmcp %changelog ## START: Generated by rpmautospec * Sun Aug 23 2026 releng-bot - 2.14.7-6 - Unretirement request: https://forge.fedoraproject.org/releng/fedora-scm- requests/issues/324 * Tue Aug 18 2026 Peter Lemenkov - 2.14.7-5 - Workaround for FTBFS with a modern Python * Thu Jul 16 2026 Fedora Release Engineering - 2.14.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild * Tue Jun 23 2026 Python Maint - 2.14.7-3 - Rebuilt for Python 3.15 * Mon May 18 2026 Rodolfo Olivieri - 2.14.7-2 - Fix fakeredis 2.35 update (closes rhbz#2479644) * Fri May 15 2026 Rodolfo Olivieri - 2.14.7-1 - Update to 2.14.7 (closes RHBZ#2477293) * Tue Mar 17 2026 Rodolfo Olivieri - 2.14.5-1 - Initial import (fedora#2444098) ## END: Generated by rpmautospec