python3Packages.langgraph-cli: enable 'inmem' optional dependancy

This commit is contained in:
Sarah Clark 2025-08-06 11:57:56 -07:00
parent b9f7f0b651
commit 19f0381dbc
2 changed files with 18 additions and 18 deletions

View File

@ -8,7 +8,10 @@
# dependencies
click,
langgraph,
langgraph-runtime-inmem,
langgraph-sdk,
python-dotenv,
# testing
pytest-asyncio,
@ -40,21 +43,20 @@ buildPythonPackage rec {
langgraph-sdk
];
# Not yet. Depemnds on `langgraph-runtime-inmem` which isn't in github yet
# https://github.com/langchain-ai/langgraph/issues/5802
# optional-dependencies = {
# "inmem" = [
# langgraph-api
# langgraph-runtime-inmem
# python-dotenv
# ]
# }
optional-dependencies = {
"inmem" = [
langgraph
langgraph-runtime-inmem
python-dotenv
];
};
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
docker-compose
];
]
++ lib.flatten (builtins.attrValues optional-dependencies);
enabledTestPaths = [ "tests/unit_tests" ];

View File

@ -23,14 +23,6 @@ buildPythonPackage rec {
hash = "sha256-chPmwJ+tUJoRK5xX9+r6mbYf95ZbX4Z3mP6Ra19nBxM=";
};
# 1.5.24 (now 1.5.25) only affects non-cpython builds
# upgrade: https://github.com/NixOS/nixpkgs/pull/431547
postPatch = ''
substituteInPlace pyproject.toml \
--replace "blockbuster>=1.5.24,<2.0.0" \
"blockbuster>=1.5.23,<2.0.0"
'';
build-system = [
hatchling
];
@ -44,6 +36,12 @@ buildPythonPackage rec {
structlog
];
# Can remove after blockbuster version bump
# https://github.com/NixOS/nixpkgs/pull/431547
pythonRelaxDeps = [
"blockbuster"
];
pythonImportsCheck = [
"langgraph_runtime_inmem"
];