python3Packages.langchain-google-genai: fixes (#497099)

This commit is contained in:
Fabian Affolter 2026-03-07 12:44:35 +00:00 committed by GitHub
commit 27e5b19150
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@
gitUpdater,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "langchain-google-genai";
version = "4.2.1";
pyproject = true;
@ -35,20 +35,14 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "langchain-ai";
repo = "langchain-google";
tag = "libs/genai/v${version}";
tag = "libs/genai/v${finalAttrs.version}";
hash = "sha256-aNmYj5eOWDgHYlSLElwQXQByQg8gHqiybM19JQlkluk=";
};
sourceRoot = "${src.name}/libs/genai";
sourceRoot = "${finalAttrs.src.name}/libs/genai";
build-system = [ hatchling ];
pythonRelaxDeps = [
# Each component release requests the exact latest core.
# That prevents us from updating individual components.
"langchain-core"
];
dependencies = [
filetype
google-api-core
@ -76,6 +70,11 @@ buildPythonPackage rec {
"test_serialize"
];
disabledTestPaths = [
# AssertionError: assert {'google_maps...s': None, ...} == {'google_maps...a'...
"tests/unit_tests/test_chat_models.py::test_response_to_result_grounding_metadata[raw_response0-expected_grounding_metadata0]"
];
pythonImportsCheck = [ "langchain_google_genai" ];
passthru = {
@ -87,7 +86,7 @@ buildPythonPackage rec {
};
meta = {
changelog = "https://github.com/langchain-ai/langchain-google/releases/tag/${src.tag}";
changelog = "https://github.com/langchain-ai/langchain-google/releases/tag/${finalAttrs.src.tag}";
description = "LangChain integrations for Google Gemini";
homepage = "https://github.com/langchain-ai/langchain-google/tree/main/libs/genai";
license = lib.licenses.mit;
@ -96,4 +95,4 @@ buildPythonPackage rec {
sarahec
];
};
}
})