depot/third_party/nixpkgs/pkgs/development/python-modules/anthropic/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

69 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, anyio
, distro
, dirty-equals
, httpx
, sniffio
, pydantic
, pytest-asyncio
, respx
, tokenizers
, typing-extensions
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "anthropic";
version = "0.7.8";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "anthropics";
repo = "anthropic-sdk-python";
rev = "refs/tags/v${version}";
hash = "sha256-1mpNwZJbYdKVmUeUM+PBL6vPhwe8tr2SnAP/t/MMKpI=";
};
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
anyio
distro
httpx
sniffio
pydantic
tokenizers
typing-extensions
];
nativeCheckInputs = [
dirty-equals
pytest-asyncio
pytestCheckHook
respx
];
disabledTests = [
"api_resources"
];
pythonImportsCheck = [
"anthropic"
];
meta = with lib; {
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/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ natsukium ];
};
}