push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
stdenv,
# build-system
hatch-fancy-pypi-readme,
hatchling,
# dependencies
anyio,
distro,
httpx,
jiter,
pydantic,
sniffio,
tokenizers,
typing-extensions,
# optional dependencies
google-auth,
# test
dirty-equals,
nest-asyncio,
pytest-asyncio,
pytest-xdist,
pytestCheckHook,
respx,
}:
buildPythonPackage rec {
pname = "anthropic";
version = "0.62.0";
pyproject = true;
src = fetchFromGitHub {
owner = "anthropics";
repo = "anthropic-sdk-python";
tag = "v${version}";
hash = "sha256-EVLSC6ClHnmGqMoefMXj3M4dh812ZN5t9nF3gfCLyCo=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"hatchling==1.26.3"' '"hatchling>=1.26.3"'
'';
build-system = [
hatchling
hatch-fancy-pypi-readme
];
dependencies = [
anyio
distro
httpx
jiter
pydantic
sniffio
tokenizers
typing-extensions
];
optional-dependencies = {
vertex = [ google-auth ];
};
nativeCheckInputs = [
dirty-equals
nest-asyncio
pytest-asyncio
pytest-xdist
pytestCheckHook
respx
];
pythonImportsCheck = [ "anthropic" ];
disabledTests = [
# Test require network access
"test_copy_build_request"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Hangs
# https://github.com/anthropics/anthropic-sdk-python/issues/1008
"test_get_platform"
];
disabledTestPaths = [
# Test require network access
"tests/api_resources"
"tests/lib/test_bedrock.py"
];
pytestFlags = [
"-Wignore::DeprecationWarning"
];
meta = {
description = "Anthropic's safety-first language model APIs";
homepage = "https://github.com/anthropics/anthropic-sdk-python";
changelog = "https://github.com/anthropics/anthropic-sdk-python/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = [
lib.maintainers.natsukium
lib.maintainers.sarahec
];
};
}