Commit 19f0381d authored by Sarah Clark's avatar Sarah Clark
Browse files

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

parent b9f7f0b6
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -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" ];

+6 −8
Original line number Diff line number Diff line
@@ -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"
  ];