python3Packages.mcp: 1.3.0 -> 1.5.0 (#393206)

This commit is contained in:
dotlambda
2025-03-30 21:29:57 -07:00
committed by GitHub
@@ -10,6 +10,7 @@
pydantic,
pydantic-settings,
pytest-asyncio,
pytest-examples,
pytestCheckHook,
python-dotenv,
rich,
@@ -17,21 +18,25 @@
starlette,
typer,
uvicorn,
websockets,
}:
buildPythonPackage rec {
pname = "mcp";
version = "1.3.0";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "modelcontextprotocol";
repo = "python-sdk";
tag = "v${version}";
hash = "sha256-DbRXD4o/uFfpGvrux8lm7/t2utdFDEFg2G7CiraCJd0=";
hash = "sha256-Z2NN6k4mD6NixDON1MUOELpBZW9JvMvFErcCbFPdg2o=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail ', "uv-dynamic-versioning"' "" \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
substituteInPlace tests/client/test_stdio.py \
--replace '/usr/bin/tee' '${lib.getExe' coreutils "tee"}'
'';
@@ -61,18 +66,24 @@ buildPythonPackage rec {
rich = [
rich
];
ws = [
websockets
];
};
pythonImportsCheck = [ "mcp" ];
nativeCheckInputs = [
pytest-asyncio
pytest-examples
pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies);
disabledTests = [
# attempts to run the package manager uv
"test_command_execution"
# performance-dependent test
"test_messages_are_executed_concurrently"
];
__darwinAllowLocalNetworking = true;