Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / openllm-client / default.nix
blob2dd395bab677f43dca084f972e1d2b1ce46d5712
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , bentoml
5 , hatch-fancy-pypi-readme
6 , hatch-vcs
7 , hatchling
8 , attrs
9 , cattrs
10 , httpx
11 , openllm-core
12 , orjson
13 , soundfile
14 , transformers
17 buildPythonPackage rec {
18   inherit (openllm-core) src version;
19   pname = "openllm-client";
20   pyproject = true;
22   disabled = pythonOlder "3.8";
24   sourceRoot = "source/openllm-client";
26   nativeBuildInputs = [
27     hatch-fancy-pypi-readme
28     hatch-vcs
29     hatchling
30   ];
32   propagatedBuildInputs = [
33     attrs
34     cattrs
35     httpx
36     orjson
37   ];
39   passthru.optional-dependencies = {
40     grpc = [
41       bentoml
42     ] ++ bentoml.optional-dependencies.grpc;
43     agents = [
44       transformers
45       # diffusers
46       soundfile
47     ] ++ transformers.agents;
48     full = passthru.optional-dependencies.grpc ++ passthru.optional-dependencies.agents;
49   };
51   # there is no tests
52   doCheck = false;
54   pythonImportsCheck = [ "openllm_client" ];
56   meta = with lib; {
57     description = "Interacting with OpenLLM HTTP/gRPC server, or any BentoML server";
58     homepage = "https://github.com/bentoml/OpenLLM/tree/main/openllm-client";
59     changelog = "https://github.com/bentoml/OpenLLM/blob/${src.rev}/CHANGELOG.md";
60     license = licenses.asl20;
61     maintainers = with maintainers; [ natsukium ];
62   };