Unverified Commit db1b2eda authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.langchain*: Move dependencies of langchain-core to a common...

python3Packages.langchain*: Move  dependencies of langchain-core to a common update script (#342114)
parents fa2f577e 1b414a4a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,10 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "langchain_aws" ];

  passthru = {
    inherit (langchain-core) updateScript;
  };

  meta = {
    changelog = "https://github.com/langchain-ai/langchain-aws/releases/tag/v${version}";
    description = "Build LangChain application on AWS";
+2 −7
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@
  responses,
  syrupy,
  toml,

  nix-update-script,
}:

buildPythonPackage rec {
@@ -67,11 +65,8 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "langchain_azure_dynamic_sessions" ];

  passthru.updateScript = nix-update-script {
    extraArgs = [
      "--version-regex"
      "langchain-azure-dynamic-sessions==(.*)"
    ];
  passthru = {
    inherit (langchain-core) updateScript;
  };

  meta = {
+2 −6
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
  numpy,
  poetry-core,
  pytestCheckHook,
  nix-update-script,
}:

buildPythonPackage rec {
@@ -38,11 +37,8 @@ buildPythonPackage rec {

  nativeCheckInputs = [ pytestCheckHook ];

  passthru.updateScript = nix-update-script {
    extraArgs = [
      "--version-regex"
      "langchain-chroma==(.*)"
    ];
  passthru = {
    inherit (langchain-core) updateScript;
  };

  meta = {
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ buildPythonPackage rec {
  pytestFlagsArray = [ "tests/unit_tests" ];

  passthru = {
    updateScript = langchain-core.updateScript;
    inherit (langchain-core) updateScript;
  };

  __darwinAllowLocalNetworking = true;
+10 −0
Original line number Diff line number Diff line
@@ -83,15 +83,25 @@ buildPythonPackage rec {
  '';

  passthru = {
    # Updates to core tend to drive updates in everything else
    updateScript = writeScript "update.sh" ''
      #!/usr/bin/env nix-shell
      #!nix-shell -i bash -p nix-update

      set -u -o pipefail +e
      # Common core
      nix-update --commit --version-regex 'langchain-core==(.*)' python3Packages.langchain-core
      nix-update --commit --version-regex 'langchain-text-splitters==(.*)' python3Packages.langchain-text-splitters
      nix-update --commit --version-regex 'langchain==(.*)' python3Packages.langchain
      nix-update --commit --version-regex 'langchain-community==(.*)' python3Packages.langchain-community

      # Extensions
      nix-update --commit --version-regex 'langchain-aws==(.*)' python3Packages.langchain-aws
      nix-update --commit --version-regex 'langchain-azure-dynamic-sessions==(.*)' python3Packages.langchain-azure-dynamic-sessions
      nix-update --commit --version-regex 'langchain-chroma==(.*)' python3Packages.langchain-chroma
      nix-update --commit --version-regex 'langchain-huggingface==(.*)' python3Packages.langchain-huggingface
      nix-update --commit --version-regex 'langchain-mongodb==(.*)' python3Packages.langchain-mongodb
      nix-update --commit --version-regex 'langchain-openai==(.*)' python3Packages.langchain-openai
    '';
  };

Loading