2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2024-01-02 11:29:13 +00:00
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2023-07-15 17:15:38 +00:00
|
|
|
, googleapis-common-protos
|
|
|
|
, grpcio
|
|
|
|
, protobuf
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "clarifai-grpc";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "10.0.10";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Clarifai";
|
|
|
|
repo = "clarifai-python-grpc";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-IcMnzfkq4eSXh2KsxSog64RQbJhXkEWjma6LNkzDX0Y=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
googleapis-common-protos
|
|
|
|
grpcio
|
|
|
|
protobuf
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
# almost all tests require network access
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "clarifai_grpc" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Clarifai gRPC API Client";
|
|
|
|
homepage = "https://github.com/Clarifai/clarifai-python-grpc";
|
|
|
|
changelog = "https://github.com/Clarifai/clarifai-python-grpc/releases/tag/${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ natsukium ];
|
|
|
|
};
|
|
|
|
}
|