git: 3ec5df7a420b - main - misc/py-langchain-openai: New port: LangChain: Integration package connecting OpenAI and LangChain

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 19 Jul 2025 07:54:30 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3ec5df7a420bc547779e94e34f819418413782ec

commit 3ec5df7a420bc547779e94e34f819418413782ec
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-07-19 04:17:36 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-07-19 07:54:23 +0000

    misc/py-langchain-openai: New port: LangChain: Integration package connecting OpenAI and LangChain
---
 misc/Makefile                      |  1 +
 misc/py-langchain-openai/Makefile  | 29 +++++++++++++++++++++++++++++
 misc/py-langchain-openai/distinfo  |  3 +++
 misc/py-langchain-openai/pkg-descr |  1 +
 4 files changed, 34 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 1d1e10638d81..581484145bae 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -460,6 +460,7 @@
     SUBDIR += py-langchain
     SUBDIR += py-langchain-core
     SUBDIR += py-langchain-google-genai
+    SUBDIR += py-langchain-openai
     SUBDIR += py-langchain-tests
     SUBDIR += py-langchain-text-splitters
     SUBDIR += py-langgraph-sdk
diff --git a/misc/py-langchain-openai/Makefile b/misc/py-langchain-openai/Makefile
new file mode 100644
index 000000000000..5b82f11a564b
--- /dev/null
+++ b/misc/py-langchain-openai/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	langchain-openai
+DISTVERSION=	0.3.28
+CATEGORIES=	misc python # machine-learning
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTNAME=	${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	LangChain: Integration package connecting OpenAI and LangChain
+WWW=		https://python.langchain.com/docs/introduction/ \
+		https://github.com/langchain-ai/langchain
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pdm-backend>0:devel/py-pdm-backend@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}langchain-core>=0.3.68:misc/py-langchain-core@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}openai>=1.86.0:misc/py-openai@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tiktoken>=0.7:textproc/py-tiktoken@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	pep517 autoplist pytest
+
+NO_ARCH=	yes
+
+# tests as of 0.3.28: 233 failed, 262 passed, 11 skipped, 2 xfailed, 5 xpassed, 52 warnings, 131 errors, 8 rerun in 217.53s (0:03:37)
+
+.include <bsd.port.mk>
diff --git a/misc/py-langchain-openai/distinfo b/misc/py-langchain-openai/distinfo
new file mode 100644
index 000000000000..41608050abd2
--- /dev/null
+++ b/misc/py-langchain-openai/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1752886986
+SHA256 (langchain_openai-0.3.28.tar.gz) = 6c669548dbdea325c034ae5ef699710e2abd054c7354fdb3ef7bf909dc739d9e
+SIZE (langchain_openai-0.3.28.tar.gz) = 753951
diff --git a/misc/py-langchain-openai/pkg-descr b/misc/py-langchain-openai/pkg-descr
new file mode 100644
index 000000000000..399e1f7dc0e7
--- /dev/null
+++ b/misc/py-langchain-openai/pkg-descr
@@ -0,0 +1 @@
+langchain-openai is an integration package connecting OpenAI and LangChain.