Files
2026-10-04 04:07:15 +00:00

51 lines
2.6 KiB
Makefile

PORTNAME= langchain
DISTVERSION= 1.4.2
CATEGORIES= misc python # machine-learning
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= yuri@FreeBSD.org
COMMENT= LangChain: Building applications with LLMs through composability
WWW= https://python.langchain.com/docs/introduction/ \
https://github.com/langchain-ai/langchain
LICENSE= MIT
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}langchain-core>=1.6.2:misc/py-langchain-core@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langgraph>=1.2.12:misc/py-langgraph@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pydantic2>=2.7.4:devel/py-pydantic2@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}blockbuster>=1.5.26:devel/py-blockbuster@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langchain-openai>=1.6.0:misc/py-langchain-openai@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langchain-tests>=1.1.9:misc/py-langchain-tests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=1.3.0:devel/py-pytest-asyncio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-benchmark>=5.1.0:devel/py-pytest-benchmark@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-cov>=4.0.0:devel/py-pytest-cov@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>=3.10.0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-socket>=0.6.0:devel/py-pytest-socket@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-watcher>=0.2.6:devel/py-pytest-watcher@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>=3.6.1:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}syrupy>=5.0.0:devel/py-syrupy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}toml>=0.10.2:textproc/py-toml@${PY_FLAVOR}
USES= python
USE_PYTHON= pep517 autoplist pytest
NO_ARCH= yes
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
# Integration tests and shell-tool tests require network/API keys or a
# full shell environment that is not available during package builds.
TEST_ARGS= --ignore=${WRKSRC}/tests/integration_tests \
--ignore=${WRKSRC}/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py \
--ignore=${WRKSRC}/tests/unit_tests/mcp \
--ignore=${WRKSRC}/tests/unit_tests/test_imports.py \
--ignore=${WRKSRC}/tests/unit_tests/test_pytest_config.py \
--deselect=tests/unit_tests/agents/middleware/implementations/test_tool_emulator.py::TestLLMToolEmulatorModelConfiguration::test_default_model_deprecated_and_missing_langchain_anthropic_raises_clear_error \
--snapshot-warn-unused
# tests as of 1.4.2: 1089 passed, 12 skipped, 7 warnings in 13.86s
.include <bsd.port.mk>