Files
ports/misc/py-langchain-anthropic/Makefile
T
2026-10-04 04:07:15 +00:00

49 lines
2.4 KiB
Makefile

PORTNAME= langchain-anthropic
DISTVERSION= 1.7.4
CATEGORIES= misc python # machine-learning
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
MAINTAINER= yuri@FreeBSD.org
COMMENT= LangChain: Integration package connecting Anthropic and LangChain
WWW= https://github.com/langchain-ai/langchain/tree/master/libs/partners/anthropic
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}anthropic>=0.120.0:misc/py-anthropic@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langchain-core>=1.6.2:misc/py-langchain-core@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pydantic2>=2.7.4:devel/py-pydantic2@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}blockbuster>=1.5.5:devel/py-blockbuster@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}defusedxml>=0.7.1:devel/py-defusedxml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}freezegun>=1.2.2:devel/py-freezegun@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langchain>=1.4.0:misc/py-langchain@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langchain-tests>=1.1.9:misc/py-langchain-tests@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}langgraph-prebuilt>=0.7.0:misc/py-langgraph-prebuilt@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-asyncio>=1.3.0:devel/py-pytest-asyncio@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-mock>=3.10.0:devel/py-pytest-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-retry>=1.7.0:devel/py-pytest-retry@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-socket>=0.7.0:devel/py-pytest-socket@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-timeout>=2.3.1:devel/py-pytest-timeout@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-watcher>=0.3.4:devel/py-pytest-watcher@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-xdist>=3.8.0:devel/py-pytest-xdist@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}syrupy>=5.0.0:devel/py-syrupy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}vcrpy>=8.0.0:devel/py-vcrpy@${PY_FLAVOR}
USES= python
USE_PYTHON= pep517 autoplist pytest
NO_ARCH= yes
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
# Integration tests need an Anthropic API key and network access; ruff items
# conflict with the installed ruff version in the package build environment.
TEST_ARGS= --ignore=${WRKSRC}/tests/integration_tests
# tests as of 1.7.4: 406 passed, 7 warnings in 4.48s
.include <bsd.port.mk>