From 3dff06ecf6abdcdbdb419fb24502cf98637e0dc8 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sat, 11 Nov 2023 15:32:30 +0900 Subject: [PATCH] python311Packages.langchain: clean up test dependencies and fix build on darwin --- .../development/python-modules/langchain/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/langchain/default.nix b/pkgs/development/python-modules/langchain/default.nix index cc3e6297f366..c2fabc40c03a 100644 --- a/pkgs/development/python-modules/langchain/default.nix +++ b/pkgs/development/python-modules/langchain/default.nix @@ -42,7 +42,6 @@ , librosa , lxml , manifest-ml -, markdownify , neo4j , networkx , nlpcloud @@ -76,7 +75,6 @@ , pytest-asyncio , pytest-mock , pytest-socket -, pytest-vcr , pytestCheckHook , requests-mock , responses @@ -254,22 +252,22 @@ buildPythonPackage rec { nativeCheckInputs = [ freezegun - markdownify + lark pandas pytest-asyncio pytest-mock pytest-socket - pytest-vcr pytestCheckHook requests-mock responses syrupy toml - ] ++ passthru.optional-dependencies.all; + ]; pytestFlagsArray = [ # integration_tests have many network, db access and require `OPENAI_API_KEY`, etc. "tests/unit_tests" + "--only-core" ]; disabledTests = [ @@ -281,6 +279,10 @@ buildPythonPackage rec { "test_socket_disabled" ]; + pythonImportsCheck = [ + "langchain" + ]; + meta = with lib; { description = "Building applications with LLMs through composability"; homepage = "https://github.com/hwchase17/langchain";