1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, setuptools
6, googleapis-common-protos
7, grpcio
8, protobuf
9, requests
10}:
11
12buildPythonPackage rec {
13 pname = "clarifai-grpc";
14 version = "9.10.5";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "Clarifai";
21 repo = "clarifai-python-grpc";
22 rev = "refs/tags/${version}";
23 hash = "sha256-lTvxafPdWET0p6dRnaTiOd8oPOjcRFZ45AtXkObNSBQ=";
24 };
25
26 nativeBuildInputs = [
27 setuptools
28 ];
29
30 propagatedBuildInputs = [
31 googleapis-common-protos
32 grpcio
33 protobuf
34 requests
35 ];
36
37 # almost all tests require network access
38 doCheck = false;
39
40 pythonImportsCheck = [ "clarifai_grpc" ];
41
42 meta = with lib; {
43 description = "Clarifai gRPC API Client";
44 homepage = "https://github.com/Clarifai/clarifai-python-grpc";
45 changelog = "https://github.com/Clarifai/clarifai-python-grpc/releases/tag/${version}";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ natsukium ];
48 };
49}