Gaetan Lepage 2025-06-06 10:25:38 +02:00
parent fe80df2ba6
commit b766cc0cf8

View file

@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
@ -7,6 +8,7 @@
hatchling,
# dependencies
authlib,
exceptiongroup,
httpx,
mcp,
@ -14,24 +16,24 @@
python-dotenv,
rich,
typer,
websockets,
# tests
dirty-equals,
fastapi,
pytest-httpx,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fastmcp";
version = "2.4.0";
version = "2.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jlowin";
repo = "fastmcp";
tag = "v${version}";
hash = "sha256-F4lgMm/84svLZo6SZ7AubsC73s4tffqjJcd9gvA7hGA=";
hash = "sha256-UQV/hIu96ukpJxUhOux0mos0o6j4kvsFp2NJHa47tbw=";
};
postPatch = ''
@ -45,6 +47,7 @@ buildPythonPackage rec {
];
dependencies = [
authlib
exceptiongroup
httpx
mcp
@ -52,7 +55,6 @@ buildPythonPackage rec {
python-dotenv
rich
typer
websockets
];
pythonImportsCheck = [ "fastmcp" ];
@ -60,9 +62,28 @@ buildPythonPackage rec {
nativeCheckInputs = [
dirty-equals
fastapi
pytest-httpx
pytestCheckHook
];
disabledTests = [
# AssertionError: assert 'INFO' == 'DEBUG'
"test_temporary_settings"
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# RuntimeError: Server failed to start after 10 attempts
"tests/auth/providers/test_bearer.py"
"tests/auth/test_oauth_client.py"
"tests/client/test_openapi.py"
"tests/client/test_sse.py"
"tests/client/test_streamable_http.py"
"tests/server/http/test_http_dependencies.py"
"tests/server/http/test_http_dependencies.py"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "The fast, Pythonic way to build MCP servers and clients";
changelog = "https://github.com/jlowin/fastmcp/releases/tag/v${version}";